Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Extract First node

From: david_n_bertoni@----------
To:
Date: 9/2/2005 6:17:00 AM
> 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[@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[@type='pdf'])[1]" />
</xsl:template>

Dave


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent