 |
 |
 |
Thank you Abel
> [...snip...]
>
> <xsl:when test="not(preceding-sibling::*)[starts-with($Arg,'
')]">
> <xsl:call-template name="WS">
>
> [...snip...]
OK, the foregoing is invalid 1.0. So I tried modifying it to this:
<xsl:when test="not(preceding-sibling::*) and starts-with($Arg,'
')">
<xsl:call-template name="WS">
Now there are no reported errors, but the test appears not to be working (at
least, there is an extra leading space in the output document wherever this
template has been called, compared with what Saxon was producing with the
original test).
Cheers
Trevor
-----Original Message-----
From: Abel Braaksma [mailto:abel.online@xxxxxxxxx]
Sent: Wednesday, 2 July 2008 10:31 p.m.
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] invalid xpath?
Trevor Nicholls wrote:
> The following template errors in xsltproc and XMLSpy but appears to
function
> correctly when run by Saxon.
>
> [...snip...]
>
> </xsl:when>
> <xsl:when test="not(preceding-sibling::*)[starts-with($Arg,'
')]">
> <xsl:call-template name="WS">
>
> [...snip...]
>
> The xsltproc error is "XPath error: Invalid type"
> XMLSpy says "Error in XPath expression, Not a node set"
>
Both xsltproc and XMLSpy are correct: the expression
not(preceding-sibling::*) does not return a node set but a boolean and
the [...] expression behind it can only be executed on a boolean.
Perhaps when you run it with Saxon you run it as XSLT 2.0 which allows
for a predicate expression on a boolean.
> I thought the test expressions are valid v1.0 XSL. Is this not so?
Yes, they are valid.
Cheers,
-- Abel --
PS: sending the line number in your post would make it a bit easier to
find what's wrong. Now we have to go through all lines with an XPath.
|
 | 

|  |
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.
|  |
| |
 |
 |
 |