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

RE: Empty complexType with mixed="true"

From: Shlomo Yona <S.Yona@F5.com>
Date: Tue, 18 Mar 2008 01:57:49 -0700
Message-ID: <AB313AF70F994447A667F4D942CA655717BAB57A@excheight.olympus.f5net.com>
To: "Michael Kay" <mike@saxonica.com>, <xmlschema-dev@w3.org>
RE: Empty complexType with mixed="true"

Thank you.

Shlomo


-----Original Message-----
From: Michael Kay [mailto:mike@saxonica.com]
Sent: Tue 3/18/2008 10:56 AM
To: Shlomo Yona; xmlschema-dev@w3.org
Subject: RE: Empty complexType with mixed="true"
 
If a complex type is empty, then no child elements are allowed. But if the
mixed=true, then you are still allowed text nodes, comments, and processing
instructions as children; and even if mixed=false, you are still allowed
comments and processing instructions (and empty CDATA sections, I think). So
it's wrong to say that an empty complex type disallows all content.
 
Michael Kay
http://www.saxonica.com/


  _____  

From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Shlomo Yona
Sent: 18 March 2008 08:14
To: xmlschema-dev@w3.org
Subject: Empty complexType with mixed="true"




Hello,

I have the following example test based on XML schema w3c test suite:

Instance:

<?xml version="1.0"?>
<root>test</root>


Schema:

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
        <xs:complexType name="fooType" mixed="1"/>
        <xs:element name="root" type="fooType"/>
</xs:schema>


I understand from the spec that empty complex type forbids any content, but
apparently, mixed="1" overrides this and seems to allow textual content
which is anySimpleType.

Is this a correct interpretation of the spec?

Thanks.

Shlomo. 
Received on Tuesday, 18 March 2008 08:58:43 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.