<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:for-each select="//Data/item/*">
<xsl:element name="ns0:GenericDataContainerEntry">
<xsl:element name="ns0:GenericDataContainerEntryIndex">
<xsl:attribute name="value">
<xsl:value-of select="./text()" />
xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="translate(name(.),$smallcase,$uppercase)" />
xsl:attribute>
xsl:element>
xsl:element>
xsl:for-each>
xsl:for-each>
xsl:element>
Do to all nodes
<xsl:for-each select="//Data/item/*">
Copy value
<xsl:value-of select="./text()" />Copy name
<xsl:value-of select="name(.)" />Copy name in upper case in XSLT 1.0 (found it here)
<xsl:variable name="smallcase" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="uppercase" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:value-of select="translate(name(.),$smallcase,$uppercase)" />
No comments:
Post a Comment