Re: Multiple spaces converted into one

Irene Vatton wrote:

> When a XHTML document is served with the text/html mime type, these
> browsers manage the document as a HTML document and then ignore
> xml:space attributes.  As the mime type is under the control of the
> web server, this is an issue.

My tests, with Mozilla and MSIE ignoring the xml:space attribute, were
done with file access, not via HTTP.  I would expect the browser to
determine the file type from the header, so it seems that these browsers
don't support this attribute at present.

If this is the case, then for the next few years, while two or more of
the major browsers do not handle xml:space, I think the only way to have
Amaya deliver the author's multiple spaces to HTML or XHTML browsers is
to implement the same algorithms as Mozilla Composer while editing.

> That's normal, xml:space:"preserve" means that newlines are managed as
> break and spaces are managed as no-break spaces.  It's used to
> generate a sort of <pre>.

At first I thought you meant "newlines are interpreted as a line break",
but:

<p><span xml:space="preserve">aaa bbb
ccc</span></p>

is displayed as:

aaa bbb ccc

So I now understand what you wrote as "newlines are interpreted as an
ordinary space or other whitespace characters are in HTML: as a single
breakable whitespace".


  - Robin

Received on Tuesday, 5 September 2006 09:19:40 UTC