Do you use XSLT to generate your FO file from XML data, or are you building
it some other way? I know you can pass properties to FOP through the command
line, but as far as something like "don't print the second page", I imagine
that would have to be in your FO.

-Matt 


> -----Original Message-----
> From: Clay Leeds [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, November 26, 2002 12:07 PM
> To: [EMAIL PROTECTED]
> Subject: RE: Pass xsl:param value to FOP through command line
> 
> 
> Matt,
> 
> Thanks. Actually, my .BAT file is calling _FOP_ through the 
> command line. 
> As for servlets, I don't think we are using them at all. 
> Because all the 
> examples I've seen discuss how to pass param values to 
> servlets instead of 
> how to pass them to FOP, I was stuck.
> 
> However, Thorsten gave me a great workaround for the problem 
> I was trying 
> to resolve by passing a param to FOP. I still would like to 
> know if there's 
> a way to pass param & variable values through the command 
> line, though.
> 
> At 11:59 AM 11/26/2002, you wrote:
> >Not sure exactly if your .BAT file is calling a Java app or 
> something else,
> >but here is how we set an external xsl:param within our 
> report generator
> >servlet:
> >
> >       transformer.setParameter("pdfImagePath",
> >
> >getServletConfig().getServletContext().getAttribute("pdfImagePath"));
> >
> >Then the xslt stylesheet access it like:
> >
> >       <xsl:param name="pdfImagePath" />
> >
> >We use this to get the environment-dependent path to our 
> image directory:
> >
> >       <fo:external-graphic
> >src="{concat($pdfImagePath,'ClinTrialLogoGreenBig.gif')}" />
> >
> >But you could use the value of this param to make decisions 
> within your
> >stylesheet.
> >
> >Hope this helps.
> >
> >-Matt
> >
> > > -----Original Message-----
> > > From: Clay Leeds [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, November 26, 2002 9:40 AM
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: Pass xsl:param value to FOP through command line
> > >
> > >
> > > Won't work. The .BAT is *not* for generating XML. It just
> > > prints it. Our
> > > primary app does the XML file generation.
> > >
> > > Regards & stuff.
> > >
> > > :-)
> > >
> > > At 09:37 AM 11/26/2002, you wrote:
> > > >STOP!
> > > >
> > > >I tought about something:
> > > >the .bat is for generating the the xml, right?
> > > >Then just do like you wanted: take an element call it 
> e.g. <rear/>.
> > > >then if rear
> > > ><rear>1</rear>
> > > >else
> > > ><rear>0</rear>
> > > >
> > > > From there it is stylesheet work:
> > > ><xsl:if test="rear=1">Backpage</xsl:if>
> > > ><xsl:if test="rear=0">front only</xsl:if>
> > > >
> > > >Regards
> > > >
> > > >Clay Leeds wrote:
> > > >>...
> > > >>At 09:22 AM 11/26/2002, you wrote:
> > > >>
> > > >>>So I would store the information in that script. Then 
> you need two
> > > >>>fop-Stylesheets. 1) with the rear page 2) without
> > > >>
> > > >>As they say here in the United States... Well, duh!
> > > >>That solves it for me. The only problem now, is that 
> I'll have two
> > > >>separate files to maintain. But then, if I IMPORT/INCLUDE the
> > > >>stylesheets, then I won't have to...
> > > >>THANKS A MILLION!
> > > >>:-)
> > > >>- Clay Leeds
> > > >>- Web Developer
> > > >>- [EMAIL PROTECTED]
> > > >>------------------------------------------------------------
> > > ---------
> > > >>To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >>For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > > 
> >---------------------------------------------------------------------
> > > >To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > >For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > > - Clay Leeds
> > > - Web Developer
> > > - [EMAIL PROTECTED]
> > >
> > >
> > > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> 
> - Clay Leeds
> - Web Developer
> - [EMAIL PROTECTED] 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to