Re: Pass xsl:param value to FOP through command line

2002-11-27 Thread Clay Leeds
Oleg,
Thanks for the reply!
At 10:36 AM 11/27/2002, you wrote:
Clay Leeds wrote:
I didn't find this answer in the archives. I'd like to pass an xsl:param 
value to FOP. Is this possible? I found some information about doing this 
through the use of a servlet, however I'm using *.BAT files (under 
Windows)  *.sh scripts (in *NIX). I'd like to be able to pass xsl:param 
or xsl:variable values, to effect output.
You cannot do it using a command line fop.bat/fop.sh. But you can write 
your own script, where first invoke xalan to transform xml+xsl to fo, see 
xalan documentation how to run it from command line[1], and then run FOP 
in -fo mode.
[1] http://xml.apache.org/xalan-j/commandline.html
--
Oleg Tkachenko

I'll try this. Unfortunately, at this time, my clients are already 
complaining about how long it takes to output using FOP. Here's the info 
from FOP's debug mode:

[DEBUG] Initial heap size: 1828Kb
[DEBUG] Current heap size: 7003Kb
[DEBUG] Total memory used: 5174Kb
[DEBUG]   Memory use is indicative; no GC was performed
[DEBUG]   These figures should not be used comparatively
[DEBUG] Total time used: 6ms
[DEBUG] Pages rendered: 5
[DEBUG] Avg render time: 2223ms/page
Out of curiosity, how do you think these values would be changed if I did 
the xalan stuff (passing the parameters  then did the FOP stuff? Do you 
think this would increase the overall rendering time? If so, by how much. 
(I'd certainly accept estimations).

:-)
- Clay Leeds
- Web Developer
- [EMAIL PROTECTED] 

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


Re: Pass xsl:param value to FOP through command line

2002-11-27 Thread Clay Leeds
Oleg,
At 01:25 PM 11/27/2002, you wrote:
Clay Leeds wrote:
I'll try this. Unfortunately, at this time, my clients are already 
complaining about how long it takes to output using FOP. Here's the info 
from FOP's debug mode:
[DEBUG] Initial heap size: 1828Kb
[DEBUG] Current heap size: 7003Kb
[DEBUG] Total memory used: 5174Kb
[DEBUG]   Memory use is indicative; no GC was performed
[DEBUG]   These figures should not be used comparatively
[DEBUG] Total time used: 6ms
[DEBUG] Pages rendered: 5
[DEBUG] Avg render time: 2223ms/page
Hmmm, too much as to me. Are you using big images? Which FOP version are 
you talking about? I'd try cvs version - some performance patch was applied.
using fop-0.20.4 I'll check into the cvs version stuff if I can. However, I 
doubt my clients will be interested in using a non-release version.

Out of curiosity, how do you think these values would be changed if I did 
the xalan stuff (passing the parameters  then did the FOP stuff? Do you 
think this would increase the overall rendering time? If so, by how much. 
(I'd certainly accept estimations).
I'd say that not really going to change anything, just + time to serialize 
fo to a file + time to read and parse it.
That's what I figured. Thx!
- Clay Leeds
- Web Developer
- [EMAIL PROTECTED] 

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


Re: Pass xsl:param value to FOP through command line

2002-11-27 Thread Oleg Tkachenko
Clay Leeds wrote:
using fop-0.20.4 I'll check into the cvs version stuff if I can. 
However, I doubt my clients will be interested in using a non-release 
version.
Well, then wait 0.20.5rc, probably next week.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
No. (at least I don't know what xsp is). My clients have installed JRE 1.4 
 FOP, and that is all. I'd rather not have to install other items (if 
possible, of course). I'm just wondering if it's possible to pass variable 
 param values directly to FOP through the command line.

If it makes any difference my clients intend to run the gamut of output 
options: -print, -pcl, -awt, -ps, pdf...

Thanks!
Clay
At 08:54 AM 11/26/2002, you wrote:
Did you use xsp?
Clay Leeds wrote:
Howdy,
I didn't find this answer in the archives. I'd like to pass an xsl:param 
value to FOP. Is this possible? I found some information about doing this 
through the use of a servlet, however I'm using *.BAT files (under 
Windows)  *.sh scripts (in *NIX). I'd like to be able to pass xsl:param 
or xsl:variable values, to effect output.
Any ideas?
Thanks!
- 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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Thorsten Scherler
Sorry, but can't help.
I am using fop within cocoon.
XSP stands for Extensible Server pages.
But if you pass values to fop, can't you insert the params BEFORE 
passing it to fop?

Clay Leeds wrote:
No. (at least I don't know what xsp is). My clients have installed JRE 
1.4  FOP, and that is all. I'd rather not have to install other items 
(if possible, of course). I'm just wondering if it's possible to pass 
variable  param values directly to FOP through the command line.

If it makes any difference my clients intend to run the gamut of output 
options: -print, -pcl, -awt, -ps, pdf...

Thanks!
Clay
At 08:54 AM 11/26/2002, you wrote:
Did you use xsp?
Clay Leeds wrote:
Howdy,
I didn't find this answer in the archives. I'd like to pass an 
xsl:param value to FOP. Is this possible? I found some information 
about doing this through the use of a servlet, however I'm using 
*.BAT files (under Windows)  *.sh scripts (in *NIX). I'd like to be 
able to pass xsl:param or xsl:variable values, to effect output.
Any ideas?
Thanks!
- 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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
That's what I'm trying to do by passing the PARAM in the COMMAND line. It 
may just be that I don't completely understand the process. I have a system 
which outputs an XML file, and if a setting exists, will print that file 
using XSL:FO. I have a 2nd page in the XSL:FO that is static (it's a 
government form). If the printer can handle DUPLEX (print on front  back) 
then I output the 2nd page. If it does not, then they must purchase 
pre-printed paper with the government disclaimer stuff on the back.

I'd like to have my .BAT/.sh script which runs FOP pass a parameter to FOP 
so it knows whether or not to print the 2nd page. I guess I could set up 
the system to always output both pages, but then only print ODD pages, 
but I have no guarantee that I'll have that much control over the 
environment. I do, however have control over the .BAT/.sh script

Thanks for your help!
Web Maestro Clay
At 09:04 AM 11/26/2002, you wrote:
Sorry, but can't help.
I am using fop within cocoon.
XSP stands for Extensible Server pages.
But if you pass values to fop, can't you insert the params BEFORE passing 
it to fop?

Clay Leeds wrote:
No. (at least I don't know what xsp is). My clients have installed JRE 
1.4  FOP, and that is all. I'd rather not have to install other items 
(if possible, of course). I'm just wondering if it's possible to pass 
variable  param values directly to FOP through the command line.
If it makes any difference my clients intend to run the gamut of output 
options: -print, -pcl, -awt, -ps, pdf...
Thanks!
Clay
At 08:54 AM 11/26/2002, you wrote:

Did you use xsp?
Clay Leeds wrote:
Howdy,
I didn't find this answer in the archives. I'd like to pass an 
xsl:param value to FOP. Is this possible? I found some information 
about doing this through the use of a servlet, however I'm using *.BAT 
files (under Windows)  *.sh scripts (in *NIX). I'd like to be able to 
pass xsl:param or xsl:variable values, to effect output.
Any ideas?
Thanks!
- 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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Thorsten Scherler

Clay Leeds wrote:
That's what I'm trying to do by passing the PARAM in the COMMAND line. 
It may just be that I don't completely understand the process. I have a 
system which outputs an XML file, and if a setting exists, will print 
that file using XSL:FO. I have a 2nd page in the XSL:FO that is static 
(it's a government form). 
Understood.
If the printer can handle DUPLEX (print on
front  back) then I output the 2nd page. If it does not, then they must 
purchase pre-printed paper with the government disclaimer stuff on the 
back.

You want to keep the information in a file or should it be done on the 
fly?

I'd like to have my .BAT/.sh script which runs FOP pass a parameter to 
FOP so it knows whether or not to print the 2nd page. 
ok, on the fly. But your .bat is sending the files, which should be 
printed (front/rear // front). So why not keep a record whether it is 
front/rear or front. Then normal if bla =true then bothPages else 
frontPage.

I guess I could
set up the system to always output both pages, but then only print ODD 
pages, but I have no guarantee that I'll have that much control over the 
environment. I do, however have control over the .BAT/.sh script

So I would store the information in that script. Then you need two 
fop-Stylesheets. 1) with the rear page 2) without

Thanks for your help!
Web Maestro Clay
At 09:04 AM 11/26/2002, you wrote:
Sorry, but can't help.
I am using fop within cocoon.
XSP stands for Extensible Server pages.
But if you pass values to fop, can't you insert the params BEFORE 
passing it to fop?

Clay Leeds wrote:
No. (at least I don't know what xsp is). My clients have installed 
JRE 1.4  FOP, and that is all. I'd rather not have to install other 
items (if possible, of course). I'm just wondering if it's possible 
to pass variable  param values directly to FOP through the command 
line.
If it makes any difference my clients intend to run the gamut of 
output options: -print, -pcl, -awt, -ps, pdf...
Thanks!
Clay
At 08:54 AM 11/26/2002, you wrote:

Did you use xsp?
Clay Leeds wrote:
Howdy,
I didn't find this answer in the archives. I'd like to pass an 
xsl:param value to FOP. Is this possible? I found some information 
about doing this through the use of a servlet, however I'm using 
*.BAT files (under Windows)  *.sh scripts (in *NIX). I'd like to 
be able to pass xsl:param or xsl:variable values, to effect output.
Any ideas?
Thanks!
- 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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
...
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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Thorsten Scherler
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
rear1/rear
else
rear0/rear
From there it is stylesheet work:
xsl:if test=rear=1Backpage/xsl:if
xsl:if test=rear=0front 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]


Re: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
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
rear1/rear
else
rear0/rear
From there it is stylesheet work:
xsl:if test=rear=1Backpage/xsl:if
xsl:if test=rear=0front 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]


RE: Pass xsl:param value to FOP through command line

2002-11-26 Thread Savino, Matt C
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
 rear1/rear
 else
 rear0/rear
 
  From there it is stylesheet work:
 xsl:if test=rear=1Backpage/xsl:if
 xsl:if test=rear=0front 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]



RE: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
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
 rear1/rear
 else
 rear0/rear
 
  From there it is stylesheet work:
 xsl:if test=rear=1Backpage/xsl:if
 xsl:if test=rear=0front 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]


RE: Pass xsl:param value to FOP through command line

2002-11-26 Thread Savino, Matt C
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
   rear1/rear
   else
   rear0/rear
   
From there it is stylesheet work:
   xsl:if test=rear=1Backpage/xsl:if
   xsl:if test=rear=0front 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]



RE: Pass xsl:param value to FOP through command line

2002-11-26 Thread Clay Leeds
I use XML Spy to write the FO file itself. Then I use FOP to take XML input 
 XSL inputs to generate the output. My command line looks like this:

c:\Program Files\java\fop-0.20.4fop -d -xml C:\test_NYNF.xml -xsl 
C:\fo\2Page.fo -pdf C:\fo\2Page.pdf

This is the command .BAT file sends the system. I'd love to be able to pass 
a param at the end or something, but all I get are errors. Someone just 
mentioned an fop servlet in a recent message (I think they mentioned the 
\build\fop.jar file in the same breath), but I don't know yet how to 
leverage that. Since I think I have a viable workaround for the 2nd page 
(namely to have use XSL:IMPORT/INCLUDE) I don't know if that's necessary, 
anyway.

Unfortunately, that's the smallest part of the problem I'm working with 
right now. My main problem is to determine how to implement the ODD/EVEN 
functionality correctly. I've finally gotten some headway with an ODD/EVEN, 
but it's still not working right. I'm only getting one EVEN page  
subsequent EVEN pages are outputting the ODD stuff on the EVEN page.

:-\
At 12:37 PM 11/26/2002, you wrote:
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
   rear1/rear
   else
   rear0/rear
   
From there it is stylesheet work:
   xsl:if test=rear=1Backpage/xsl:if
   xsl:if test=rear=0front 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