OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Re: why whitespace counts as a node?

On Sat, 13 Nov 2010 23:19:01 +0000 (UTC), Thufir Hawat wrote:
> Ok, so it does serve a purpose.  However, even in xhtml, if you want 
> white space in a paragraph of text, then you can put that whitespace 
> between tags.  I'm sure it's my lack of experience, but, for example, 
> when do you need that white space?


<p>Click this <a href="http://example.com/";>link!</a></p>

<p>Click this<a href="http://example.com/";> link!</a></p>

Possibly mentats find the extra underline at the beginning of the link 
insufficiently annoying to be concerned with.  It's presentational, 
rather than content, after all.  A similar issue arises with all mixed 
content; suppose that you are applying a style that modifies font size, 
position, base line, or something of the sort, and including the 
preceding (or following) space in the span creates unpleasant results.

Since mixed content was (and remains) a very big deal in some domains, 
being able to accurately define a span (without being forced to include 
leading or trailing whitespace that doesn't belong to the span but is 
part of the context around the span) remains important in those domains.

For data-driven domains, where spacing is generally exclusively a 
lexical artifact that ought to be ignored, it can be annoying to find 
that the default behavior assumes support for mixed content.  *shrug*  
If it's sufficiently data-driven, there's likely to be a W3C XML 
Schema, which will allow you to control the presentation of whitespace 
to the application (so long as the parser validates).

Amelia A. Lewis                    amyzing {at} talsever.com
  "You go on.  You just go on.  There's nothing more to it, and there's
no trick to make it easier.  You just go on."
  "What do you find on the other side?  When you go on?"
  She shrugged.  "Your life again.  What else?"
		-- Harra Csurik and Miles Vorkosigan

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS