RE: preceding axis and context switching (was re: con
> Actually, I wasn't understanding how the preceding axis was working, > nor exactly how your posted code. So I left out the position > conditional, which was the problem. This works: > > <xsl:function name="bib:ibid" as="xs:boolean"> > <xsl:param name="citation" as="node()"/> > <xsl:value-of select="$citation/db:biblioref/@linkend = > $citation/preceding::db:biblioref/@linkend"/> > </xsl:function> > You should follow the advice to use xsl:sequence xsl:value-of creates a text node containing the string "true" or "false", which by virtue of the as="xs:boolean" is then cast to the boolean true() or false(). Using xsl:sequence would avoid this. Saxon isn't yet smart enough to avoid the round trip from a boolean to a text node and back again. It does in fact round trip correctly, because xs:boolean("false") unlike fn:boolean("false") is false. Michael Kay http://www.saxonica.com/
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