W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2002

RE: Feature request - anonymous simplecontent type definition within complex type definition

From: Michael Leditschke <mike@ammd.com.au>
Date: Sat, 29 Jun 2002 00:52:31 +1000
To: "Priscilla Walmsley" <priscilla@walmsley.com>, "'James Clark'" <jjc@jclark.com>, <www-xml-schema-comments@w3.org>
Message-ID: <LOBBICBLDJIJHPNJFPOLGEFDCIAA.mike@ammd.com.au>

Priscilla wrote:

> 
> Yes, sorry - I read the message too quickly and overlooked the fact that
> you were restricting anyType rather than a simple type definition.
> 
> I think this _should_ work because it is the equivalent of deriving a
> simple content type from an emptiable mixed content type.  There is a
> contradiction in the rec regarding this (see R-68 [1]), but the WG has
> agreed to allow this. 
> 
> Nice solution!

If you wouldn't mind, I'd appreciate a more basic explanation for a
garden variety user like me. If I understand, 

1) urType is the root of the complex type tree, so all complex types may
   be considered restrictions of urType

2) it is allowable to derive a complex type with simple content from a
   complex type with mixed content where the minOccurs attributes
   mean its possible to have no elements, only text.

3) urType by virtue of 1) may be considered to be a mixed content type
   as per 2) and hence can be restrictied as per James's example

I guess what throws me in James's solution is that I haven't up until now 
needed to use a simple type definition within a complex type definition in
the way James has, so the syntactical structure is unfamiliar.

Would the syntax be similar in the case you cite of a mixed content 
complex type restricted to one of simple content? For instance, would
the only diference be the replacement of urType with the user defined
named type?


Regards
Michael
Received on Friday, 28 June 2002 10:52:41 GMT

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