[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] invalid xpath?
The following template errors in xsltproc and XMLSpy but appears to function correctly when run by Saxon. <!-- retain leading and trailing WS, remove line-breaks from the rest --> <!-- special case for initial text, or text following <nl> element, when it starts with a NL --> <xsl:template name="KeepWS"> <xsl:param name="Arg" select="." /> <xsl:variable name="tArg"> <xsl:choose> <xsl:when test="preceding-sibling::*[1][self::nl][starts-with($Arg,'
')]"> <xsl:call-template name="WS"> <xsl:with-param name="Arg" select="substring($Arg,2)" /> </xsl:call-template> </xsl:when> <xsl:when test="not(preceding-sibling::*)[starts-with($Arg,'
')]"> <xsl:call-template name="WS"> <xsl:with-param name="Arg" select="substring($Arg,2)" /> </xsl:call-template> </xsl:when> <xsl:otherwise> <xsl:call-template name="WS"> <xsl:with-param name="Arg" select="$Arg" /> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:variable> <xsl:value-of select="$tArg" /> </xsl:template> The xsltproc error is "XPath error: Invalid type" XMLSpy says "Error in XPath expression, Not a node set" I thought the test expressions are valid v1.0 XSL. Is this not so? Cheers Trevor
|
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
|