To follow up on today’s (Wednesday, 2020-03-04) in-class activity, I’ve completed the XSLT to create a reading view of Hamlet and posted it on Obdurodon at http://dh.obdurodon.org/bad-hamlet.xsl. The output of the transformation is at http://dh.obdurodon.org/bad-hamlet.xhtml. If you’d like, you can download the XSLT and run the transformation yourself to recreate the HTML output.
The XSLT includes comments that explains how it works, and it uses a couple of features we haven’t discussed previously: <xsl:if> (which is part of the reading for tonight) and <xsl:next-match> (which you can read about in Michael Kay, pp. 399–402).
I’ve embedded a small amount of CSS in the HTML, as a <style> child of the HTML <head>. In Real Life I would put the CSS in a separate file and link to it, but since the focus of this exercise is XSLT, and not web development, it seemed more convenient to keep everything together.
To follow up on today’s (Wednesday, 2020-03-04) in-class activity, I’ve completed the XSLT to create a reading view of Hamlet and posted it on Obdurodon at http://dh.obdurodon.org/bad-hamlet.xsl. The output of the transformation is at http://dh.obdurodon.org/bad-hamlet.xhtml. If you’d like, you can download the XSLT and run the transformation yourself to recreate the HTML output.
The XSLT includes comments that explains how it works, and it uses a couple of features we haven’t discussed previously:
<xsl:if>
(which is part of the reading for tonight) and<xsl:next-match>
(which you can read about in Michael Kay, pp. 399–402).I’ve embedded a small amount of CSS in the HTML, as a
<style>
child of the HTML<head>
. In Real Life I would put the CSS in a separate file and link to it, but since the focus of this exercise is XSLT, and not web development, it seemed more convenient to keep everything together.