W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2001

RE: Complex Type Definition Schema Component (Structures)

From: Jason Diamond <jason@injektilo.org>
Date: Sat, 24 Feb 2001 13:06:42 -0800
To: "Jeff Rafter" <jeffrafter@definedweb.com>, <xmlschema-dev@w3.org>
Message-ID: <LAEMKGDBDFAKFNKPFEKLOEBLDGAA.jason@injektilo.org>
Hi, Jeff.

I had encountered the same problem. Section 2.2 says that the abstract data
model does not necesitate any particular API or implementation. Although, it
would have been nice if it were a little more straightforward to map the
components and properties to statically typed languages.

I ended up declaring the ContentType property as an enumeration containing
Empty, Single, Mixed, and ElementOnly. I then added the additional
ContentModel property just as you suggested.

Jason.

> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]On Behalf Of Jeff Rafter
> Sent: Saturday, February 24, 2001 11:44 AM
> To: xmlschema-dev@w3.org
> Subject: Complex Type Definition Schema Component (Structures)
>
>
> I started to try to implement the structures portion of the spec. and am
> finding that certain aspects of some of the schema components don't always
> transfer cleanly to OO programming languages.  An example of this would be
> the Complex Type Definition Schema Component [1].  The property "{content
> type}" seems to have multiple types-- it could be a constant (string, int,
> enumeration, etc.) for "empty, mixed, element-only" or it can be a simple
> type definition or content model-- both of which are Schema
> Components.  How
> to represent this as a single property in an object without the use of a
> variant escapes me. It seems that adding a property "{content
> model}" would
> clear this up in a case such as this.  Then "{content type}"
> could be any of
> "empty, simple, mixed, element-only" and "{content model}" could be a
> reference to a Schema Component (in which case it would be either a simple
> type or a content model), or absent.
>
> Has anyone else noticed this or wished, as I have, that another
> property was
> added?  I know I could easily add these properties to my
> implementation but
> I am trying to be very strict in naming and representation of the Schema
> Components.
>
> [1] http://www.w3.org/TR/xmlschema-1/#Complex_Type_Definition_details
>
> Thanks,
> Jeff Rafter
> Defined Systems,
> http://www.defined.net
>
>
Received on Saturday, 24 February 2001 16:06:54 UTC

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