|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Selecting the top-most ancestor.
I am wanting the select the top-most ancestor of an element and then be able to process back down the document tree. The basic structure of the document to be processed is as follows:
<system-index-block> <system-folder> <system-page/> <system-page/> </system-folder> <system-folder> <system-folder> <system-page current="true"/> </system-folder> <system-page/> </system-folder> <system-page/> <system-page/> </system-index-block> I can get to the system-page with attribute current set to true. But what do I need to do to get back to the top-most system-folder element that is within root. I used a <xsl:for-each select="ancestor::system-folder"> to produce a bread crumb trail but didn't know how I might be able to limit such a select more to just the ancestor::system-folder whose parent is root/system-index-block... Any Hints? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Selecting the top-most ancestor. |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|