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.
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format