| Snyder, Christopher My goal with this is to convert an XML doc with upper cased tags (and
attributes) to lower cased tag and attribute combinations.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<!-- Transform a document to itself, lowercasing all tag names -->
<!-- When you match any element -->
<xsl:template match="*">
<!-- Create the same element with a lowercase name -->
<xsl:element name="{translate(name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
'abcdefghijklmnopqrstuvwxyz')}">
<!-- Including any attributes it has and any child nodes -->
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>
|