Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 13th, 2010, 01:44 PM
Registered User
 
Join Date: Jan 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Small XML to largs

How to merge to XMLs using xsl?

Last edited by nzvtvsky9; January 13th, 2010 at 02:38 PM..
 
Old January 13th, 2010, 01:48 PM
Friend of Wrox
 
Join Date: Nov 2007
Posts: 1,243
Thanks: 0
Thanked 245 Times in 244 Posts
Default

With XSLT 2.0 you can use grouping along these lines
Code:
<xsl:template match="/">
  <xsl:for-each-group select="class/student" group-by="cours">
    <xsl:result-document href="{current-grouping-key()}.xml">
       <cours>
         <xsl:copy-of select="current-group()"/>
       </cours>
    </xsl:result-document>
  </xsl:for-each-group>
</xsl:template>
Untested but should give you an idea.
__________________
Martin Honnen
Microsoft MVP (XML, Data Platform Development) 2005/04 - 2013/03
My blog





Similar Threads
Thread Thread Starter Forum Replies Last Post
Split xml file with result document and javax.xml.transform.Transformer. nisargmca XSLT 3 January 12th, 2010 06:26 AM
Bulk uploading a large xml file into single column in table arul1984 SQL Server 2000 1 March 13th, 2009 05:15 AM
Strategies for large XML files asearle XSLT 7 September 28th, 2006 02:38 AM
Split large file to chunks eelisMX Pro VB.NET 2002/2003 4 February 8th, 2005 04:48 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.