W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2009

[Bug 7813] New: defaultOpenContent should not prevent inheriting openContent when using extension

From: <bugzilla@wiggum.w3.org>
Date: Mon, 05 Oct 2009 19:11:34 +0000
To: www-xml-schema-comments@w3.org
Message-ID: <bug-7813-703@http.www.w3.org/Bugs/Public/>

           Summary: defaultOpenContent should not prevent inheriting
                    openContent when using  extension
           Product: XML Schema
           Version: 1.1 only
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Structures: XSD Part 1
        AssignedTo: David_E3@VERIFONE.com
        ReportedBy: kbraun@obj-sys.com
         QAContact: www-xml-schema-comments@w3.org
                CC: cmsmcq@blackmesatech.com

I posted to xmlschema-dev about this but didn't get any feedback, so I'm
opening this.

Consider this schema:

<xs:schema ...>
    <xs:defaultOpenContent mode="interleave">
       <xs:any namespace="xyz:myURI">
    <xs:complexType name="Base">
       <xs:openContent mode="interleave">
          <xs:any namespace="##any">
          <xs:element name="elemOne"/>

    <xs:complexType name="Derived">
          <xs:extension base="Base">
                   <xs:element name="elemTwo"/>



In Base, we use an open content that allows elements from any namespace,
whereas the default the open content is more restrictive (only match
xyz:myURI).  We extend Base to create Derived.  According to  Mapping Rules for
Content Type Property of Complex Content (, Derived gets its {open
content} from the schema default, allowing only xyz:myURI.  However, that
violates Derivation Valid (Extension) (point - the
namespace subset requirement).

When applying step 4.2.3 in the mapping rules to Derived, it looks like we're
getting ready to inherit the {open content} from Base, but then we turn around
in steps 5 and 6 and take the default open content, which leads to the above
violation.  I find it hard to believe that this was the intended behavior.  I
would have thought it most natural to inherit the open content from the base

It may be that I am missing something, or that what I just described is really
the intended behavior, but I am certainly surprised by it, and suspect users of
XSD would be likewise surprised.  It isn't entirely unreasonable behavior, but
I found it surprising enough that I wanted to pose this question to make sure
an error wasn't made in the mapping.


Kevin Braun
Objective Systems, Inc.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 5 October 2009 19:11:38 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:50:10 UTC