xsl-list
[Top] [All Lists]

Re: [xsl] collection issue, update/rename file

2012-02-29 05:04:39
On 29 February 2012 11:02,  <davep(_at_)dpawson(_dot_)co(_dot_)uk> wrote:
input a directory full of .xml files

running a transform to modify one element, identity
transform for the rest.

(Yes, I have created a backup)

I want to
process A.xml, write out A.xml ... somehow
(no I'm not on Linux to make it easy)

I'm using
 <xsl:for-each select="collection('file:///Long-path?select=*.xml')">
 <xsl:result-document
       href="???"
       method="xml"
       encoding="utf-8"
      indent="yes">

       <xsl:apply-templates/>


base-uri(.) returns the full pathname of the source document?
Do I have to work with that to obtain A.xml?
 (text processing....)
Is there some way I can obtain the filename.extn?

1. use Kernow :)

or

2. use tokenize(document-uri(.), '/')[last()]


-- 
Andrew Welch
http://andrewjwelch.com

--~------------------------------------------------------------------
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>
--~--


<Prev in Thread] Current Thread [Next in Thread>