[xsl] flat xml tree to indent one

Subject: [xsl] flat xml tree to indent one
From: Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>
Date: Tue, 21 Dec 2010 13:30:08 +0100
Hi all,

This is a grouping question one more time.

For such an input :

<p foo="foo_att" bar="bar_att" foobar="foobar_att">my text</p>

I'd like such an output :

<foo><bar><foobar>my text</foobar></bar></foo>

the order foo/bar/foobar isn't important here.
<foobar><bar><foo>my text</foo></bar></foobar> would also be ok.

This should work for any number of attributes (including none)

I can't see a elegant and generic solution right now,
any suggestions would be welcome,


Matthieu Ricaud
Service Livre numirique

Current Thread