This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Not parsing sub-nodes
- To: xsl-list at lists dot mulberrytech dot com
- Subject: [xsl] Not parsing sub-nodes
- From: "Roshan Sharma" <roshansharma at hotmail dot com>
- Date: Fri, 09 Mar 2001 07:15:40
- Reply-To: xsl-list at lists dot mulberrytech dot com
Scenario: A company can have many offices and branch companies
Each brach can have 0+ offices and their brach companies
Basically it is a tree, and I want to print its elements.
And the xsl given below fails. I am trying to have multiple nodes
which may have multiple children. Basically it works for company uno and its
office location, and there it stops!
Thanks in advance,
Rosh
Here is the xml:
<company name="Uno" >
<office location="nyc" rent="2000"/>
<company name="Dos"/>
<company name="Tres"/>
<company name="Quatro">
<office location="paris" rent="2500"/>
</company>
</company>
------- xsl -------
<xslt:transform xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="/*">
<xsl:value-of select="."/>
<xsl:for-each select="company">
<xsl:apply-templates select="company"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="office">
<xsl:value-of select="."/>
<xsl:apply-templates select="office"/>
</xsl:template>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list