Lists Home |
Date Index |
- From: John Cowan <email@example.com>
- To: XML Dev <firstname.lastname@example.org>
- Date: Thu, 06 Aug 1998 15:54:47 -0400
Peter Jones scripsit:
> P.S. I have read the XML 1 spec concerning whitespace, but this seems to
> contain a logical contradiction. Viz:
Let's try to sort out the confusion with a few well-chosen verbs.
> "An XML processor must always pass all characters in a document that are
> not markup through to the application.
That means that XML processors can't ever *discard* whitespace
unless it's within markup.
> A validating XML processor must
> also inform the application which of these characters constitute
> whitespace appearing in element content.
That means that validating processors, but not necessarily other
processors, must *flag* whitespace that is present in elements
whose content model allows only other elements, not PCDATA as well.
Non-validating processors are allowed to ignore this requirement
because they don't necessarily know what the content model of
an element is.
The wise application, therefore, will not count on the presence of
this flagging unless it knows that a validating parser is in use.
> xml:space...attached to an element to signal an intention that in that
> element, white space should be preserved by applications. In valid
> documents, this attribute, like any other must be declared if it is
The "xml:space='preserve'" attribute value *signals* the document
author's intention to make whitespace as significant to a processing
application as any other character data. This intention should be
implemented by the application through checking the value of this
attribute: the parser has nothing to do with it.
> The value "default" signals that applications' default white space
> processing modes are acceptable for this element..."
The "xml:space='default'" attribute value, on the other hand, signals
that processing applications should follow their own rules about
ignoring, selectively ignoring, or respecting whitespace, whatever
those might be. Again, the parser has nothing to do with it.
John Cowan http://www.ccil.org/~cowan email@example.com
You tollerday donsk? N. You tolkatiff scowegian? Nn.
You spigotty anglease? Nnn. You phonio saxo? Nnnn.
Clear all so! 'Tis a Jute.... (Finnegans Wake 16.5)
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)