Whitespace

Peter Murray-Rust Peter at ursus.demon.co.uk
Tue Aug 26 20:16:40 BST 1997


Thanks Tim - I think this helps (me) considerably :-)

In message <3.0.32.19970826103807.00ab0e60 at pop.intergate.bc.ca> Tim Bray writes:
[...]
> 
> Well DEFAULT is 'irrelevant' in that it expresses no opinion about what
> should be done with whitespace.  the PRESERVE value exists to support

so when might it be used (in preference to a stylesheet, for example?)

> constructs like HTML's <PRE>.  Yes, putting XML-SPACE="PRESERVE" on

Since the whitespace is all passed, presumably a stylesheet is capable of
keeping it all?
 
> something with element content is at the least questionable; but the
> fact that this can be used to do something stupid does not mean it
> isn't useful.

It sounds as if there isn't really very much need for XML-SPACE, and maybe
that has distorted my viewpoint...

> 
> >At present we have (at least) the viewpoints:
> >	- whitespace matters and authors must define precisely what they want
> >		in a document. The SGML community can understand and manage
> >		whitespace. If newcomers find it difficult, they'll have to
> >		learn the rules, or use proper tools.
> 
> Well, they only have to learn one rule: the whitespace you put in
> the document is the whitespace that is in the document.  XML neither
> addeth nor taketh away.

Understood. It is also the whitespace that your authoring tool puts in :-)
 
> >	- most of the people who will want to use XML will graduate from HTML.
> >		This has 'taught' them that whitespace is not significant and
> >		gets normalised somewhere. They will start creating XML by 
> >		analogy with HTML. XML will not succeed unless we can
> >		offer some support for this transitional period.
> 
> Uh, if they are using it for browser applications, I am quite sure that
> browsers, while doing XML, will duplicate the HTML whitespace semantics,
> i.e. eat most of it, and people will just not notice the difference.
> Another way to say this is that the "HTML" whitespace semantic should
> probably be renamed the "browser" whitespace semantic.
> 
> It would be a good and useful thing to write down (precisely) what
> that browser semantic is; it's a little subtler than you'd think.

I think this is the key to much of this discussion. (I am under no illusions
that it may be subtler than I can think :-) It was certainly true that early
HTML browsers could display whitespace very differently and I imagine
that there are still differences.

So - with Tim's encouragement - this seems like a useful thing to aim for.
This semantic seems to be one of the things we are chasing.
 
	P.

-- 
Peter Murray-Rust, domestic net connection
Virtual School of Molecular Sciences
http://www.vsms.nottingham.ac.uk/

xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)




More information about the Xml-dev mailing list