W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

Defining a New Construct

From: Faiz A Currim <fcurrim@bpa.arizona.edu>
Date: Tue, 23 Apr 2002 20:09:17 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-ID: <Pine.OSF.4.21.0204231701040.1020517-100000@manta.bpa.arizona.edu>
Is it possible to define a new construct (i.e. like "element",
"attribute" ...) using XSchema that extends one of the old constructs? 

>From what i've been able to determine, this is done in the XSchema
definition itself in the following way:

<xs:complexType name="element" abstract="true" mixed="false">
  <xs:complexContent>
    <xs:extension base="xs:annotated">
      <xs:sequence>
 	...
so it would seem that "element" extends "annotated". However if i try to
extend "element" in an external .xsd file - using a similar style as
above:
<xs:complexType name="myElement" abstract="true" mixed="false">
  <xs:complexContent>
    <xs:extension base="xs:element">
      <xs:sequence>
 	...

the validator always stops me with an "xs:element is an invalid value for
the extension base". 

your help is appreciated. 

faiz
Received on Wednesday, 24 April 2002 04:08:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:30 GMT