[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: From filepaths to XML hierarchy
Jesper Tverskov wrote:
Let us reduce the problem to the following input file: <x> <a><b><c/></b></a> <a><b><d/></b></a> <a><b><e/></b></a> <h><i/></h> <h><j/></h> </x> Try <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="*"> <xsl:param name="group" select="*"/> <xsl:copy> <xsl:for-each-group select="$group" group-by="node-name(.)"> <xsl:apply-templates select="."> <xsl:with-param name="group" select="current-group()/*"/> </xsl:apply-templates> </xsl:for-each-group> </xsl:copy> </xsl:template> </xsl:stylesheet> although I am not sure I have understood completely what you want to achieve. -- Martin Honnen --- MVP Data Platform Development http://msmvps.com/blogs/martin_honnen/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|