Re: [xsl] Add file name+path to processed document

Subject: Re: [xsl] Add file name+path to processed document
From: Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx>
Date: Mon, 29 Nov 2004 13:01:29 +0200
Robert Soesemann wrote:

Hello,

in my ANT processing pipeline I process a folder structure full of XML
documents. One task is to add the file name and path to each processed
file via XSL. Is there a way to extract the name and path of the
currently processed file from the processor and write it to the output
document. It does not need to be standard XSLT becaused inside ANT I am
able to switch processors.



The style/xslt task accepts parameters via nested elements (see documentation). Just pass the base file path to each transformation. I cannot think of a way to actually pass the file name being processed when dealing with a fileset, but maybe you can get away with the path (after all you probably only change the extention of the file, right?).




hth,


MAnos


Current Thread