Id-to-xml-id.xslt

This stylesheet changes id= attributes to xml:id= attributes, except when on, in which case they become ident= attributes. That is all. 



    WARNING: deleting the existing xml:id= attribute of &lt; id=>.      <xsl:text>ident</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>xml:id</xsl:text> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:attribute name="{$newIDattr}"> <xsl:value-of select="@id"/> </xsl:attribute> <xsl:copy-of select="attribute::*[not(name='id') and not(name='xml:id')]"/> <xsl:apply-templates select="./*|./text|./processing-instruction|./comment"/> </xsl:element> </xsl:template> </xsl:stylesheet>

Syd 06:52, 26 May 2006 (BST)