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

Extension of xsd:element.

From: Reinier Bos <rbos@baan.nl>
Date: Wed, 15 Nov 2000 15:05:01 +0100
Message-ID: <41F966E6F6E5D311AFE000508B6FC21E01DC5B44@ex-nld-u2.baan.com>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
I'm wondering whether I'd be able to (validly) use the following schema:

<?xml version="1.0" encoding="UTF-8"?> 
<xsd:schema targetNamespace="http://www.baan.com/xyz" 
            xmlns:xyz="http://www.baan.com/xyz" 
            xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> 


    <!-- Extend the default element with an 'x' attribute --> 
    <xsd:complexType name="element"> 
        <xsd:complexContent> 
             <xsd:extension base="xsd:element"> 
                  <xsd:attribute name="x" type="xsd:boolean" use="default"
value="false"/> 
             </xsd:extension> 
        </xsd:complexContent> 
    </xsd:complexType> 
</xsd:schema> 



I was hoping that this would allow me to write something like this in
another schema: 

 . 
  . 
   . 
 <xsd:sequence> 
     <xyz:element name="..." x="true"/> 
 <xsd:sequence> 
   .
  .

Regards,
Reinier Bos.
Received on Wednesday, 15 November 2000 09:08:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT