Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


deriving mixed content types

From: "jeroen bekaert" <jbekaert@----.--->
To: xmlschema-dev@--.---
Date: 3/15/2005 4:46:00 PM
Hi all,

I am wondering whether the derivation by extension constructs of the XML
schemas below are correct:

SCHEMA 1 defines a DIDBaseType, and several Complex Types (e.g.
didmodel:StatementType) derived by extension from the DIDBaseType.

SCHEMA 2 defines several Complex Types (e.g. didl:StatementType) derived
by extension from the like-named (didmodel) Complex Types in Schema 1.

Derivation by extension can be used to append new content after the
content of the base type; however - if not mistaken - the structure of the
base type must be kept unchanged. As such, it is not possible to derive a
mixed content model from an element-only content model (and vice versa).

The content type of the base type definition of SCHEMA 1 below is empty.
Is it correct to derive (by extension) a content type 'mixed' of a base
type definition with an empty content type? Can someone point me to the
clause of the W3C XML Schema spec confirming/forbidding the below
extension constructs?

Many thanks
Best regards
Jeroen Bekaert


SCHEMA 1:
....
<complexType name="DIDBaseType" abstract="true"/>
....
<element name="Statement" type="didmodel:StatementType" abstract="true"/>
<complexType name="StatementType">
  <complexContent>
    <extension base="didmodel:DIDBaseType"/>
  </complexContent>
</complexType>
....


SCHEMA 2 (imports SCHEMA 1):
....
<element name="Statement" type="didl:StatementType"
    substitutionGroup="didmodel:Statement"/>
<complexType name="StatementType" mixed="true">
  <complexContent mixed="true">
    <extension base="didmodel:StatementType">
      <sequence>
        <any namespace="##any" processContents="lax" minOccurs="0"/>
      </sequence>
      <attribute name="mimeType" type="string" use="required"/>
      <attribute name="ref" type="anyURI"/>
    </extension>
  </complexContent>
</complexType>
....


--
Digital Library Research and Prototyping team
Los Alamos National Laboratory
PO Box 1663, MS P362
Los Alamos, NM, 87545, USA
tel. +1 (505) 664 0580




From ht@i... Wed Mar 16 09:27:18 2005
Received: from bart.w3.org ([128.30.52.40])
	by frink.w3.org with esmt


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