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

RE: get immediat preceeding node, if it is a comment

Subject: RE: get immediat preceeding node, if it is a comment
From: "Andrew Welch" <awelch@xxxxxxxxxxxxxxx>
Date: Fri, 4 Oct 2002 15:16:31 +0100
RE:  get immediat preceeding node
DC:
> All later predicates refer to nodes for which earlier predicates are
> true.

That sums it up nicely,

cheers
andrew

> -----Original Message-----
> From: David Carlisle [mailto:davidc@xxxxxxxxx]
> Sent: 04 October 2002 14:25
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  get immediat preceeding node, if it is a comment
> 
> 
> 
> > It seems that any predicates after the positional predicate refer to
> > that node, not to the node that the predicates before the positional
> > predicate refer to... 
> 
> yes but that's a special case. You can have any number of [] 
> predicates
> in a step and after each one the remaining nodes in the current node
> list are those nodes for which the predicate was true.  while 
> evaluating
> the next [] position() and last() and count() all refer to the current
> node list (ie the list of nodes that have survivied any previous []
> predicates in the step)
> 
> 
> > preceding-sibling::node()[normalize-space()][1][self::comment()]
> > 
> > this gets 'test1' and 'test3' as we would expect
> 
> anything that involves [1] (anywhere) will select a node set 
> of at most
> one node. Your description in english suggests you used the expression
> 
> */preceding-sibling::node()[normalize-space()][1][self::comment()]
> 
> while <root> is your current node.
> 
> ie find all children that have the stated condition.
> 
> > So is it the case that all predicates to the right of the positional
> > predicate refer to that node? (they change the context node)
> 
> Yes but there is nothing special about the positional predicate it is
> just shorthand for the boolean test [position()=1].
> All later predicates refer to nodes for which earlier predicates are
> true.
> 
> David
> 
> _____________________________________________________________________
> This message has been checked for all known viruses by Star Internet
> delivered through the MessageLabs Virus Scanning Service. For further
> information visit http://www.star.net.uk/stats.asp or 
> alternatively call
> Star Internet for details on the Virus Scanning Service.
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 
> 
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002
>  
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.394 / Virus Database: 224 - Release Date: 03/10/2002
 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.