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

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