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

XPath behaviour

Subject: XPath behaviour
From: Lars Rönnbäck <lars@xxxxxxxxxxx>
Date: Thu, 28 Dec 2006 03:10:35 +0100 (CET)
 XPath behaviour
Dear list,

I am having a problem with an XPath expression. The program I am using is
Stylus Studio 2007 and I am building an XSLT 1.0 stylesheet. Within the
program you have access to an XPath Query Editor. I used that together
with an XML file to build the following:

/calendar/year/month/day[@month = 3 and index =
21]/(.|following::day)[@phase = 2][1]/(.|following::day)[@weekday = 6][1]

This path will correctly find easter when I execute it in the query
editor. However, if I create a simple stylesheet that uses the path in a
<xsl:value-of select="..."> I get a compilation error.

Using the built-in processor I get the message:
Testing.xsl (5, 2): Expected node test in value-of

Using MSXML6 I get the message:
NodeTest expected here.

/calendar/year/month/day[@month = 3 and index =
21]/-->(<--.|following::day)[@phase = 2][1]/(.|following::day)[@weekday =
6][1]

Using Saxon 6.5.5 I get the message:
com.icl.saxon.expr.XPathException: Error in expression
/calendar/year/month/day[@month = 3 and index =
21]/(.|following::day)[@phase = 2][1]/(.|following::day)[@weekday = 6][1]:
Unexpected token [(] in path expression

Using the .NET XslTransform I get the message:
System.Xml.Xsl.XsltException: '/calendar/year/month/day[@month = 3 and
index = 21]/(.|following::day)[@phase = 2][1]/(.|following::day)[@weekday
= 6][1]' is an invalid XPath expression. --->
System.Xml.XPath.XPathException: Expression must evaluate to a node-set.

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-2007 All Rights Reserved.