![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - RE: Convert attributes to elements and lower case Convert attributes to elements and lower caseTo: NULL Date: 9/5/2007 10:01:00 AM
I have an XML document where, for each node, I want to convert all the
attributes of the node to elements. Also, whenever I have a value of
"True" or "False" for an attribute, I want to convert it to lower case
("true", "false").
This XSLT fragment will convert attributes to elements:
<xsl:template match="/Lenders/LenderEntry">
<LenderEntry xmlns="http://tempuri.org/SecuredLoansDataSet.xsd">
<xsl:for-each select="@*">
<xsl:element name="{name()}">
<xsl:value-of select="."/>
</xsl:element>
</xsl:for-each>
</LenderEntry>
</xsl:template>
Any ideas on how to convert boolean strings to lower case?
Like...
if attribute value == "True" write "true"
if attribute value == "False" write "false"
?
Thanks
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||
|
