Re: [xsl] Processing mutiple files in multiple directories individually

Subject: Re: [xsl] Processing mutiple files in multiple directories individually
From: Dan Vint <dvint@xxxxxxxxx>
Date: Thu, 17 Mar 2011 23:11:24 -0700
Kernow is an easy way to automate a stylesheet. It has the ability to process all the files in a directory and subdirectories.

..dan

At 11:02 PM 3/17/2011, you wrote:
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

--------------------------------------------------------------------------- Danny Vint

Panoramic Photography
http://www.dvint.com

voice: 619-938-3610

Current Thread