cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roger C. Soares" <>
Subject Re: More on non-breaking spaces
Date Fri, 24 Nov 2000 04:50:03 GMT

You're welcome!

About XHTML, the line <?xml version="1.0" encoding="UTF-8"?> is not
required unless the encoding is different from UTF-8 or UTF-16. And the
'DOCTYPE html ...' is always DOCTYPE html, so forcing it to be html may
not be wrong...

I'm afraid that if there is no way to bypass this situation, you will
have to build a WMLFormatter of your own (oh!!). But looking at the xml
version line, I remembered of a similar problem I had with latin

For instance, 'รก' (&aacute;) is not part of the UTF-8 encoding, so the
xml parser was not able to recognize it and caused an error similar to
your nokia compiler. But changing the encoding to ISO-8859-1 the char
was recognized. So, if the nokia compiler can recognize other charsets
and ' ' (&nbsp;) is not really part of UTF-8 changing the encoding of
the output wml could solve your problem...

Just a thougth.



Andres Olave wrote:
> Thanks Roger!
> That was an excellent suggestion.  It works perfectly except for one fatal
> flaw :(
> The header information is now set to:
> "">
> A valid wml document should have something like this:
>         <?xml version="1.0" encoding="UTF-8"?>
>         <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
> "">
> The first line declaring the xml version does not appear to be mandatory in
> most compilers, but would be useful.  The wrong doctype seems to be a
> barrier for the moment.
> The workings of how the DOCTYPE gets set seems a little bizzare to me.  If
> you take a look at your file we usually have:
>         formatter.type.text/wml         = org.apache.cocoon.formatter.XMLFormatter
> This sets the DOCTYPE correctly! So it appears what formatter you use
> shouldn't change the DOCTYPE
> But by changing to how Roger suggests:
>         formatter.type.text/wml         =
> org.apache.cocoon.formatter.XHTMLFormatter
> Causes the DOCTYPE to change and the formatter does change the DOCTYPE
> setting.
> A strange bit of coding perhaps sets the doctype in two different ways in
> each of the repective formatters.  Could someone shed some light on why or
> fix this (if it is a mistake)????
> Also why doesn't XHTML spit out a line declaring its xml version?
> Admittedly i know little about XHTML, but it seems a bit wrong to me, but
> perhaps the heads at w3c know why.
> thanks
> Andres

View raw message