cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marc Portier" <...@outerthought.org>
Subject RE: How to get HTML (not XHTML) from the HTMLSerializer (C2.0.1)
Date Fri, 12 Apr 2002 11:12:44 GMT
Hi,

[1]
I thought <br /> was the classic tric for all elder browsers?
as in:
  less_then letter_b letter_r [[[SPACE]]] slash biggert_then

those elder browsers consider /-es appended to the tagname to be part of the
tagname,
and the br/ tag is as meaninless as your own invention to it (and thus
ignored)

[2]
as for you remark to 'easier' I guess the serializer idea comes from the
separation of concerns philosophy... the one that writes an XSLT can not be
sure that it will (at all times) be the last step in the show, not even if
it's output is XHTML

(think about post-processing with another XSLT step that e.g. would change
all
 background color attributes?)

Should check the code, but I expect the output property 'method' of the xsl
to be
overriden to 'xml' anyway when used in a transformer...

[3]
in every case I do live under the impression that the html serializer will
create <br> for you instead of <br/> did you check your sitemap?

And for this I did check the code: as expected the html serializer is
precisely
an empty TRaX transformer that gets an output property method="html"

            handler = getTransformerFactory().newTransformerHandler();
            format.put(OutputKeys.METHOD,"html");
            handler.setResult(new StreamResult(this.output));
            handler.getTransformer().setOutputProperties(format);


which boils down to checking your sitemap again?

-marc=

> -----Original Message-----
> From: Peter Robins [mailto:cocoon@peterrobins.co.uk]
> Sent: vrijdag 12 april 2002 12:38
> To: cocoon-users@xml.apache.org
> Subject: Re: How to get HTML (not XHTML) from the HTMLSerializer
> (C2.0.1)
>
>
> excuse me if I'm missing the point but, if the objective is to get <br>
> instead of <br/>, wouldn't it be far easier to use the html
> output method in
> the xslt script directly, and not use the HTML serializer?
>
>
> On Friday 12 Apr 2002 7:59, Nicola Ken Barozzi wrote:
> > From: "Yuri Gadow" <yuri.gadow@ieee.org>
> >
> > > > Try with <br name="br"/>
> > >
> > > If you mean an XSLT using that syntax (otherwise, I guess I'm missing
> > > something), I'm afraid that doesn't help.
> >
> > It's a hack to get Netscape 4 to use that tag.
> >
> > If I write:
> >
> >   <html>
> >    <body>
> >    ciao<br/>
> >    ciao</body>
> >   </html>
> >
> > in Netscape 4.7 I get:
> >
> > ciaociao
> >
> > but if I write this:
> >
> >   <html>
> >    <body>
> >    ciao<br name="br"/>
> >    ciao</body>
> >   </html>
> >
> > I get:
> >
> > ciao
> > ciao
> >
> > I can also write <br whattheheck="myhackytag"/> and it's the same, the
> > trick is putting in an attribute.
> >
> > In this way Netscape 4 can show valid XHTML, which is IMHO
> better anyways
> > than <br>.
> >
> > Just write a stylesheet that converts adds an attribute to <br/>s and
> > copies all other stuff, and you're done.
>
> ---------------------------------------------------------------------
> 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: <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/faqs.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