cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andres Olave" <>
Subject Re: More on non-breaking spaces
Date Fri, 24 Nov 2000 00:53:33 GMT
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"?>

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         =

Causes the DOCTYPE to change and the formatter does change the DOCTYPE

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.


-----Original Message-----


I'm no WML expert and I don't know what would be the impact of such
change, but, have you tried to change the WML formatter to be the XHTML
formatter in you file?:

I think your problem is that you are not able to say that your resulting
XML will use a XHTML DTD like or even a DTD defined by you. Using the
XHTML formatter, the XHTML DTD is implied (I think) and the &#160; char
is shown as &nbsp;.

I think it would be nice to have a XML formatter that generates XML that
uses a DTD specified by the developer somehow, if it's not already



Andres Olave wrote:

> Hi all,
> I should have expected these replies because I changed subjects between
> related emails. Silly silly me.  You can have a look at the first email i
> sent entitled: "using nbsp; in wml" which resides in the archive just
> this thread.
> On with the reply:
> You see, i already know about "&#160;" business and it DOESNT work in the
> Nokia browser.  Why?
> Becasue what cocoon does, is translate "&#160;" to the actual character
> within the resultant file (ie. the source wml or html file).
> If you look at any source file that u generate using cocoon there will be
> strings of "&#160;".  There are only the actual blank spaces (non-breaking
> kind) within the source file.  This is works in IE and I presume any html
> browser because they probably directly use the character.  But in the
> nokia browser, which has to parses the source file, it gives the following
> error "cannot convert character".  The browser cannot display the page.
> i replace the space character cocoon outputs the string "&nbsp;" or even
> "&#160;", then everything works fine!
> Also anything that looks like "&amp;nbsp;" in the source file will of
> also fail.  This rules out using CDATA or manually putting "&amp;nbsp;" as
> part of the xslt, becaue "&amp;" isn't escaped (unlike "&160;").
> And lastly as most people know, output escaping cannot be disabled totally
> in cocoon
> If this is confusing you lets get down to the really simple question at
> core of my problem:
> I am wondering, once again, is there anyway to have a string such as
> "&nbsp;" or even "&#160;" appear in the source file?
> If not what the hell should i do? Becasue i really need these "nbsp;".
> Should i have a hack at the cocoon source?
> Andres
> -----Original Message-----
> Can you not use &#160;
> Steve
> -----Original Message-----
> From: Andres Olave []
> Sent: Wednesday, November 22, 2000 1:59 AM
> To: Cocoon-Users
> Subject: More on non-breaking spaces
> Hi again,
> An adendum to the last message
> To preempt the eventual - "You should just use CDATA sections"->
> 	This doesn't work as
> 		<!<CDATA[&nbsp;]>>
> 			becomes
> 				&amp;nbsp;
> fun fun fun
> all this escaping,non-escaping, re-escaping business is getting really
> annoying and confusing
> All i want is the string "&nbsp;" to be preserved!  Is this possible?
> Andres
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message