CmpSc 421, Spring 2013 , XSL Assignment

For this assignment, you will write a .xsl file to transform any of several .xml files for Shakespeare'sc plays into a .xhtml file. You will need to study Chapters 2-4 and 6 of Goldberg's "XML" 2e. before doing this assignment.

The project P:\Public\NBProjects\Shakespeare contains several .xml files, one for each of Shakespeare's plays.

The P:\Public\NBProjects\Shakespeare project also contains a .dtd file, shkplays.dtd. However, several of the plays do not conform to the definitions given in shkplays.dtd. Since the .xml "play" files are given to you, you need to modify the .dtd. file rather than the .xml files. You will need to find the non-conformant plays and then make minimal modifications to shkplays.dtd to accomodate the syntax of these plays' .xml files. Indicate clearly (by highlighting) which elements of shkplays.dtd have to be changed and what changes you made.

NOTE: With the possible exception of formatting, you may not make any changes to the .xml "play" files!

You will then write one .xsl file, shkplays.xsl, that, when applied to any of the .xml "play" files will produce the following .xhtml output:

  1. Your name.
  2. The play's name and the number of acts in the play.
  3. Each act of the play and the number of sceenes in that act.
  4. For each act, output each scene number and the description of the scene.

See the screen shot at the end of ths document for a precise output format.

Deliverables:

  1. By noon on Thur, Mar 28, place only your updated shkplays.dtd and your shkplays.xsl files in your drop folder. Do not put the whole project in your folder, since it would take too long to load each of your projects. into Netbeans. Rather, Brayden or I can simple copy your .dtd and .xsl files into a project that we have already created.
  2. Get the output produced by your .xsl file when applied to the following plays: dream.xml, hamlet.xml, macbeth.xml.
  3. Your name, PSU user ID, and the name of the file must appear at the top of each source file that you submit.
  4. Complete one integrity statement for the entire project and date and sign it.
  5. At the beginning of class on Thur ,Mar. 28, turn in well-formatted and readable copies of your integrity statement, the shkplays.dtd and shkplays.xsl files, and the browser outputs specified in step 2, above. Highlight and add brief comments to your chenges in shkplays.dtd.

Screen shot:

screen shot