You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jose Hernandez <jh...@algorithmics.com> on 2002/07/10 19:14:46 UTC
XML Hierarchy
Hello ...
I'm looking a example for a XML that has an Hierarchy ... This XML look like
that ...
<root>
<portfolio>
<attributes>
...
</attributes>
<positions>
<portfolio>
<attributes>
...
</attributes>
<positions>
.....
</positions>
</portfolio>
</positions>
</portfolio>
</root>
So I don't know how we can use the XSL recurvity.
Do you have any idea ?
Thanks a lot.
//jose.alberto.hernandez.maldonado
System Integrator Engineer.
Algorithmics Mexico.
Tel. 5520-4293
Fax. 5520-4292
e-mail:
jhernan@algorithmics.com
josealbertohm@hotmail.com
Re: XML Hierarchy
Posted by Oleg Tkachenko <ol...@multiconn.com>.
Jose Hernandez wrote:
> I'm looking a example for a XML that has an Hierarchy ... This XML look like
> that ...
>
> <root>
> <portfolio>
> <attributes>
> ...
> </attributes>
> <positions>
> <portfolio>
> <attributes>
> ...
> </attributes>
> <positions>
> .....
> </positions>
> </portfolio>
>
> </positions>
> </portfolio>
> </root>
>
> So I don't know how we can use the XSL recurvity.
You don't have to do anything special, just define templates and let xslt
processor to recur on its own. Only don't forget <xsl:apply-templates/> to
process children nodes.
<xsl:template match="portfolio">
...
<xsl:apply-templates/>
...
</xsl:template>
<xsl:template match="positions">
...
<xsl:apply-templates/>
...
</xsl:template>
P.S. You'd better ask xslt questions at xsl-list
http://www.mulberrytech.com/xsl/xsl-list.
--
Oleg Tkachenko
Multiconn International, Israel