[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: why whitespace counts as a node?

  • From: Amelia A Lewis <amyzing@talsever.com>
  • To: xml-dev@lists.xml.org
  • Date: Sat, 13 Nov 2010 18:58:27 -0500

Re:  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?

Compare:

<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).

Amy!
-- 
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]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.