[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: invalid xpath?

Subject: Re: invalid xpath?
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 02 Jul 2008 12:30:59 +0200
Re:  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,'&#x0a;')]">
    <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.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.