Subject: grouping multiple xml files in one file
Posted By: bcogney Post Date: 4/12/2006 11:05:42 AM
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

Reply By: saurabh_inblore Reply Date: 4/20/2006 12:38:35 AM
Could u please post the input & output xml file...




Reply By: bcogney Reply Date: 4/20/2006 2:42:41 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




Reply By: mhkay Reply Date: 4/21/2006 3:58: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

Go to topic 43220

Return to index page 308
Return to index page 307
Return to index page 306
Return to index page 305
Return to index page 304
Return to index page 303
Return to index page 302
Return to index page 301
Return to index page 300
Return to index page 299