W3C home > Mailing lists > Public > public-ws-semann@w3.org > June 2006

Re: why distinguish between simple and complex types? (issue 11)

From: Rama Akkiraju <akkiraju@us.ibm.com>
Date: Mon, 5 Jun 2006 17:59:03 -0400
To: verma@cs.uga.edu
Cc: "Jacek Kopecky" <jacek.kopecky@deri.org>, kunal.verma1@gmail.com, "SAWSDL public list" <public-ws-semann@w3.org>
Message-ID: <OF69D01DEA.EA7F1C39-ON85257184.0077C6AD-85257184.0078C3F7@us.ibm.com>

Kunal,

Were you referring to precedence issues on these two examples? because if
so, these examples don't really present such issue. In example 1, complex
type annotaton doesn't really say anything about what annotations apply to
leaf node elements. So, there is no conflict.

I think when you mention conflicts you are talking about in the context
where a schema mapping is specified at a complex type in addition to model
references on the contained elements. If so, if I understand you correctly
you are making two independent points in this e-mail. Is that correct?

So, here is a summary of  why we need to distinguish between simple and
complex types based on all the discussions.

a simple type can only have model references and no schema mappings where
as a complex type can have both model references and schema mappings. These
schema mappings specified at a complex type can have an implication on the
model references of simple types contained in a complex type. That's why we
need to differentiate simple and complex types.

Regards
Rama Akkiraju


kunal.verma1@gmail.com wrote on 06/05/2006 05:25:13 PM:

> Jacek,
>
> From our point of view, it would be nice to be able to annotate
> complexTypes, elements and simpleTypes. Jacek's example illustrates
> the first two (note, we changed the outer element to complexType).
> The second example illustrates the use of a simpleType.
>
> Example 1:
>
> <complexType name="Name" sawsdl:modelReference="ontology#name">
>    <sequence>
>       <element name="Title" sawsdl:modelReference="ontology#title"/>
>       <element name="First" sawsdl:modelReference="ontology#firstName"/>
>       <element name="Last" sawsdl:modelReference="ontology#familyName"/>
>    </sequence>
> </complexType>
>
> Example 2:
>
> <xs:simpleType name="fahrenheitWaterTemp"
>    sawsdl:modelReference="ontology#FahrenheitWaterTemperature">
>    <xs:restriction base="xs:number">
>       <xs:fractionDigits value="2"/>
>       <xs:minExclusive value="0.00"/>
>       <xs:maxExclusive value="100.00"/>
>    </xs:restriction>
> </xs:simpleType>
>
> Finally, allowing annotations for both elements and complexTypes
> begs the question of which takes precedence when used together. As
> pointed out by Laurent in http://lists.w3.org/Archives/P
> ublic/public-ws-semann/2006May/ 0043, the approach of giving the
> element annotation precedence over the type annotation seems like
> the way to go.
>
> "If some internal annotation exists for a complex type as well, any
> "where used" annotation takes precedence over the internal one."
>
>
> Thanks,
> John Miller and Kunal Verma
>
>
> On 6/5/06, Jacek Kopecky <jacek.kopecky@deri.org > wrote:
> >
> > Hi all,
> >
> > below is an excerpt from Rama's analysis of the relation of
> > modelReference and schemaMapping. The quoted part restricts
> > modelReferences to be allowed only on schema leaf elements.
> >
> > On Sun, 2006-06-04 at 13:40 -0400, Rama Akkiraju wrote:
> > > Definition of Simple modelReference:
> > > ModelReferences that point to a single concept in the ontology via
> > > one-to-one association. Simple modelReferences are specified at the
level
> > > of individual (leaf) elements in an XSD.
> >
> > Rama, I wonder why you have the restriction?
> >
> > Using the common structured name example, one could have something like
> > this:
> >
> > <element name="Name" sawsdl:modelReference="ontology#name">
> >   <sequence>
> >     <element name="Title" sawsdl:modelReference="ontology#title"/>
> >     <element name="First" sawsdl:modelReference="ontology#firstName"/>
> >     <element name="Last" sawsdl:modelReference="ontology#familyName"/>
> >   </sequence>
> > </element>
> >
> > Basically, there is a trivial one-to-one correspondence between the
> > element Name and the ontology class "name". Do you think that
expressing
> > this correspondence with modelReference may be harmful?
> >
> > Best regards,
> >
> > Jacek
> >
> >
> >
>
Received on Monday, 5 June 2006 23:36:35 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:58:45 UTC