|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Transform param name to tagname in uppercase
At 2008-03-01 23:24 +0100, phil.kursawe@xxxxxxxxx wrote:
I have not been in touch with XSLT for a couple of years now and this simple transformation I can not describe in XSLT: You don't say if you are using XSLT 1.0 or 2.0 ... to use 1.0 use the transform() function and values for upper-case and lower-case letters. I hope this helps. . . . . . . . . Ken t:\ftemp>type phil.xml <params> <param name="somename">value</param> </params> t:\ftemp>type phil.xsl <?xml version="1.0" encoding="US-ASCII"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:output indent="yes"/> <xsl:template match="params">
<INPUT>
<xsl:apply-templates/>
</INPUT>
</xsl:template><xsl:template match="param">
<xsl:element name="{upper-case(@name)}">
<xsl:apply-templates/>
</xsl:element>
</xsl:template></xsl:stylesheet> t:\ftemp>xslt2 phil.xml phil.xsl con <?xml version="1.0" encoding="UTF-8"?> <INPUT> <SOMENAME>value</SOMENAME> </INPUT> t:\ftemp>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







