oXygen XML editor comes with a set of TEI XSL stylesheets that can be modified to meet individual needs. You have to know a few things to be able to do it, however; things which I tend to forget again and again.
In oXygen 14, TEI XSL stylesheets (e. g. for transforming to XHTML) are here:
Oxygen XML Editor 14/frameworks/tei/xml/tei/stylesheet/xhtml2/tei.xsl
Files that contain instructions to be modified have to be imported; local information (e. g. language specific) will be included:
<xsl:import href="/home/neven/Oxygen XML Editor 14/frameworks/tei/xml/tei/stylesheet/xhtml2/tei.xsl"/> <xsl:include href="/home/neven/trunk/croala-code/xsl/i18n.xsl"/> <xsl:include href="croala-param.xsl"/>
Transform element supplied
to a span class=“supplied”
:
<xsl:template match="tei:supplied"> <span class="supplied"> <xsl:apply-templates/> </span> </xsl:template>
Conditional transformation: transform element pb
to a link only if it has a @facs
attribute; use the value of @facs
to build a hyperlink:
<xsl:template match="tei:pb[@facs]"> <xsl:element name="a"> <xsl:attribute name="href"> <xsl:value-of select="@facs"/> </xsl:attribute> <xsl:text>[ Facsimile pag. </xsl:text><xsl:value-of select="@n"/><xsl:text> ]</xsl:text> </xsl:element> </xsl:template>