Subject: Re: [xsl] Merging multiple documents and combining their nodes From: "Mark Peters" <flickrmeister@xxxxxxxxx> Date: Wed, 13 Jun 2007 10:13:35 -0400 |
Thanks for the suggestion. My team's currently limited to XSLT 1.0, using Apache Xalan-J 2.6.0.
Regards, Mark
Are you constrained to XSLT 1.0? If you can use 2.0, it's simple:
<xsl:variable name="docs" select="document(('file1.xml', 'file2.xml', 'file3.xml'))"/> <xsl:variable name="comps" select="$docs/components/component"/>
<components> <xsl:for-each-group select="$comps" group-by="@name"> <component name="{current-grouping-key()}" description="{@description}">\\\ <xsl:copy-of select="current-group()/*"/> </component> </xsl:for-each-group> </components>
Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Merging multiple document, Michael Kay | Thread | Re: [xsl] Merging multiple document, David Carlisle |
RE: [xsl] Calculating cumulative va, Simon Shutter | Date | Re: [xsl] Merging multiple document, David Carlisle |
Month |