[Home] [By Thread] [By Date] [Recent Entries]

Subject: Merging common XML tree
From: Mathieu Malaterre <mathieu.malaterre@xxxxxxxxx>
Date: Thu, 8 Jul 2010 11:30:16 +0200
Hi there,

  I am trying to find a solution for the following problem. Let's
assume that my input XML tree looks like:

<dirs>
  <dir name="A">
    <dir name="B">
      <file name="C">
    </dir>
  </dir>
  <dir name="A">
    <dir name="B">
      <file name="D">
    </dir>
  </dir>
</dirs>

and my target output tree should looks like:

<dirs>
  <dir name="A">
    <dir name="B">
      <file name="C">
      <file name="D">
    </dir>
  </dir>
</dirs>

Basically I am trying to represent a dir/file structure in XML, where
I am not allowed to repeat common subdirectory. What XSL function
could I use to do that (XSTL 1.0 if possible).

Thanks !
-- 
Mathieu

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member