p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   XSLT (http://p2p.wrox.com/forumdisplay.php?f=86)
-   -   grouping multiple xml files in one file (http://p2p.wrox.com/showthread.php?t=41194)

bcogney April 12th, 2006 11:05 AM

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.

thanks
Bill


saurabh_inblore April 20th, 2006 12:38 AM

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





bcogney April 20th, 2006 02:42 PM

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

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.



bill





mhkay April 21st, 2006 03:58 AM

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
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference


All times are GMT -4. The time now is 07:37 AM.

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