xml editor

Supported platforms

Compatible with Windows7 & Mac OS X Snow Leopard

Ready for data server software
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] most efficient flat file listing to hierarchical


Subject: [xsl] most efficient flat file listing to hierarchical
From: James Fuller <jim.fuller@xxxxxxxxxxxxxx>
Date: Thu, 11 Jan 2007 09:52:53 +0100

Hello All,

Can anyone propose a pure xslt (1 or 2) solution to transforming the following flat xml structure of directory paths into a hierarchical (nested) xml.

<?xml version='1.0'?>
<listing>
<item>cn/test.xml</item>
<item>en</item>
<item>en/test.html</item>
<item>en/test1.html</item>
<item>en/resource</item>
<item>en/resource/style</item> <item>en/resource/style/test.css</item>
<item>favicon.ico</item>
<item>cn</item>
</listing>


to


<dir> <file name="favicon.ico"/> <dir name="cn"> <file name="test.xml"/> </dir> <dir name="en"> <file name="test.html"/> <file name="test1.html"/> <dir name="resource"> <dir name="style"> <file name="test.css"/> </dir> </dir> </dir> </dir>

thx in advance.

cheers, Jim Fuller


Current Thread
Keywords
XML Editor | XML Author | WYSIWYG Editors | Schema Editor | XSD Documentation | XSL/XSLT Editor | XQuery | XML Databases | SVN Client
© 2002-2011 SyncRO Soft Ltd. All rights reserved. | Sitemap | Privacy Policy | This website was created & generated with <oXygen/>®XML Editor