P4 to P5
Sebastian Rahtz
sebastian.rahtz at computing-services.oxford.ac.uk
Tue Nov 25 08:57:17 EST 2003
people may be amused to see how small a p4 to P5 instance converter is,
in XSLT:
<xsl:template match="teiCorpus.2">
<teiCorpus xmlns="http://www.tei-c.org/P5/">
<xsl:apply-templates
select="*|@*|processing-instruction()|comment()|text()"/>
</teiCorpus>
</xsl:template>
<xsl:template match="TEI.2">
<TEI xmlns="http://www.tei-c.org/P5/">
<xsl:apply-templates
select="*|@*|processing-instruction()|comment()|text()"/>
</TEI>
</xsl:template>
<xsl:template match="*">
<xsl:element namespace="http://www.tei-c.org/P5/"
name="{local-name(.)}">
<xsl:apply-templates
select="*|@*|processing-instruction()|comment()|text()"/>
</xsl:element>
</xsl:template>
<xsl:template match="@*|processing-instruction()|comment()">
<xsl:copy/>
</xsl:template>
--
Sebastian Rahtz <sebastian.rahtz at computing-services.oxford.ac.uk>
OUCS
More information about the tei-council
mailing list