Whitespace in EMPTY model

Chris Maden crism at oreilly.com
Tue Oct 20 22:09:20 BST 1998


[Dean Roddey]
> If the model is EMPTY, what happens to the whitespace between that
> element's begin/end tags? Is that defined anywhere? Should it always
> just be skipped?  What if the element has the XML whitespace
> attribute or the parser was told to maintain ignorable whitespace?

That's a good question.

I was ready to reply that an EMPTY element must have nothing between
the start- and end-tags, but that's not immediately clear upon reading
the spec.

   Validity Constraint: Element Valid

   An element is valid if there is a declaration matching elementdecl
   where the Name matches the element type, and one of the following
   holds:
    1. The declaration matches EMPTY and the element has no content.

but it's not clear whether "no content" prohibits ignorable
whitespace.

-Chris
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list