|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Node Position & Relationship!
Given the following xml structure, I want to create an xsl if element that
tests the current node to see if it is a level 0 tree_node element.
<?xml version="1.0"?>
<tree>
<tree_node id="7" value="Test">
<tree_node id="8" value="Test Sub"/>
<tree_node id="9" value="Test Sub One">
<tree_node id="10" value="Test Sub Two"/>
</tree_node>
</tree_node>
</tree>
Here is my attached, pretty sad!!!!!
<xsl:if test="{count(self::*)=1}">
<xsl:apply-templates select="tree_node"/>
</xsl:if
Can someone give me the correct way to achieve this.
Also how can I found out if a particular node is a child, ancestor or peer
Of any given node.
Thanks to anyone who response, muchly appreciated.
Cheers,
Adam
NB: "Pray as if everything depended upon God and work as if everything
depended upon man."
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








