Hi,
Couple of things, I am using stylesheet v="2.0" with Saxon-B8.5 instead
of version="1.0" and Saxon8.4.
OK, that was an important detail that you left out. This is why including
complete _minimal_ stylesheet can save lots of confusion and bandwidth.
I also tried to transform it with Xalan2.7.0 and get the desired output
as is yours. But I have to use vesrion="2.0" for other stuff in my real
xslt as this one is just an example. Can anyone tell me if this is a
known issue with Saxon-B8.5
xsl:value-of works differently in XSLT 2.0 than it does in 1.0:
http://www.w3.org/TR/xslt20/#value-of
One option is to use backwards-compatible behavior:
http://www.w3.org/TR/xslt20/#dt-backwards-compatible-behavior
another is to ensure you only select one node:
<xsl:template match="/a">
<xsl:value-of select="(b/c[(_at_)type='pdf'][1])[1]" />
</xsl:template>
Note that the following might be what you really want -- it's hard to tell
from your prose description of the problem:
<xsl:template match="/a">
<xsl:value-of select="(b/c[(_at_)type='pdf'])[1]" />
</xsl:template>
Dave
--~------------------------------------------------------------------
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>
--~--