You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by cyril vidal <cy...@wanadoo.fr> on 2002/04/02 20:16:02 UTC

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.


RE: form-validation and utf-8

Posted by Montier Patrick <pa...@easance.com>.
hi,

Thanks for your advises but it still doesn't work.

1. UNIX: LOCALE=...
I try to change the LC_CTYPE to utf_8 but it doesn't change anything.

>>>2. For Sun JVM, this is -Dfile.encoding option (I might be wrong
though...)

2) I try to change system settings but it"s the same thing, i also try to
change the default encoding under tomcat 4.0 but i only find many users with
the same request without any response.

>>>Also, you have third option - it was here on the list recently - you
need to set encoding of the request object before invoking action
(setCharacterEncoding method).

3) Ok but i'm not using a getparameter request into a xsp or a java source,
i'm using the "<map:action name="db-authenticator" process which works
automatically from a form. (check data from a table and hold a session if
ok).

<parameters-descriptor>
  <parameter name="login" type="string" nullable="yes" default=""/>
  <parameter name="id_rus" type="long" nullable="no"/>
  <parameter name="password" type="string" nullable="yes" default=""/>
</parameters-descriptor>

Today thousands Japanese people can't enter a login and password in Kanji
code (UTf-8) on our web site, the utf-8 record is input in the postgres
database without any problem but the form-validator don't let them to
connect, it doesn't recognize no iso data.

4) I try to undestand a patch regarding a form enhancement
(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5593) but i'not so expert
to change directly the java source of cocoon.

I think many people should have the same problem, the main interrest of
cocoon is managing multi-languages pages.

I hope someone will send me information, it becomes urgent.

Thank you very much !!

Patrick



> From: Montier Patrick [mailto:patrick.montier@easance.com]
>
> Thank you for the response but how to change the encoding of the
servlet
> container ?
> that is what i want to do !

Two options:
1. UNIX: LOCALE=...
   Win: Control Panel - Regional Options - Locale

2. For Sun JVM, this is -Dfile.encoding option (I might be wrong
though...)

Also, you have third option - it was here on the list recently - you
need to set encoding of the request object before invoking action
(setCharacterEncoding method).

Vadim

>
> Best regards
>
> Patrick
>
> >>IIRC, form validator works on encoding of the servlet container. You
> >>>have two options:
> >>1. Patch form validator
> >>2. Change encoding of the servlet container
>
>
>
>
>
> > Hi,
>
> Patrick,
>
> > I can't resolve my problem : i try to make the form-validation works
> with
> > utf-8 data, it only works with Iso-????
>
>
> > In my sitemap.xmap, i try the form-encoding as described in an email
> but
> > it's still the same, when login or password input is in Utf-8
> caracters, the
> > form-validator reject.
> >
> >
> >      <map:match pattern="asp*/*/do-login">
> >         <!-- first validate whether submitted values are ok -->
> >         <map:act type="form-validator">
> >           <map:parameter name="descriptor"
> > value="context://test/descriptors/params.xml"/>
> >           <map:parameter name="validate" value="login,password"
> > form-encoding="UTF-8"/>
>
> This (form-encoding attribute) is *not* valid syntax for parameter.
> Parameter element understands *only* name and value attributes.
>
> Vadim
>
> >           <!-- now try to log in -->
> >           <map:act type="db-authenticator">
> >             <map:parameter name="descriptor"
> > value="context://test/descriptors/auth.xml"/>
> >             <!-- now go to protected area -->
> >             <map:redirect-to uri="login_ok.htm"/>
> >           </map:act>
> >         </map:act>
> >         <!-- something was wrong, try it again -->
> >         <map:redirect-to uri="login_nok.htm"/>
> >       </map:match>
> >
> > Any idea ?
> >
> > Thanks
> >
> > Patrick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: form-validation and utf-8

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Montier Patrick [mailto:patrick.montier@easance.com]
> 
> Thank you for the response but how to change the encoding of the
servlet
> container ?
> that is what i want to do !

Two options:
1. UNIX: LOCALE=...
   Win: Control Panel - Regional Options - Locale

2. For Sun JVM, this is -Dfile.encoding option (I might be wrong
though...)

Also, you have third option - it was here on the list recently - you
need to set encoding of the request object before invoking action
(setCharacterEncoding method).

Vadim

> 
> Best regards
> 
> Patrick
> 
> >>IIRC, form validator works on encoding of the servlet container. You
> >>>have two options:
> >>1. Patch form validator
> >>2. Change encoding of the servlet container
> 
> 
> 
> 
> 
> > Hi,
> 
> Patrick,
> 
> > I can't resolve my problem : i try to make the form-validation works
> with
> > utf-8 data, it only works with Iso-????
> 
> 
> > In my sitemap.xmap, i try the form-encoding as described in an email
> but
> > it's still the same, when login or password input is in Utf-8
> caracters, the
> > form-validator reject.
> >
> >
> >      <map:match pattern="asp*/*/do-login">
> >         <!-- first validate whether submitted values are ok -->
> >         <map:act type="form-validator">
> >           <map:parameter name="descriptor"
> > value="context://test/descriptors/params.xml"/>
> >           <map:parameter name="validate" value="login,password"
> > form-encoding="UTF-8"/>
> 
> This (form-encoding attribute) is *not* valid syntax for parameter.
> Parameter element understands *only* name and value attributes.
> 
> Vadim
> 
> >           <!-- now try to log in -->
> >           <map:act type="db-authenticator">
> >             <map:parameter name="descriptor"
> > value="context://test/descriptors/auth.xml"/>
> >             <!-- now go to protected area -->
> >             <map:redirect-to uri="login_ok.htm"/>
> >           </map:act>
> >         </map:act>
> >         <!-- something was wrong, try it again -->
> >         <map:redirect-to uri="login_nok.htm"/>
> >       </map:match>
> >
> > Any idea ?
> >
> > Thanks
> >
> > Patrick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: form-validation and utf-8

Posted by Montier Patrick <pa...@easance.com>.
Thank you for the response but how to change the encoding of the servlet
container ?
that is what i want to do !

Best regards

Patrick

>>IIRC, form validator works on encoding of the servlet container. You
>>>have two options:
>>1. Patch form validator
>>2. Change encoding of the servlet container





> Hi,

Patrick,

> I can't resolve my problem : i try to make the form-validation works
with
> utf-8 data, it only works with Iso-????


> In my sitemap.xmap, i try the form-encoding as described in an email
but
> it's still the same, when login or password input is in Utf-8
caracters, the
> form-validator reject.
>
>
>      <map:match pattern="asp*/*/do-login">
>         <!-- first validate whether submitted values are ok -->
>         <map:act type="form-validator">
>           <map:parameter name="descriptor"
> value="context://test/descriptors/params.xml"/>
>           <map:parameter name="validate" value="login,password"
> form-encoding="UTF-8"/>

This (form-encoding attribute) is *not* valid syntax for parameter.
Parameter element understands *only* name and value attributes.

Vadim

>           <!-- now try to log in -->
>           <map:act type="db-authenticator">
>             <map:parameter name="descriptor"
> value="context://test/descriptors/auth.xml"/>
>             <!-- now go to protected area -->
>             <map:redirect-to uri="login_ok.htm"/>
>           </map:act>
>         </map:act>
>         <!-- something was wrong, try it again -->
>         <map:redirect-to uri="login_nok.htm"/>
>       </map:match>
>
> Any idea ?
>
> Thanks
>
> Patrick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: form-validation and utf-8

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Montier Patrick [mailto:patrick.montier@easance.com]
> 
> Hi,

Patrick,

> I can't resolve my problem : i try to make the form-validation works
with
> utf-8 data, it only works with Iso-????

IIRC, form validator works on encoding of the servlet container. You
have two options:
1. Patch form validator
2. Change encoding of the servlet container

 
> In my sitemap.xmap, i try the form-encoding as described in an email
but
> it's still the same, when login or password input is in Utf-8
caracters, the
> form-validator reject.
> 
> 
>      <map:match pattern="asp*/*/do-login">
>         <!-- first validate whether submitted values are ok -->
>         <map:act type="form-validator">
>           <map:parameter name="descriptor"
> value="context://test/descriptors/params.xml"/>
>           <map:parameter name="validate" value="login,password"
> form-encoding="UTF-8"/>

This (form-encoding attribute) is *not* valid syntax for parameter.
Parameter element understands *only* name and value attributes.

Vadim

>           <!-- now try to log in -->
>           <map:act type="db-authenticator">
>             <map:parameter name="descriptor"
> value="context://test/descriptors/auth.xml"/>
>             <!-- now go to protected area -->
>             <map:redirect-to uri="login_ok.htm"/>
>           </map:act>
>         </map:act>
>         <!-- something was wrong, try it again -->
>         <map:redirect-to uri="login_nok.htm"/>
>       </map:match>
> 
> Any idea ?
> 
> Thanks
> 
> Patrick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


form-validation and utf-8

Posted by Montier Patrick <pa...@easance.com>.
Hi,

I can't resolve my problem : i try to make the form-validation works with
utf-8 data, it only works with Iso-????

In my sitemap.xmap, i try the form-encoding as described in an email but
it's still the same, when login or password input is in Utf-8 caracters, the
form-validator reject.


     <map:match pattern="asp*/*/do-login">
        <!-- first validate whether submitted values are ok -->
        <map:act type="form-validator">
          <map:parameter name="descriptor"
value="context://test/descriptors/params.xml"/>
          <map:parameter name="validate" value="login,password"
form-encoding="UTF-8"/>
          <!-- now try to log in -->
          <map:act type="db-authenticator">
            <map:parameter name="descriptor"
value="context://test/descriptors/auth.xml"/>
            <!-- now go to protected area -->
            <map:redirect-to uri="login_ok.htm"/>
          </map:act>
        </map:act>
        <!-- something was wrong, try it again -->
        <map:redirect-to uri="login_nok.htm"/>
      </map:match>

Any idea ?

Thanks

Patrick


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


[C2] Best palace for redirection in case of error

Posted by Artur Bialecki <ar...@digitalfairway.com>.
Hello all,

I'm in the process of migrating from C1.8 to C2 and I'm writing
some actions to save form data. If saving this data generates
exceptions I redirect to predefined (in form XSP) page based
on type/id of the exception.

My question is what is the proper way to do that redirection
form action? Should I use the Redirector(?), or just
grab the HttpServletResponse form the objectModel and use that,
or return some sitemap params and do magic there.
Since I can't find any info on what the Redirector is/does
and I'm only a student of the sitemap magic I leaning towards
the Response.

Thanks,

Artur...


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: fo2pdf serializer

Posted by Andrew Russell <an...@pobox.com>.
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.xml&t=.pdf
Or changing your pattern to <map:match pattern="CinemaFO.pdf">

Andrew
  ----- Original Message ----- 
  From: cyril vidal 
  To: cocoon-users@xml.apache.org 
  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. 
  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.

Re: fo2pdf serializer

Posted by cyril vidal <cy...@wanadoo.fr>.
Sorry, but what is SSL?
I think the answer is no...
----- Original Message -----
From: "Nicola Ken Barozzi" <ni...@apache.org>
To: <co...@xml.apache.org>
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                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
> ---------------------------------------------------------------------
>
> ----- Original Message -----
> From: cyril vidal
> To: cocoon-users@xml.apache.org
> 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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>


---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: fo2pdf serializer

Posted by Nicola Ken Barozzi <ni...@apache.org>.
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                   nicolaken@apache.org
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------

----- Original Message -----
From: cyril vidal
To: cocoon-users@xml.apache.org
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: fo2pdf serializer

Posted by cyril vidal <cy...@wanadoo.fr>.
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" <st...@pandora.be>
To: <co...@xml.apache.org>
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: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>



---------------------------------------------------------------------
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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: fo2pdf serializer

Posted by Stijn Van Vreckem <st...@pandora.be>.

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: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>