This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: XPath selection using //


>>   Attribute a of the following m is: <xsl:value-of
>>select="following::m/@a"/>
>> </xsl:template>
>>
>>The 'following-sibling' axes will only match nodes of the same depth 
>>of the xml document. 
>
>Somehow I've managed not to see the "following" axis in the
documentation.
>It's working perfectly now.


note there's a big difference between the following:: axis and the
following-sibling:: axis


>'following-sibling' axes will only match nodes of the same depth 

following-sibling will select all the nodes that appear after the origin
node in document order, with the same parent, not nodes of the same
depth in the tree (which could have different parents)

Mike Kays book has some nice diagrams on pages 364-367 (2nd ed) to help
you visualise this

cheers
andrew


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.373 / Virus Database: 208 - Release Date: 01/07/2002
 

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]