You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Clay Leeds <cl...@medata.com> on 2003/10/09 18:50:03 UTC
Passing parameters from Command Line
IIRC, there is currently no way to pass parameters to the XSL-FO or XSL
via FOP from the command line.
EXAMPLE
=======
fop.sh color=blue&date=%DATE% -xml xml-file.xml -xsl xsl-file.fo -print
If this were possible, I could get pass such useful items as the current
date, or a color or some other parameter that could be introduced *at
run-time* to the XSL transformation.
My question is: Is this type of control planned as an option from the
COMMAND LINE for fop-1.0Dev (TRUNK)?
Thanks!
Web Maestro Clay
Re: Passing parameters from Command Line
Posted by Clay Leeds <cl...@medata.com>.
Glen Mazza wrote:
> We may be able to add a working "setParameter()" to
> the new XSLTInputHandler--which could then be used
> internally for command line parameter parsing--but I
> hate strengthening that wrapper because embedded users
> might use it, hence running away from JAXP, something
> I would much rather they become proficient in.
>
> Still, we'll probably need to provide this in 1.0 for
> CL users.
>
> But to help embedded users, I think the
> examples/embedding/java/embedding/ExampleXML2PDF.java
> example needs updating to show a simple JAXP
> addParameter() call. Patches welcome, Clay... :)
>
> Glen
>
> --- Clay Leeds <cl...@medata.com> wrote:
>>IIRC, there is currently no way to pass parameters
>>to the XSL-FO or XSL
>>via FOP from the command line.
>>
>>EXAMPLE
>>=======
>>fop.sh color=blue&date=%DATE% -xml xml-file.xml -xsl
>>xsl-file.fo -print
I really doubt you want me to provide patches for anything other thatn
web stuff. I mean, when I started at buy.com as a front-end web
developer, they had me _committing_ ASP code into production on the 2nd
day. The scary part is that I'd never (never!) done any ASP before I got
that job! Fools! Anyway, I wouldn't know where to start. I would hope
that the implementation of this feature should definitely have the
ability to parse a little, so multiple paramters can be passed as in my
EXAMPLE above (e.g., color=blue&date=%DATE%&clay=cool&fop=bitchin).
Aside fromthe occassional feature requests and web site fixes, I don't
what I would PATCH...
:-P
Re: Passing parameters from Command Line
Posted by Glen Mazza <gr...@yahoo.com>.
We may be able to add a working "setParameter()" to
the new XSLTInputHandler--which could then be used
internally for command line parameter parsing--but I
hate strengthening that wrapper because embedded users
might use it, hence running away from JAXP, something
I would much rather they become proficient in.
Still, we'll probably need to provide this in 1.0 for
CL users.
But to help embedded users, I think the
examples/embedding/java/embedding/ExampleXML2PDF.java
example needs updating to show a simple JAXP
addParameter() call. Patches welcome, Clay... :)
Glen
--- Clay Leeds <cl...@medata.com> wrote:
> IIRC, there is currently no way to pass parameters
> to the XSL-FO or XSL
> via FOP from the command line.
>
> EXAMPLE
> =======
> fop.sh color=blue&date=%DATE% -xml xml-file.xml -xsl
> xsl-file.fo -print
>
> If this were possible, I could get pass such useful
> items as the current
> date, or a color or some other parameter that could
> be introduced *at
> run-time* to the XSL transformation.
>
> My question is: Is this type of control planned as
> an option from the
> COMMAND LINE for fop-1.0Dev (TRUNK)?
>
> Thanks!
>
> Web Maestro Clay
>
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com