AW: strange fo2pdf serializer problem (xmlform)

2002-12-31 Thread Kirchhoff, Lars
ok i solved it, the problem is the internet explorer. I seems to have
problems to map
the right application if the filetype (means the extension eg. .html or
.pdf) doesn't
fit to the mime-type. I changed the action attribute in the forms to
print.pdf instead
of print.htm and it worked.

ciao Lars

 -Ursprüngliche Nachricht-
 Von: Kirchhoff, Lars 
 Gesendet: Montag, 30. Dezember 2002 17:54
 An: Cocoon-Users (E-Mail)
 Betreff: strange fo2pdf serializer problem (xmlform)
 
 
 hi,
 
 I setup a sitemap with a resource to be able to give different output
 formats.
 
 - code -
 map:resources
   map:resource name=format-transformation
 map:select type=parameter
   map:parameter name=parameter-selector-test 
 value={format} /
   map:when test=pdf
 map:transform src=stylesheets/print/print2pdf.xsl /   
 map:serialize type=fo2pdf /
   /map:when
   map:otherwise
 map:transform src=stylesheets/print/print2html.xsl /
 map:serialize type=html label=debug / 
   /map:otherwise
 /map:select
   /map:resource
 /map:resources
 
 map:match pattern=print*
   map:act type=set-encoding
 map:parameter name=form-encoding value=UTF-8/
   /map:act

   map:act type=print
 map:parametername=xmlform-id   
 value=printInv/   
 map:parametername=xmlform-scopevalue=session/  
 map:parametername=xmlform-modelvalue=test.UserBean/
 
 map:generate src=forms/{page}.xml / 
   
 map:act type=locale 
   map:transform type=i18n
 map:parameter name=locale value={locale}/
   /map:transform
 /map:act  
   
 map:transform type=xmlform  label=xml/
   
 map:select type=parameter
   map:parameter name=parameter-selector-test value={page} /
   map:when test=invoice
 map:call resource=format-transformation
   map:parameter name=format value={format} /
 /map:call
   /map:when

   map:otherwise
 map:transform src=stylesheets/wizard2html.xsl /   
 map:transform src=stylesheets/xmlform2html.xsl / 
 map:serialize type=html label=debug/ 
   /map:otherwise
 /map:select
   /map:act
 /map:match  
 
 - /code -
 
 From the xmlform action I return the page and the format parameter. 
 Depending on some database action the invoice page/view is displayed 
 after different views before. (for instance, the action looks up for
 the name of a customer and if it finds it, it goes directly 
 to the invoice
 view if not it shows a list of all found customers and after 
 selecting 
 one the invoice will be shown. 
 
 The problem now is that the pdf version of the invoice is 
 displayed only 
 if the user does select one customer from the list. If the 
 action finds 
 a customer straight ahead, the output of the pdf is like 
 pnbsp;/p.
 
 First I thought i return the wrong parameter from the action, but the 
 parameters are right. 
 Second I compared the output the invoice2pdf.xsl of both ways 
 with the 
 htmlSerializer and both are looking exactly. 
 
 Now I don't see any difference between both and getting stuck 
 with these.
 If anybody has an idea about this I would be very pleased to get an 
 answer.
 
 ciao Lars
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail:   [EMAIL PROTECTED]
 

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




strange fo2pdf serializer problem (xmlform)

2002-12-30 Thread Kirchhoff, Lars
hi,

I setup a sitemap with a resource to be able to give different output
formats.

- code -
map:resources
  map:resource name=format-transformation
map:select type=parameter
  map:parameter name=parameter-selector-test value={format} /
  map:when test=pdf
map:transform src=stylesheets/print/print2pdf.xsl / 
map:serialize type=fo2pdf /
  /map:when
  map:otherwise
map:transform src=stylesheets/print/print2html.xsl /
map:serialize type=html label=debug / 
  /map:otherwise
/map:select
  /map:resource
/map:resources

map:match pattern=print*
  map:act type=set-encoding
map:parameter name=form-encoding value=UTF-8/
  /map:act
   
  map:act type=print
map:parameter  name=xmlform-id   value=printInv/   
map:parameter  name=xmlform-scopevalue=session/  
map:parameter  name=xmlform-modelvalue=test.UserBean/

map:generate   src=forms/{page}.xml / 

map:act type=locale   
  map:transform type=i18n
  map:parameter name=locale value={locale}/
  /map:transform
/map:act

map:transform type=xmlform  label=xml/

map:select type=parameter
  map:parameter name=parameter-selector-test value={page} /
  map:when test=invoice
map:call resource=format-transformation
  map:parameter name=format value={format} /
/map:call
  /map:when
   
  map:otherwise
map:transform src=stylesheets/wizard2html.xsl /   
map:transform src=stylesheets/xmlform2html.xsl / 
map:serialize type=html label=debug/ 
  /map:otherwise
/map:select
  /map:act
/map:match  

- /code -

From the xmlform action I return the page and the format parameter. 
Depending on some database action the invoice page/view is displayed 
after different views before. (for instance, the action looks up for
the name of a customer and if it finds it, it goes directly to the invoice
view if not it shows a list of all found customers and after selecting 
one the invoice will be shown. 

The problem now is that the pdf version of the invoice is displayed only 
if the user does select one customer from the list. If the action finds 
a customer straight ahead, the output of the pdf is like pnbsp;/p.

First I thought i return the wrong parameter from the action, but the 
parameters are right. 
Second I compared the output the invoice2pdf.xsl of both ways with the 
htmlSerializer and both are looking exactly. 

Now I don't see any difference between both and getting stuck with these.
If anybody has an idea about this I would be very pleased to get an 
answer.

ciao Lars


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




fo2pdf serializer

2002-04-02 Thread cyril vidal



Good evening,

I've got problems with transforming 
an xml document (CinemaFO.xml) into a pdf one (CinemaFO.pdf) via an xslt 
transformation (CinemaFO.xsl).
I'm sure CinemaFO.xml and Cinema.xsl 
are valid because I've tested them by command line with fop 0.20.3

To test my samples with Cocoon2, I've 
created a new clean environment, also a new directory under 
$CATALINA_HOME/webapps/ , e.g. essai. 
Underessai, I've 
createdthe followingrepertory structure: /static 
(including the file CinemaFO.xml and index.html) and transforms(including the 
file CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf and 
the $COCOON_HOME/WEB-INF directory.

The structure of my sitemap.xmap file 
(in directory essai) is following:

map:pipelines 
map:pipeline map:match 
pattern="index.html" 
map:read src="static/index.html" 
mime-type="text/html"/ 
/map:match /map:pipeline

 
map:pipeline map:match 
pattern="CinemaFO.xml" map:generate 
src="static/CinemaFO.xml"/ 
map:transform 
src="transforms/CinemaFO.xsl"/ 
map:serialize type="fo2pdf"/ 
/map:match /map:pipeline

Theres is no problem with serving 
static document index.html.
But when I try to perform the xslfo 
transformation by requesting the 
URL:http://localhost:8080/essai/CinemaFO.xml,I've got any message error 
(It means the server finds the files) but the browser (IE6)stays 
completely white. With Netscape 6, the browser opens Acrobat reader, but there's 
a message error, that indicates that an error occured at the opening of the pdf 
document.

What do you think is 
wrong?
Thanks a lot for your 
answers,
Cyril.



Re: fo2pdf serializer

2002-04-02 Thread Nicola Ken Barozzi

I've had your same problem using SSL on Tomcat, and it goes away with the
normal connector.
The really strange thing, though, is that the test svg from the Cocoon
webapp *works* under SSL!

Are you using SSL?

--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-

- Original Message -
From: cyril vidal
To: [EMAIL PROTECTED]
Sent: Tuesday, April 02, 2002 8:16 PM
Subject: fo2pdf serializer


Good evening,

I've got problems with transforming an xml document (CinemaFO.xml) into a
pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl).
I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by
command line with fop 0.20.3

To test my samples with Cocoon2, I've created a new clean environment, also
a new directory under $CATALINA_HOME/webapps/ , e.g. essai.
Under essai, I've created  the following repertory structure:  /static
(including the file CinemaFO.xml and index.html) and transforms(including
the file CinemaFO.xsl), and I've also copied over both
$COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory.

The structure of my sitemap.xmap file (in directory essai) is following:

map:pipelines
  map:pipeline
 map:match pattern=index.html
map:read src=static/index.html mime-type=text/html/
 /map:match
  /map:pipeline

  map:pipeline
map:match pattern=CinemaFO.xml
  map:generate src=static/CinemaFO.xml/
  map:transform src=transforms/CinemaFO.xsl/
   map:serialize type=fo2pdf/
/map:match
  /map:pipeline

Theres is no problem with serving static document index.html.
But when I try to perform the xslfo transformation by requesting the
URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error (It
means the server finds the files) but the browser (IE6) stays completely
white. With Netscape 6, the browser opens Acrobat reader, but there's a
message error, that indicates that an error occured at the opening of the
pdf document.

What do you think is wrong?
Thanks a lot for your answers,
Cyril.


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: fo2pdf serializer

2002-04-02 Thread cyril vidal

Sorry, but what is SSL?
I think the answer is no...
- Original Message -
From: Nicola Ken Barozzi [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 02, 2002 8:25 PM
Subject: Re: fo2pdf serializer


 I've had your same problem using SSL on Tomcat, and it goes away with the
 normal connector.
 The really strange thing, though, is that the test svg from the Cocoon
 webapp *works* under SSL!

 Are you using SSL?

 --
 Nicola Ken Barozzi   [EMAIL PROTECTED]
 - verba volant, scripta manent -
(discussions get forgotten, just code remains)
 -

 - Original Message -
 From: cyril vidal
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 02, 2002 8:16 PM
 Subject: fo2pdf serializer


 Good evening,

 I've got problems with transforming an xml document (CinemaFO.xml) into a
 pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl).
 I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by
 command line with fop 0.20.3

 To test my samples with Cocoon2, I've created a new clean environment,
also
 a new directory under $CATALINA_HOME/webapps/ , e.g. essai.
 Under essai, I've created  the following repertory structure:  /static
 (including the file CinemaFO.xml and index.html) and transforms(including
 the file CinemaFO.xsl), and I've also copied over both
 $COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory.

 The structure of my sitemap.xmap file (in directory essai) is following:

 map:pipelines
   map:pipeline
  map:match pattern=index.html
 map:read src=static/index.html mime-type=text/html/
  /map:match
   /map:pipeline

   map:pipeline
 map:match pattern=CinemaFO.xml
   map:generate src=static/CinemaFO.xml/
   map:transform src=transforms/CinemaFO.xsl/
map:serialize type=fo2pdf/
 /map:match
   /map:pipeline

 Theres is no problem with serving static document index.html.
 But when I try to perform the xslfo transformation by requesting the
 URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error
(It
 means the server finds the files) but the browser (IE6) stays completely
 white. With Netscape 6, the browser opens Acrobat reader, but there's a
 message error, that indicates that an error occured at the opening of the
 pdf document.

 What do you think is wrong?
 Thanks a lot for your answers,
 Cyril.


 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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



-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: fo2pdf serializer

2002-04-02 Thread Stijn Van Vreckem



I had a similar problem, my stylesheet was running from command line and 
produced the pdf. 
Within cocoon it gave some errors and produced no output. 

I changed the fop jar from cocoon (version 0.20.3rc with the latest 
version 0.20.3 ) and everything was running again ! 
  


On Tue, 2 Apr 2002, cyril vidal wrote:

 Good evening,
 
 I've got problems with transforming an xml document (CinemaFO.xml) into a pdf one 
(CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl).
 I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them by command 
line with fop 0.20.3
 
 To test my samples with Cocoon2, I've created a new clean environment, also a new 
directory under $CATALINA_HOME/webapps/ , e.g. essai. 
 Under essai, I've created  the following repertory structure:  /static (including 
the file CinemaFO.xml and index.html) and transforms(including the file 
CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf and the 
$COCOON_HOME/WEB-INF directory.
 
 The structure of my sitemap.xmap file (in directory essai) is following:
 
 map:pipelines
   map:pipeline
  map:match pattern=index.html
 map:read src=static/index.html mime-type=text/html/
  /map:match
   /map:pipeline
 
   map:pipeline
 map:match pattern=CinemaFO.xml
   map:generate src=static/CinemaFO.xml/
   map:transform src=transforms/CinemaFO.xsl/
map:serialize type=fo2pdf/
 /map:match
   /map:pipeline
 
 Theres is no problem with serving static document index.html.
 But when I try to perform the xslfo transformation by requesting the 
URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error (It means 
the server finds the files) but the browser (IE6) stays completely white. With 
Netscape 6, the browser opens Acrobat reader, but there's a message error, that 
indicates that an error occured at the opening of the pdf document.
 
 What do you think is wrong?
 Thanks a lot for your answers,
 Cyril.
 
 

-- 

Stijn Van Vreckem





-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: fo2pdf serializer

2002-04-02 Thread Andrew Russell



Hi I saw that your request ends with 
.xml,
That can be a problem with pdfs in IE.
(Not my own experience, but an advantage of being a 
lurker here)

So the problem should be fixed by you by using the 
url
http://localhost:8080/essai/CinemaFO.xmlt=.pdf
Or changing your pattern to map:match 
pattern="CinemaFO.pdf"

Andrew

  - Original Message - 
  From: 
  cyril 
  vidal 
  To: [EMAIL PROTECTED] 
  
  Sent: Wednesday, April 03, 2002 6:16 
  AM
  Subject: fo2pdf serializer
  
  Good evening,
  
  I've got problems with transforming 
  an xml document (CinemaFO.xml) into a pdf one (CinemaFO.pdf) via an xslt 
  transformation (CinemaFO.xsl).
  I'm sure CinemaFO.xml and 
  Cinema.xsl are valid because I've tested them by command line with fop 
  0.20.3
  
  To test my samples with Cocoon2, 
  I've created a new clean environment, also a new directory under 
  $CATALINA_HOME/webapps/ , e.g. essai. 
  Underessai, I've 
  createdthe followingrepertory structure: /static 
  (including the file CinemaFO.xml and index.html) and transforms(including the 
  file CinemaFO.xsl), and I've also copied over both $COCOON_HOME/cocoon.xconf 
  and the $COCOON_HOME/WEB-INF directory.
  
  The structure of my sitemap.xmap 
  file (in directory essai) is following:
  
  map:pipelines 
  map:pipeline map:match 
  pattern="index.html" 
  map:read src="static/index.html" 
  mime-type="text/html"/ 
  /map:match /map:pipeline
  
   
  map:pipeline map:match 
  pattern="CinemaFO.xml" map:generate 
  src="static/CinemaFO.xml"/ 
  map:transform 
  src="transforms/CinemaFO.xsl"/ 
  map:serialize type="fo2pdf"/ 
  /map:match /map:pipeline
  
  Theres is no problem with serving 
  static document index.html.
  But when I try to perform the xslfo 
  transformation by requesting the 
  URL:http://localhost:8080/essai/CinemaFO.xml,I've got any message error 
  (It means the server finds the files) but the browser (IE6)stays 
  completely white. With Netscape 6, the browser opens Acrobat reader, but 
  there's a message error, that indicates that an error occured at the opening 
  of the pdf document.
  
  What do you think is 
  wrong?
  Thanks a lot for your 
  answers,
  Cyril.
  


Re: fo2pdf serializer

2002-04-02 Thread cyril vidal

HI!

Thanks a lot for all your tips! That's the result of my experiments:
first, I've done what Stijn told to me: so remplace fop 0.20.3rc.jar by
fop.jar of FOP 0.20.3
It's running by calling the URL http:/localhost:8080/essai/CinemaFO.xml only
with Netscape6
(with IE6, I still have a white page!)

So, after, I followed Andrew's tip: I changed my pattern to map:match
pattern=CinemaFO.pdf
and by calling the URL http:/localhost:8080/essai/CinemaFO.pdf
it now is running with both browsers!

Thanks a lot for having helped me,
Cyril.
- Original Message -
From: Stijn Van Vreckem [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 02, 2002 9:56 PM
Subject: Re: fo2pdf serializer




 I had a similar problem, my stylesheet was running from command line and
 produced the pdf.
 Within cocoon it gave some errors and produced no output.

 I changed the fop jar from cocoon (version 0.20.3rc with the latest
 version 0.20.3 ) and everything was running again !



 On Tue, 2 Apr 2002, cyril vidal wrote:

  Good evening,
 
  I've got problems with transforming an xml document (CinemaFO.xml) into
a pdf one (CinemaFO.pdf) via an xslt transformation (CinemaFO.xsl).
  I'm sure CinemaFO.xml and Cinema.xsl are valid because I've tested them
by command line with fop 0.20.3
 
  To test my samples with Cocoon2, I've created a new clean environment,
also a new directory under $CATALINA_HOME/webapps/ , e.g. essai.
  Under essai, I've created  the following repertory structure:  /static
(including the file CinemaFO.xml and index.html) and transforms(including
the file CinemaFO.xsl), and I've also copied over both
$COCOON_HOME/cocoon.xconf and the $COCOON_HOME/WEB-INF directory.
 
  The structure of my sitemap.xmap file (in directory essai) is following:
 
  map:pipelines
map:pipeline
   map:match pattern=index.html
  map:read src=static/index.html mime-type=text/html/
   /map:match
/map:pipeline
 
map:pipeline
  map:match pattern=CinemaFO.xml
map:generate src=static/CinemaFO.xml/
map:transform src=transforms/CinemaFO.xsl/
 map:serialize type=fo2pdf/
  /map:match
/map:pipeline
 
  Theres is no problem with serving static document index.html.
  But when I try to perform the xslfo transformation by requesting the
URL:http://localhost:8080/essai/CinemaFO.xml, I've got any message error (It
means the server finds the files) but the browser (IE6) stays completely
white. With Netscape 6, the browser opens Acrobat reader, but there's a
message error, that indicates that an error occured at the opening of the
pdf document.
 
  What do you think is wrong?
  Thanks a lot for your answers,
  Cyril.
 
 

 --

 Stijn Van Vreckem





 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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