Subject: Re: [xsl] element name as attribute value From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx> Date: Tue, 23 Jan 2007 10:04:35 +0000 |
Hi all,
Hope you can help me with this problem (seems easy but somehow i can't figure how to do it :(( ) I have this xml file
<X> <Y/> </X>
I would like to have the output (element Y as attribute value from other element e.g. B)
<A> <B attribute="Y"> </A>
I tried with <xsl:copy-of select="child::node()"/> it worked but only in the element part, can't put it as attribute value. It become like
<A> <Y/> </A>
Really appreciate when someone can help this desperate person.
It's best if you post some code so we can show you exactly how to modify your code, or show you where you are going wrong.
<xsl:template match="Y"> <B attribute="{.}"/> </xsl:template>
...assuming you wan't the value of <Y> and not the element name as the attribute value.
cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] element name as attribute val, San | Thread | Re: [xsl] element name as attribute, George Cristian Bina |
[xsl] element name as attribute val, San | Date | Re: [xsl] element name as attribute, George Cristian Bina |
Month |