You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ron Piterman <rp...@gmx.net> on 2005/08/17 13:54:13 UTC

Passing xsl the xml filename as a parameter.

Hi,
The xslt task has a parameter sub-element. How can I pass the current 
xml file name being processed to the stylesheet?
Cheers,
Ron


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Passing xsl the xml filename as a parameter.

Posted by Steve Loughran <st...@apache.org>.
Dominique Devienne wrote:
>>From: news [mailto:news@sea.gmane.org] On Behalf Of Ron Piterman
>>
>>The xslt task has a parameter sub-element. How can I pass the current
>>xml file name being processed to the stylesheet?
> 
> 
> You can't, AFAIK. Use Ant-Contrib's <for> task to call <xslt> for each
> individual file. Will be slower since will recompile the stylesheet
> everytime, but then you know which (single) file you are processing. --DD
> 

we could maybe enhance xslt to pass that down... patches against 
CVS_HEAD, please

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: Passing xsl the xml filename as a parameter.

Posted by Dominique Devienne <dd...@gmail.com>.
> From: news [mailto:news@sea.gmane.org] On Behalf Of Ron Piterman
> 
> The xslt task has a parameter sub-element. How can I pass the current
> xml file name being processed to the stylesheet?

You can't, AFAIK. Use Ant-Contrib's <for> task to call <xslt> for each
individual file. Will be slower since will recompile the stylesheet
everytime, but then you know which (single) file you are processing. --DD


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org