Subject: Re: [xsl] I need advice on building an XSL stylesheet From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 05 Mar 2009 14:45:10 -0500 |
I have the following XML code:
...
I am new to XSL and have been playing around with its syntax to modify (add) prefixes,
<xsl:template match="x"> <xsl:element name="new:x" namespace="urn:x-new-namespace"> ....
<xsl:template match="*"> <xsl:element name="new:{local-name(.)}" namespace="urn:x-new-namespace"> ....
trying to design a stylesheet that will transform the above XML code to the following output (note the prefixes added to certain nodes):
<xsl:template match="a | b | c | d"> <xsl:element name="new:{local-name(.)}" namespace="urn:x-new-namespace"> ....
I have not been successful in any attempt to add those prefixes to the XML output, and would like feedback on how to design such a style sheet that will enable me to accomplish my goal. I am using XSL version 1.0.
-- XQuery/XSLT training in Prague, CZ 2009-03 http://www.xmlprague.cz Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] I need advice on building an , D P | Thread | Re: [xsl] Effects of white space be, Nat Wilson |
[xsl] I need advice on building an , D P | Date | Re: [xsl] Grouping based on key res, Ganesh Babu N |
Month |