For this project, you are to create two XSLT transformations for the custom XML markup that you created in the first midterm project.
One transformation should convert your XML to HTML, suitable for display
on a desktop machine (i.e., it should use colors, lists, and possibly tables).
The second transformation should convert your XML
to text that would be suitable as an email message. Use
<xsl:output method="text"/>
to get plain text output.
You must use the following in your transformations:
<xsl:apply-templates select="..."/>
s
in each transformation.select
s must use at least one axis other than the
child::
axis, and must use at least one predicate.<xsl-if>
or <xsl-choose>
.<style>
element) in the head of your
output document, so that the output looks nicely formatted. You don’t need
to use classes in the stylesheet.The HTML transformation must be reasonable and non-trivial. “Reasonable”
means that the output must make sense—you can’t just throw the
source elements to the output document in random order. “Non-trivial” means that
there is some amount of structure to the output; you must do more than just dumping
all the text into a
single <p>
element. You may make as complex a transformation as you wish,
but it is suggested that you do not bite off more than you can chew.
The transformation to text must be reasonable.
You must provide a document (as a text or HTML file; no RTF or Microsoft Word documents, please) that describe purpose of the resulting HTML and text file. This document does not need to be more than one or two paragraphs. Example:
The first transformation, eisenberg_d_m1.xslt, takes the movie database file and creates an HTML file that lists (by actor name) the actors and the movies that they were in. The second transformation, eisenberg_d_m2.xslt, takes the movie database file and produces a text file listing the directors and their movies, along with the movie rating as a numeric code.