[tei-council] P4toP5 stylesheet generates invalid P5

Lou Burnard lou.burnard at retired.ox.ac.uk
Wed Jun 27 07:44:43 EDT 2012


I just noticed that we have introduced some schema breaking changes in 
P5 AFTER the P4toP5 stylesheet was last updated. The only one I've 
noticed so far is the way <index> works [see below] but there may well 
be others.

At present the stylesheet leaves things like <index level1="Here be 
dragons"/> alone, instead of turning them to <index 
indexName="level1"><term>here be dragons</term></index> (or whatever) -- 
which is invalid P5 because there is no attribute "level1"

I added this template to my local copy, but thought I should check here 
before updating the source in svn at P4toP5/p4top5.xsl


<xsl:template match="index">
<index indexName="level1">
<xsl:value-of select="@level1"/>
<xsl:if test="@level2">
<index indexName="level2">
<xsl:value-of select="@level1"/>
<xsl:if test="@level3">
<index indexName="level3">
<xsl:value-of select="@level1"/>
</index></xsl:if>
</index></xsl:if>
</index>
</xsl:template>
</xsl:stylesheet>


More information about the tei-council mailing list