[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Extract First node
> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|