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

RE: restricting anySimpleType in complexType definition

From: Mark Feblowitz <mfeblowitz@frictionless.com>
Date: Mon, 17 Jun 2002 16:17:47 -0400
Message-ID: <4DBDB4044ABED31183C000508BA0E97F040ABCA7@fcpostal.frictionless.com>
To: "'Dare Obasanjo'" <dareo@microsoft.com>, Calvin Smith <calvins@SIMS.Berkeley.EDU>, xmlschema-dev@w3.org

Alas - I got the first part right (end-user use of anySimpleType) but not
the second part (no derivation via restriction). 

Mark Feblowitz                                   	
XML Architect
       [t]   617.715.7231                                     	
       [f]   617.495.0188
Frictionless Commerce Incorporated 	
       [e]  mfeblowitz@frictionless.com
       [w] http://www.frictionless.com
       [m] 400 Technology Square, 9th Floor
             Cambridge, MA 02139 
Open Applications Group Incorporated
       [e]  mfeblowitz@openapplications.org
       [w] http://www.openapplications.org 

 -----Original Message-----
From: 	Dare Obasanjo [mailto:dareo@microsoft.com] 
Sent:	Monday, June 17, 2002 4:04 PM
To:	Calvin Smith; xmlschema-dev@w3.org
Subject:	RE: restricting anySimpleType in complexType definition

anySimpleType restrictions are disallowed. Read more on this in the W3C
XML Schema Comments page at

All that glitters has a high refractive index.

This posting is provided "AS IS" with no warranties, and confers no

> -----Original Message-----
> From: Calvin Smith [mailto:calvins@SIMS.Berkeley.EDU] 
> Sent: Monday, June 17, 2002 12:23 PM
> To: xmlschema-dev@w3.org
> Subject: restricting anySimpleType in complexType definition
> greetings,
> I have a question about restricting anySimpleType.  I wanted 
> to define a type based on xsd:token that would allow for a 
> few possible values for the element content and an optional 
> attribute.  After much difficulty, I finally got the 
> following to validate fine, and it appears to be what I 
> wanted, but I am not sure if this is legal or just not caught 
> by my validator (XML Spy 4.4).  The base below is 
> anySimpleType, which I thought shouldn't work, since it is 
> not a complex type.  Is what I have below legal, and is there 
> a better way to define a type with an element with enumerated 
> values and an attribute?
> <xsd:complexType name="ExampleType">
>   <xsd:simpleContent>
>     <xsd:restriction base="xsd:anySimpleType">
>       <xsd:enumeration value="a possible value"/>
>       <xsd:enumeration value="another possible value"/>
>       <xsd:attribute name="anAttribute" type="xsd:token"/>
>     </xsd:restriction>
>   </xsd:simpleContent>
> </xsd:complexType>
> thanks,
> calvin
Received on Monday, 17 June 2002 16:18:18 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:57 UTC