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

Re: Processing mutiple files in multiple directories

Subject: Re: Processing mutiple files in multiple directories individually
From: Liam R E Quin <liam@xxxxxx>
Date: Fri, 18 Mar 2011 02:02:27 -0400
Re:  Processing mutiple files in multiple directories
On Thu, 2011-03-17 at 17:00 -0700, Mark wrote:
> I am using XSLT 2.0.
> 
> I have several hundred XML data files stored in a number of directories each 
> with subdirectories of their own that descend to various levels. From them, 
> I need to locate 137 specific files and make editing changes to each. I 
> believe I can write the template that can determine if a specific XML file 
> requires editing or not, and if so to then apply the editing change.

If this happens often, I'd look into using XQuery with updates.

If it's a one-off, or if you want to use XSLT :-), or if it's done often
but the files are new or changed, maybe use lstoxml to make an XML
document that reflects the directory structure, and process that.

You may find it simpler to process all the files and then at the end,
outside XSLT, move the new directory hierarchy into place. That way if
something goes wrong you don't lose data.  Or, you're much less likely
to lose data :-) (especially with a journalling filesystem).

Liam

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.