[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xsl] ancestor axis order
Subject: RE: [xsl] ancestor axis order From: David.Pawson@xxxxxxxxxxx Date: Wed, 5 May 2004 08:29:37 +0100 |
DC | 'Jeni' said: > and it works. don't sound so surprised:-) ..... errr, How'dya know that :-) ancestor::* is all the ancestor element nodes, and within this step (only) they will be ordered in reverse document order. as ancestor is a reverse axis. "this step" means up to the end of the expression or to the next / , predicates in [] are part of the step. with the expression ancestor::*[self::define or self::choice][1][self::choice] there are no 'nested' predicates, hence its a single step. I.e. the step is all in reverse document order. [self::define or self::choice] this is a boolean valued predicate so after evaluating this, the current node list just consists of nodes for which the predicate is true, ie define or choice elements. [1] This is a numeric valued predicate so is [positon()=1] and as we are in a reverse axis step this is true for just the innermost element in the current node list ie the innermost define or choice Innermost being the node closest to 'ref' element, further away from the root. [self::choice] This is a node-set predicate so is true just if the node set is non-empty: it will be non-empty if the single node which got past the [1] is a choice and false otherwise, so it is true just if the innermost define-or-choice element is a choice. Jeni Many thanks David. Excellent. Watch him Jeni (the real one :-) He'll be usurping your clarity crown! regards DaveP -- DISCLAIMER: NOTICE: The information contained in this email and any attachments is confidential and may be privileged. If you are not the intended recipient you should not use, disclose, distribute or copy any of the content of it or of any attachment; you are requested to notify the sender immediately of your receipt of the email and then to delete it and any attachments from your system. RNIB endeavours to ensure that emails and any attachments generated by its staff are free from viruses or other contaminants. However, it cannot accept any responsibility for any such which are transmitted. We therefore recommend you scan all attachments. Please note that the statements and views expressed in this email and any attachments are those of the author and do not necessarily represent those of RNIB. RNIB Registered Charity Number: 226227 Website: http://www.rnib.org.uk
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] ancestor axis order, David Carlisle | Thread | Re: [xsl] ancestor axis order, David Carlisle |
RE: [xsl] XSL-output for xml withou, Kenny Akridge | Date | Re: [xsl] ancestor axis order, David Carlisle |
Month |