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

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

From: Kunal Verma <verma@cs.uga.edu>
Date: Mon, 5 Jun 2006 17:25:13 -0400
Message-ID: <8f9ef0aa0606051425t6d7d42edp41f360f5c4d2e60a@mail.gmail.com>
To: "Jacek Kopecky" <jacek.kopecky@deri.org>
Cc: "Rama Akkiraju" <akkiraju@us.ibm.com>, "SAWSDL public list" <public-ws-semann@w3.org>
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<http://lists.w3.org/Archives/Public/public-ws-semann/2006May/0043>
ublic/public-ws-semann/2006May/<http://lists.w3.org/Archives/Public/public-ws-semann/2006May/0043>0043<http://lists.w3.org/Archives/Public/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 21:25:34 UTC

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