Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 13th, 2010, 12: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 01:38 PM.
Reply With Quote
  #2 (permalink)  
Old January 13th, 2010, 12:48 PM
Friend of Wrox
Points: 6,438, Level: 34
Points: 6,438, Level: 34 Points: 6,438, Level: 34 Points: 6,438, Level: 34
Activity: 18%
Activity: 18% Activity: 18% Activity: 18%
 
Join Date: Nov 2007
Location: Germany
Posts: 1,196
Thanks: 0
Thanked 236 Times in 235 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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 05: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 03:48 AM



All times are GMT -4. The time now is 04:42 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.