Re: [xsl] Looking for a concise way of specifying an conditional attribute in output

Subject: Re: [xsl] Looking for a concise way of specifying an conditional attribute in output
From: Michael Kay <mike@xxxxxxxxxxxx>
Date: Wed, 04 May 2011 22:27:34 +0100
Because you are using <xsl:value-of/> you are getting the text.

Use <xsl:copy-of/> and you should be fine. That copies the attribute node, not the attribute value, to the option element.


Or indeed <xsl:sequence/>. There's no need to copy the attribute node, the original will do fine (it will get copied anyway as part of the process of attaching it to a new parent).


Michael Kay
Saxonica

Current Thread