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

RE: Mixed content and empty content

From: Michael Kay <mike@saxonica.com>
Date: Thu, 1 Nov 2007 16:01:14 -0000
To: <dmaze@us.ibm.com>, <xmlschema-dev@w3.org>
Message-ID: <013c01c81ca0$6e6ad7a0$6501a8c0@turtle>
RE: Mixed content and empty content
> Empty is a special case of element-only content, and whitespace is always
> allowed in element-only content. I think.

XML Schema 1.0, section 3.4.4, clause 2.1 states that if the {content type}
of a complex type is empty(which is the case for an empty <xs:complexType/>
declaration with mixed="false") then the element being validated may have no
character or element information item [children] at all, which sounds like
it explicitly excludes whitespace.  So <foo/> and <foo></foo> would both be
valid, but not <foo> </foo>. 
 
Thanks for the correction. Shouldn't try to answer questions from memory.
 
Michael Kay
http://www.saxonica.com/ 
Received on Thursday, 1 November 2007 16:01:33 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.