Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Empty complexType with mixed="true"

From: "Michael Kay" <mike@--------.--->
To: "'Shlomo Yona'" <S.Yona@--.--->, <xmlschema-dev@--.--->
Date: 3/18/2008 8:56:00 AM
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@w... [mailto:xmlschema-dev-request@w...] On
Behalf Of Shlomo Yona
Sent: 18 March 2008 08:14
To: xmlschema-dev@w...
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. 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent