All --

Does anyone know of a way to pass a parameter into an XSL stylesheet
using the <style> task?  I'd like to pass properties defined in the
master build file into those being generated.  For example,

<project name="test" basedir="." default="all">
    <target name="all">
        <mkdir dir="tmp"/>
        <style basedir="." extension=".xml" destdir="tmp"
style="test.xsl">
            <include name="testing.xml"/>
            <param name="project.name"
expression="${ant.project.name}"/>
        </style>
    </target>
</project>

According to the documentation, <style> only accepts XSLT expressions.
Looking at a recent nightly build of 1.4 (maybe a few weeks old now),
the XSLTProcess.java file passes inner class Param elements directly to
the XSLT processor without doing property replacement via
PropertyHandler (?, I think).  What good are parameters passed into an
XSL stylesheet if they can't be dynamic?  Does anyone have any thoughts
on changing this, or would other users of the <style> task prefer
passing raw expressions to the XSLT processor?

Thanks,
Tim

--
Tim Meals
Web Applications Developer

mailto:[EMAIL PROTECTED]
direct:   925-253-6515
fax:      925-253-4599               http://www.intraware.com
operator: 925-253-4500        Intraware ... Control Your Technology

begin:vcard 
n:Meals;Tim
tel;cell:925-381-8780
tel;work:925-253-6515
x-mozilla-html:TRUE
url:http://www.intraware.com
org:<A HREF="http://www.intraware.com";><IMG SRC="http://www.intraware.com/images/tempgifs/logotype.gif"; BORDER="0" WIDTH="145" HEIGHT="34" ALT="Intraware, Inc."><BR CLEAR="left">Intraware, Inc.</A>;eServices
adr:;;25 Orinda Way;Orinda;CA;94563;USA
version:2.1
email;internet:[EMAIL PROTECTED]
title:Web Applications Developer
x-mozilla-cpt:;-31712
fn:Tim Meals
end:vcard

Reply via email to