Subject: Re: [xsl] Wrapping an element in front of many other elements From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Thu, 07 May 2009 19:29:45 +0200 |
I tried a couple of things (looked online and such), but ended up getting more confused. I want insert <xxx> before the <afi> element. There are many elements prior to the element closing. This sounds simple, but newbie-ness is getting in the way.
before: <afi><fault fcode="xx-xx-xxx"/><describe><fdesc>xxx</fdesc></describe></afi>
after: <afi><xxx><fault fcode="xx-xx-xxx"/><describe><fdesc>xxx</fdesc></describe><xxx></afi>
<xsl:template match="afi"> <xsl:copy> <xxx> <xsl:apply-templates/> </xxx> </xsl:copy> </xsl:template>
<xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template>
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Wrapping an element in front , Douglas Wade | Thread | Re: [xsl] Wrapping an element in fr, Douglas Wade |
[xsl] Wrapping an element in front , Douglas Wade | Date | Re: [xsl] Wrapping an element in fr, Douglas Wade |
Month |