You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Conny Kreyßel <Co...@inter-forum.de> on 2000/07/26 15:11:30 UTC
Dynamicly rebuilding a XML-Tree
Hi Cocoon-users,
i have the following problem. I would rebuild a tree on the fly, i have many
things tryed out, but I canot go ahead without your help.
I have the following tree,
<tree>
<entry id="1">
<entry id="A">
<entry/>
<entry id="2">
<entry id="B">
<entry id="I"/>
<entry/>
<entry id="C">
<entry id="J"/>
<entry/>
<entry/>
<entry id="3">
<entry id="D">
<entry/>
</tree>
So far so good.
And now when I would get all Ancestors and all Ancestors childs for <entry
id="I"/>.
The code should now internally only select this tree:
<tree>
<entry id="1"/>
<entry id="2">
<entry id="B">
<entry id="I"/>
<entry/>
<entry id="C"/>
<entry/>
<entry id="3"/>
</tree>
and translate the structure with XSL to an list with <ul> and <li> tags like
this:
<ul>
<li>id="1"
<li>id="2"
<ul>
<li>id="B"
<ul>
<li>id="I"
</ul>
<li>id="C"
</ul>
<li>id="3"
</ul>
Is it possible to make this only with XSL or is it better to translate the
xml-tree with xsp before it with xslt processed?
Can you help me?
Best regards
Conny Kreyßel