cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anna Afonchenko" <a...@ubaccess.com>
Subject Re: Configuring JTidy
Date Tue, 17 Dec 2002 09:50:57 GMT
Hi Hussayn.
Thank you for pointing my out my typo, I corrected it.
But I still don't get the output that I want.
I changed the serializer to the html, but looking at the source of the
output page, I still get:

<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

      <meta content="HTML Tidy, see www.w3.org" name="generator">
      <title>Untitled</title>
   </head>
   <body>
      <p>some " text 's</p>
   </body>
</html>

e.g. I don't have doctype declaration, and quotes are not escaped as
entities.

Maybe somebody already used jtidy properties inCocoon?
Please explain me my mistake!!!

Thank you very much for help

Anna
----- Original Message -----
From: "SAXESS - Hussayn Dabbous" <dabbous@saxess.com>
To: <cocoon-users@xml.apache.org>
Sent: Tuesday, December 17, 2002 11:36 AM
Subject: Re: Configuring JTidy


hi;

i didn't use the jtidy with cocoon yet, hence
i'm just guessing:

1.) if you want HTML as output, your serialiser should be
     the html serialiser. You are using the xml serialiser
     so you get xml back instead of html.

2.) In your jtidy.properties you may have a typo:

  output-xml=no
  outpu-xhtml=yes  <== this corrected in your properties ?
  quote-marks=yes
  uppercase-tags=no
  doctype=transitional

regards, hussayn

Anna Afonchenko wrote:
> Maybe I do something wrong, but I don't get the result that I want.
> I declared the HTMLGenerator with jtidy-config property and created the
> jtidy.properties
> file in the same directory with the sitemap.xmap file.
> In the jtidy.properties file I wrote the following lines:
>
> output-xml=no
> outpu-xhtml=yes
> quote-marks=yes
> uppercase-tags=no
> doctype=transitional
>
> The input html file is:
>
> <html>
>  <head>
>   <title>Untitled</title>
>  </head>
>  <body>
>   <p>some " text 's
>  </body>
> </html>
>
> If I run Tidy externally (using tidyui program) with these properties set,
I
> get the following tidied file:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>     <title>Untitled</title>
> </head>
>
> <body>
>     <p>some &quot; text &#39;s</p>
> </body>
> </html>
>
> and that's how I want HTMLGenerator in cocoon to return it too, but if I
run
> the same input file through cocoon pipeline with HTMLGenerator and
serialize
> the output as xml, that's what I get:
>
>   <?xml version="1.0" encoding="utf-8" ?>
> - <html>
> - <head>
>   <meta content="HTML Tidy, see www.w3.org" name="generator" />
>   <title>Untitled</title>
>   </head>
> - <body>
>   <p>some " text 's</p>
>   </body>
>   </html>
>
> Maybe someone can explain me what am I doing wrong and how can I make
> HTMLGenerator to tidy the input according given properties.
>
> Please help me.
> Thank you very much
>
> Anna
>
> ----- Original Message -----
> From: "Geoff Howard" <cocoon@leverageweb.com>
> To: <cocoon-users@xml.apache.org>
> Sent: Monday, December 16, 2002 4:30 PM
> Subject: RE: Configuring JTidy
>
>
> should be in a file called jtidy.properties in the same directory as the
> sitemap?  the properties file style would contain each name=value pair on
a
> separate line.
>
> Geoff Howard
> -----Original Message-----
> From: Anna Afonchenko [mailto:anna@ubaccess.com]
> Sent: Monday, December 16, 2002 4:15 AM
> To: cocoon-users
> Subject: Configuring JTidy
>
>
> Hi all.
> I have a very  simple and stupid question.
> In the 2.0.4 version of cocoon the HTMLGenerator now can accept a JTidy
> configuration file.
> The example that is given in the user documentation is:
>
>   <map:generator type="html"
> src="org.apache.cocoon.generation.HTMLGenerator">
>     <jtidy-config>jtidy.properties</jtidy-config>
>   </map:generator>
>
> I am probably very stupid, but from this documentation I don't understand
> where am I supposed to write the additional JTidy properties.
> Let's say I want to set the following properties:
> output-xml=no, output-xhtml=yes,quote-marks=yes
> Can someone please give me an example of how am I defining HTMLGenerator
to
> use this properties when tidying the input file?
>
> Thank you very much for help.
>
> Anna
>
>
> ---------------------------------------------------------------------
> 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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>
>
> ---------------------------------------------------------------------
> 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:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>


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


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


Mime
View raw message