XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
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?


> 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?
>
Once you accept the usefulness of inline markup like this:

<p>I just <i>love</i> <place>London</place></p>

then you have to accept that the space between "love" and "London" is 
just as significant as the one between "I" and "just".

Some of the XML specs do try and recognize that whitespace in mixed 
content needs to be treated differently from whitespace in "element-only 
content" (like database dumps). But part of the XML philosphy is that 
XML instances can be used without having a schema or DTD, which means 
you don't always know whether it's mixed content or not. So you have to 
treat it as significant.

This is one of the reasons it's best to avoid "non-standard" uses of 
mixed content like this:

<date-of-birth>
<source>birth-certificate</source>
   1920-03-04
</date-of-birth>

Michael Kay
Saxonica




[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