Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Savino, Matt C wrote:
Here is a servlet we use to generate PDF and HTML. For the PDF first it
calls the transformer w/some parameters, then calls FOP. There's a lot going
on, but you should be able to find the pieces you're looking for.
Using DOM trees to couple the transformation and the FO
processor is a neat architecture, but could be inefficient
for large intermediate FO structures. Using SAX events is
better in this case.
J.Pietschmann


Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Markus Wiese wrote:
Servlet configuration?
Don't know yet, but I guess you will have to use 1 servlet taking use
of xalan and fop. (2 more servlets)
Supposedly guessed wrong.
J.Pietschmann



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread J.Pietschmann
Baptiste Casanova wrote:
Hi Markus,
How could i do the same thing with embedded FOP ?
You have to get hold of the transformer object so that you
can use setparameter().
An example:
 ByteArrayOutputStream out=new ByteArrayOutputStream();
 // set up the Driver object
 Driver driver =new Driver();
 driver.setOutputStream(out);
 driver.setRenderer(Driver.RENDER_PDF);
 // get a Transformer object
 Transformer transformer=TransformerFactory.newInstance()
  .newTransformer(new StreamSource(new File("foo.xsl")));
 // set a oparameter
 transformer.setParameter("page-count","126");
 // start the transformation, this will also drive
 // the renderer
 transformer.transform(new StreamSource(new File("foo.xml")),
   new SAXResult(driver.getContentHandler()));
HTH
J.Pietschmann


RE: Can I submit XSLT properties to FOP?

2002-04-29 Thread Savino, Matt C
Here is a servlet we use to generate PDF and HTML. For the PDF first it
calls the transformer w/some parameters, then calls FOP. There's a lot going
on, but you should be able to find the pieces you're looking for.


Matt Savino



> -Original Message-
> From: Markus Wiese [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 29, 2002 3:40 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Can I submit XSLT properties to FOP?
> 
> 
> Servlet configuration?
> Don't know yet, but I guess you will have to use 1 servlet taking use
> of xalan and fop. (2 more servlets)
> 
> markus
> 
> -Ursprüngliche Nachricht-
> Von: Baptiste Casanova <[EMAIL PROTECTED]>
> An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
> Datum: Montag, 29. April 2002 11:52
> Betreff: Re: Can I submit XSLT properties to FOP?
> 
> 
> >Hi Markus,
> >How could i do the same thing with embedded FOP ?
> >
> >- Original Message -
> >From: "Markus Wiese" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Monday, April 29, 2002 11:17 AM
> >Subject: Re: Can I submit XSLT properties to FOP?
> >
> >
> >> Hi Elmar,
> >> consider doing it like this:
> >> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL 
> myXSL.xsl -OUT
> >> myFO.fo -PARAM UserName "Elmar Schalück"
> >> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
> >>
> >> markus
> >>
> >>
> >> -Ursprüngliche Nachricht-
> >> Von: Schalück, Elmar <[EMAIL PROTECTED]>
> >> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> >> Datum: Montag, 29. April 2002 10:53
> >> Betreff: Can I submit XSLT properties to FOP?
> >>
> >>
> >> Hi,
> >> I like to use FOP to produce reports, based on a XSLT stylesheet.
> >>
> >> So the call will look like
> >> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
> >>
> >> Now I need to parametrize the XSLT with the current 
> date/time, with some
> >> preselections, 
> >>
> >> My idea is to have some more parameters for the command line:
> >> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
> >> -Param=UserLanguage de -pdf myPDF.pdf
> >>
> >> The XSLT stylesheet starts like
> >>  >>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
> >>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> >> 
> >> en
> >> ...
> >>
> >> Do you know of any means to fill in these parameters?
> >>
> >> Mit freundlichen Grüßen
> >> With kind regards
> >>
> >> Elmar Schalück
> >>
> >> __
> >>
> >> Elmar Schalück
> >> Advisory Software Developer
> >> CEYONIQ AG
> >> Winterstr. 49
> >> 33649 Bielefeld
> >> Germany
> >> Fon: +49 (0)521 9318-2108
> >> Fax: +49 (0)521 9318-882150
> >> E-Mail: [EMAIL PROTECTED]
> >> http://www.ceyoniq.com
> >> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
> >>
> >>
> >
> >
> >
> 
> 



ReportGeneratorServlet.java
Description: Binary data


Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Markus Wiese
Servlet configuration?
Don't know yet, but I guess you will have to use 1 servlet taking use
of xalan and fop. (2 more servlets)

markus

-Ursprüngliche Nachricht-
Von: Baptiste Casanova <[EMAIL PROTECTED]>
An: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Datum: Montag, 29. April 2002 11:52
Betreff: Re: Can I submit XSLT properties to FOP?


>Hi Markus,
>How could i do the same thing with embedded FOP ?
>
>- Original Message -
>From: "Markus Wiese" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Monday, April 29, 2002 11:17 AM
>Subject: Re: Can I submit XSLT properties to FOP?
>
>
>> Hi Elmar,
>> consider doing it like this:
>> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
>> myFO.fo -PARAM UserName "Elmar Schalück"
>> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
>>
>> markus
>>
>>
>> -Ursprüngliche Nachricht-
>> Von: Schalück, Elmar <[EMAIL PROTECTED]>
>> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
>> Datum: Montag, 29. April 2002 10:53
>> Betreff: Can I submit XSLT properties to FOP?
>>
>>
>> Hi,
>> I like to use FOP to produce reports, based on a XSLT stylesheet.
>>
>> So the call will look like
>> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
>>
>> Now I need to parametrize the XSLT with the current date/time, with some
>> preselections, 
>>
>> My idea is to have some more parameters for the command line:
>> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
>> -Param=UserLanguage de -pdf myPDF.pdf
>>
>> The XSLT stylesheet starts like
>> >  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
>> 
>> en
>> ...
>>
>> Do you know of any means to fill in these parameters?
>>
>> Mit freundlichen Grüßen
>> With kind regards
>>
>> Elmar Schalück
>>
>> __
>>
>> Elmar Schalück
>> Advisory Software Developer
>> CEYONIQ AG
>> Winterstr. 49
>> 33649 Bielefeld
>> Germany
>> Fon: +49 (0)521 9318-2108
>> Fax: +49 (0)521 9318-882150
>> E-Mail: [EMAIL PROTECTED]
>> http://www.ceyoniq.com
>> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
>>
>>
>
>
>



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Jens v. Pilgrim
Hello Elmar,

Monday, April 29, 2002, 10:54:50 AM, "Schalück, Elmar" wrote:

SE> Now I need to parametrize the XSLT with the current date/time, with some
SE> preselections, 

I'm not sure what FOP does if it's called using the -xsl and -xml
parameters, but I assume that Xalan is called. So I would simply call
Xalan first to generate a FO document. You can pass
some parameters (-PARAM) to Xalan, see Xalan documentation for details.

Best regards,
 Jens



Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Baptiste Casanova
Hi Markus,
How could i do the same thing with embedded FOP ?

- Original Message -
From: "Markus Wiese" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, April 29, 2002 11:17 AM
Subject: Re: Can I submit XSLT properties to FOP?


> Hi Elmar,
> consider doing it like this:
> @java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
> myFO.fo -PARAM UserName "Elmar Schalück"
> @java org.apache.fop.apps.Fop myFO.fo myPDF.pdf
>
> markus
>
>
> -Ursprüngliche Nachricht-
> Von: Schalück, Elmar <[EMAIL PROTECTED]>
> An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
> Datum: Montag, 29. April 2002 10:53
> Betreff: Can I submit XSLT properties to FOP?
>
>
> Hi,
> I like to use FOP to produce reports, based on a XSLT stylesheet.
>
> So the call will look like
> fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf
>
> Now I need to parametrize the XSLT with the current date/time, with some
> preselections, 
>
> My idea is to have some more parameters for the command line:
> fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
> -Param=UserLanguage de -pdf myPDF.pdf
>
> The XSLT stylesheet starts like
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
>  xmlns:fo="http://www.w3.org/1999/XSL/Format";>
> 
> en
> ...
>
> Do you know of any means to fill in these parameters?
>
> Mit freundlichen Grüßen
> With kind regards
>
> Elmar Schalück
>
> __
>
> Elmar Schalück
> Advisory Software Developer
> CEYONIQ AG
> Winterstr. 49
> 33649 Bielefeld
> Germany
> Fon: +49 (0)521 9318-2108
> Fax: +49 (0)521 9318-882150
> E-Mail: [EMAIL PROTECTED]
> http://www.ceyoniq.com
> PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A
>
>




Re: Can I submit XSLT properties to FOP?

2002-04-29 Thread Markus Wiese
Hi Elmar,
consider doing it like this:
@java org.apache.xalan.xslt.Process -IN myXML.xml -XSL myXSL.xsl -OUT
myFO.fo -PARAM UserName "Elmar Schalück"
@java org.apache.fop.apps.Fop myFO.fo myPDF.pdf

markus


-Ursprüngliche Nachricht-
Von: Schalück, Elmar <[EMAIL PROTECTED]>
An: '[EMAIL PROTECTED]' <[EMAIL PROTECTED]>
Datum: Montag, 29. April 2002 10:53
Betreff: Can I submit XSLT properties to FOP?


Hi,
I like to use FOP to produce reports, based on a XSLT stylesheet.

So the call will look like
fop -xml myXML.xml -xsl myXSL.xsl -pdf myPDF.pdf

Now I need to parametrize the XSLT with the current date/time, with some
preselections, 

My idea is to have some more parameters for the command line:
fop -xml myXML.xml -xsl myXSL.xsl -Param=UserName "Elmar Schalück"
-Param=UserLanguage de -pdf myPDF.pdf

The XSLT stylesheet starts like
http://www.w3.org/1999/XSL/Transform"; version="1.0"
 xmlns:fo="http://www.w3.org/1999/XSL/Format";>

en
...

Do you know of any means to fill in these parameters?

Mit freundlichen Grüßen
With kind regards

Elmar Schalück

__

Elmar Schalück
Advisory Software Developer
CEYONIQ AG
Winterstr. 49
33649 Bielefeld
Germany
Fon: +49 (0)521 9318-2108
Fax: +49 (0)521 9318-882150
E-Mail: [EMAIL PROTECTED]
http://www.ceyoniq.com
PGP-Fingerprint: BC78 7DEA 7A18 A6F2 A29D  F229 C68F 8C65 F7EE 898A