cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Conny Kreyßel <Conny.Kreys...@inter-forum.de>
Subject Dynamicly rebuilding a XML-Tree
Date Wed, 26 Jul 2000 13:11:30 GMT
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

Mime
View raw message