[Home] [By Thread] [By Date] [Recent Entries]
Lars,
It could be that the query editor supports XPath 2.0, or if not some extended variant of XPath. Your expression looks okay in XPath 2.0 but not in XPath 1.0 (a considerably more limited expression language), hence the error. Unfortunately, the limitation here is that you can't group a step in XPath 1.0 -- although you can (thankfully) use a predicate (the bracketed expression) on a group. So your only choices are (1) to expand your XPath, (2) to refactor it (the XPath or, sometimes better, the data), or (3) to break it out using variables (or some combination of these). I'd probably do something like this: <xsl:variable name="the-day" select="/calendar/year/month/day[@month = 3 and index = 21]"/> <xsl:variable name="first-phase2-day" select="($the-day | $the-day/following-sibling::day)[@phase = 2][1]"/> <xsl:variable name="first-phase2-day6"
select="($first-phase2-day | $first-phase2-day/following-sibling::day)
[@weekday = 6][1]"/>Note: I've used the following-sibling:: axis. I'm guessing that your use of the following:: axis is a bug waiting to happen (although without seeing your data I can't say for sure). Please check the difference and use the better choice (perhaps keeping in mind that the following:: axis will look all the way forward through the document, and thus may cost microseconds even when it isn't just wrong). I hope this helps. Cheers, Wendell At 09:10 PM 12/27/2006, you wrote: Dear list, ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|

Cart



