W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2011

Re: How to define a complexType so that derived types can have simple content or complex content?

From: Michael Kay <mike@saxonica.com>
Date: Thu, 03 Nov 2011 23:52:38 +0000
Message-ID: <4EB32946.3030206@saxonica.com>
To: xmlschema-dev@w3.org
On 03/11/2011 17:15, Costello, Roger L. wrote:
> Michael Kay wrote:
>> Why do you want to use the same type to describe two things that appear
>> on the surface to have quite unrelated structure? What are you hoping to
>> achieve, that you could not achieve by using two completely different
>> and unrelated types?
> I want to categorize all elements as either an Object or a property.

I think that's a semantic categorization concerning the meaning or usage 
of the element. As such it has nothing to do with the concept of 'type' 
as defined in XSD, which is a categorization according to constraints on 
the content of the element. This is in line with the conventional use of 
the term in programming languages. I think it's probably a mistake to 
try and use the concept of 'type' to represent an ontological 
distinction of this nature.

If elements in an XML model correspond to concepts such as objects or 
properties in a UML structural model, then I would think it is 
appropriate to capture this provenance using custom annotations in the 
XSD schema.

Michael Kay
Received on Thursday, 3 November 2011 23:53:11 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:19 UTC