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

RE: Identifying absent behavior

From: <Noah_Mendelsohn@lotus.com>
Date: Wed, 7 Nov 2001 10:52:56 -0500
To: "Chan, Philip" <Philip.Chan@rbccm.com>
Cc: xmlschema-dev@w3.org
Message-ID: <OFB3D8788A.A81E9AE4-ON85256AFD.0057C29F@lotus.com>
empty and absent xml
Philip Chan writes:

>> It seems to me that there is no difference between <t></t> and <t/> 
according to schema definition

It's not schema that makes them the same, it's XML.  From [1]:

[Definition: An element with no content is said to be empty.] The 
representation of an empty element is either a start-tag immediately 
followed by an end-tag, or an empty-element tag. [Definition: An 
empty-element tag takes a special form:]  In the XML Infoset 
Recommendation [2], which schema uses as its input, the two are 
indistinguishable.  So, schema essentially can't tell the difference if it 
wants to.  DTD's have the same characteristic (though use of the <t/> form 
is encouraged for elements explicitly declared as EMPTY).

[1] http://www.w3.org/TR/REC-xml#sec-starttags
[2] http://www.w3.org/TR/xml-infoset/#infoitem.element

------------------------------------------------------------------------
Noah Mendelsohn                                    Voice: 1-617-693-4036
Lotus Development Corp.                            Fax: 1-617-693-8676
One Rogers Street
Cambridge, MA 02142
------------------------------------------------------------------------
Received on Wednesday, 7 November 2001 11:03:01 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
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-2007 All Rights Reserved.