You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Robert r. Sanders" <ro...@ipov.net> on 2005/11/08 20:43:29 UTC
XSLT Param from ANT Property.
I'm using ANT 1.6.5; Java 1.5.0_04; Win 2000 sp4.
I'm using the XSLT task from within ANT; and can't seem to get the
<param ... /> parameter to work as it seems it should. After trying to
look it up I haven't been able to find anything useful in explaining
it. Basically I have:
<xslt in="Input.xml"
out="Output.xml"
style="Transform.xsl">
<!-- the inputs are from the "version.properties" file
created in the "init" task. -->
<param name="variable1" expression="${props.prop1}"/>
<param name="variable2" expression="${props.prop2}"/>
</xslt>
When I open the output xml; the params have been set to the strings
"props.prop1" and "props.prop2" instead of the runtime values. Am I
doing something wrong? Any help would be very useful.
Thanks.
--
Robert r. Sanders
Chief Technologist
iPOV
(334) 821-5412
www.ipov.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: XSLT Param from ANT Property.
Posted by Dominique Devienne <dd...@gmail.com>.
> Ok, I think the issue was that I had fixed my ANT file (which had been
> setting the param incorrectly) but there was some kind of up-to-date
> check, and since neither the source XML nor the XSLT files had changed
> the output xml wasn't getting regenerated.
Right. <xslt> does a timestamp check. Use the force attribute to bypass it. --DD
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: XSLT Param from ANT Property.
Posted by "Robert r. Sanders" <ro...@ipov.net>.
Ok, I think the issue was that I had fixed my ANT file (which had been
setting the param incorrectly) but there was some kind of up-to-date
check, and since neither the source XML nor the XSLT files had changed
the output xml wasn't getting regenerated.
Dominique Devienne wrote:
>> I'm using the XSLT task from within ANT; and can't seem to get the
>> <param ... /> parameter to work as it seems it should.
>>
>> When I open the output xml; the params have been set to the strings
>> "props.prop1" and "props.prop2" instead of the runtime values. Am I
>> doing something wrong? Any help would be very useful.
>>
>
> This works fine for me (using properties in expression. see below for
> an example). Try doing an echo of the properties before <xslt>, as in
>
> <echo>props.prop1 = ${props.prop1}</echo>
>
> --DD
>
> <style in="${javadocs}/index2.xml" out="${javadocs}/index.html"
> style="config/javadocs-index.xsl">
> <param name="cycletitle" expression="${cycletitle}" />
> </style>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
Robert r. Sanders
Chief Technologist
iPOV
(334) 821-5412
www.ipov.net
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: XSLT Param from ANT Property.
Posted by Dominique Devienne <dd...@gmail.com>.
> I'm using the XSLT task from within ANT; and can't seem to get the
> <param ... /> parameter to work as it seems it should.
>
> When I open the output xml; the params have been set to the strings
> "props.prop1" and "props.prop2" instead of the runtime values. Am I
> doing something wrong? Any help would be very useful.
This works fine for me (using properties in expression. see below for
an example). Try doing an echo of the properties before <xslt>, as in
<echo>props.prop1 = ${props.prop1}</echo>
--DD
<style in="${javadocs}/index2.xml" out="${javadocs}/index.html"
style="config/javadocs-index.xsl">
<param name="cycletitle" expression="${cycletitle}" />
</style>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org