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

Re: AW: AW: use preceding element or self

Subject: Re: AW: AW: use preceding element or self
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 29 Apr 2005 11:06:45 +0100
Re: AW: AW:  use preceding element or self
> Works well in the XMLSpy Xpath Evaluator, but Saxon8.2 is not giving me
> the right values back.

Does xmlspy do xpath2? (Also saxon8.2 is implementing an older draft of
xslt2, 8.4 implements the current draft)

Note also that the second [1] is not doing anything here

[not(contains(text()[1],','))[1]]

not(contains(text()[1],',')) is a sequence of exactly one boolean value,
true or false so [1] is selecting the first item from a sequence of one.

Also you've dropped (.| from the beginning of the expression so uou are
just testing preceding siblings, not the current node, in which case you
can more simply write


(preceding::par[@class='Komm_H3'])[text()[1][normalize-space()]][not(con
tains(text()[1],','))[1]][last()]

as

preceding::par[@class='Komm_H3'][text()[1][normalize-space()]][not(con
tains(text()[1],','))[1]][1]

> Seems to be a Saxon issue.

Hmm 99 times out of 100 I'd believe saxon (especially if 8.4 gives the
same result) Can you make a smaller example (6 or 7 line) and a small
complete stylesheet that does the wrong thing? and post the input and
output you get?

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.