xsl-list
[Top] [All Lists]

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

2011-05-04 16:27:51

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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--