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

Re: Whitespace

  • From: dgd@c... (David G. Durand)
  • To: xml-dev@i...
  • Date: Tue, 26 Aug 1997 10:14:40 -0500

Re: Whitespace
At 7:39 AM -0500 8/26/97, Peter Murray-Rust wrote:
>Actually I would like to develop CML *without* its own set of rules as far
>as possible. OK, Only chemists want to know how to display <ATOMS>, but
>there is just as much material of the form:
><P> We took
><VAR TYPE="float">23.03+e02</VAR>
><UNIT>gram</UNIT>
>of water
></P>
>and we want to know whether there is whitespace round the contained elements.
>As I have repeatedly said I would like to borrow a communal solution rather
>than invent yet another one.
But there is whitespace around the contained elements. If you don't want
it, don't put it in...

XML passes all whitespace in the source to the application.

<P> We took <VAR TYPE="float">23.03+e02</VAR><UNIT>gram</UNIT> of water</P>

has no space. An Author can be told to enter either one, depending on what
they want. If you want the effect of my markup with the source you gave,
that's a CML convention, to the effect that VAR and UNIT "eat" adjacent
whitespace...

or a formatting convention.

The worst problem I see with whitespace is one that can't be solved by a
parser easily:

if I have a document bit like:

This is an end of paragraph.</P><p>And this is the start of another.

There's no way to tell that there isn't a word "paragraph.And" in the
document, without knowing the meaning of the tags. Of course there is only
one word in:

<font size=+5>L</font>arge initial letter

But this tends to bear out my view that whitespace handling is just the tip
of an iceberg only soluble with a lot of semantic knowledge -- that it is
the duty of stylesheet and DTD authors to determine.


_________________________________________
David Durand              dgd@c...  \  david@d...
Boston University Computer Science        \  Sr. Analyst
http://www.cs.bu.edu/students/grads/dgd/   \  Dynamic Diagrams
--------------------------------------------\  http://dynamicDiagrams.com/
MAPA: mapping for the WWW                    \__________________________



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


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.