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 April 12th, 2006, 11:05 AM
Authorized User
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default grouping multiple xml files in one file

I am trying to merge thousands of article into one xml file. each of the articles is only one line, and they are organized in folders.
for example, folder A has (1.xml, 2.xml, 3.xml...50.xml) and
folder C(has weather51.xml, travel52.xml...etc).
any help/ideas/suggestions/existing stylesheet that handles similar cases would be very helpful.


Old April 20th, 2006, 12:38 AM
Registered User
Join Date: Apr 2006
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

Could u please post the input & output xml file...

Old April 20th, 2006, 02:42 PM
Authorized User
Join Date: Apr 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts

the input files have an XML file with a header and an article:
<?xml version="1.0" ?>
<!DOCTYPE article SYSTEM "article_demo.dtd">
<article><para>whatever the article says</para></article>

This XML file is in a folder which is a subfolder of another folder.
what I am trying to do is remove the header from each article and put the article content from all article XML files into one file ordered alphebatically.


Old April 21st, 2006, 03:58 AM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

Saxon's implementation of the XSLT 2.0 collection() function allows you to retrieve all the XML files in a directory structure. There's nothing equivalent to this in XSLT 1.0. You could write a shell script that creates an XML document containing a list of the files to be processed, and your transformation could then access these files using the document() function.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference

Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple input xml / get data from other xml file elayaraja.s XSLT 3 July 25th, 2008 06:59 AM
One XML to Multiple XML file dineshrout XSLT 3 May 11th, 2006 12:24 PM
Problem to create an xml file from two xml files saurabh_inblore XSLT 1 April 12th, 2006 02:58 AM
Multiple XML files matched with common Number Id gurbani XSLT 3 June 23rd, 2004 05:58 AM
Merge XML files into a xml file using xslt lxu XML 4 November 6th, 2003 06:01 PM

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