xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Correction: Return Ancestor Nodes Children!


Subject: [xsl] Correction: Return Ancestor Nodes Children!
From: "Adam J Knight" <adam@xxxxxxxxxxxxxxxxx>
Date: Sat, 19 Feb 2005 01:43:15 +1000

Correction to previous post.

Hi guys,

Another chapter in this tragedy.

Question: 

The expression '//tree_node[@id=9]/ancestor::tree_node' returns a nodeset
containing node with id(7) (its ancestor). I have verified this with xpath
visualizer.

How do I return the ALL children of this node also.

The result being
Node(id=7)(ancestor)
Node(id=8) : child of Node(id=7)
Node(id=9) : child of Node(id=7)
Node(id=14) : child of Node(id=7)

HELP APPRECIATED!!!!

ALL TO0 FAMILIAR XML STRUCTURE:
<tree>
  <tree_node id="7" value="Test Level One A">
    <tree_node id="8" value="Test Level Two A"/>
    <tree_node id="9" value="Test Level Two B">
      <tree_node id="11" value="Test Level Three B"/>
      <tree_node id="10" value="Test Level Three A">
        <tree_node id="12" value="Test Level Four A"/>
        <tree_node id="13" value="Test Level Four B"/>
      </tree_node>
    </tree_node>
    <tree_node id="14" value="Test Level Two C"/>
  </tree_node>
</tree>

Cheers, 
Adam 
 
NB: "Pray as if everything depended upon God and work as if everything
depended upon man."


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor