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 Search this Thread Display Modes
  #1 (permalink)  
Old April 12th, 2006, 11:05 AM
Authorized User
 
Join Date: Apr 2006
Location: Raleigh, NC, USA.
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.

thanks
Bill

Reply With Quote
  #2 (permalink)  
Old April 20th, 2006, 12:38 AM
Registered User
 
Join Date: Apr 2006
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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




Reply With Quote
  #3 (permalink)  
Old April 20th, 2006, 02:42 PM
Authorized User
 
Join Date: Apr 2006
Location: Raleigh, NC, USA.
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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 With Quote
  #4 (permalink)  
Old April 21st, 2006, 03:58 AM
mhkay's Avatar
Wrox Author
Points: 18,438, Level: 59
Points: 18,438, Level: 59 Points: 18,438, Level: 59 Points: 18,438, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,954
Thanks: 0
Thanked 290 Times in 285 Posts
Default

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
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
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



All times are GMT -4. The time now is 12:44 PM.


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