xsl-list
[Top] [All Lists]

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

2011-03-18 01:02:59
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



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--