XSL Issue

wxdqz

New Member
I have XML below

<?xml version="1.0" encoding="ISO-8859-1"?>
<tree>
<tree-node id="123" parent="" expand="true">
<item-data>
<label>2</label>
<menu>one</menu>
<menu>two</menu>
</item-data>
</tree-node>
<tree-node id="565" parent="123" expand="true">
<item-data>
<label>1</label>
</item-data>
</tree-node>
</tree>


I am using the following XSL chunk

<xsl:template match="item-data/*">
<span><xsl:value-of select="label"/>
</span>

<span>
<p><xsl:value-of select="actionName"/></p>
</span>
</xsl:template>

I need following output


<span>2<span>
<span>one</span>
<span>two</span> ---> Not printed

<span>1</span>

If you notice my XSL its not printing 2 menu items for first item-data. For the second item-data there should be no menu displayed.

I would appreciate anyone can help me out.

Thanks,
Sandeep
 
Back
Top