[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

iterate over a folder and update XML using XSLT

Subject: iterate over a folder and update XML using XSLT
From: a kusa <akusa8@xxxxxxxxx>
Date: Mon, 29 Mar 2010 16:06:18 -0500
 iterate over a folder and update XML using XSLT
Hi

Here is my requirement:

1) Iterate over 100 XML files in a folder.
2) Append a <para> with some content in it to each file.

I have a transformation program and I use saxon's command line to run
the transformation over the group of files.

So I run

java -jar saxon9.jar -s: <here i specify the path to the folder> -o:
<here i specify the outout dir> -xsl:<name of my xsl>

Now since each transformation is individualistic, the problem I am
having is that ever transformed xml output has the content repeated as
many times as the number of input xml files.

So, if I have 10 files in the folder, when I sued <xsl:for-each
select="collection('<path>')">, which by the way takes a long time to
transform, it appends 10 <para> elements to each xml file.

So what is the approach to iterate over folder in XSLT? Or can it be done?

Can the experts please help me understand this?

Thanks in advance.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.