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

ACTION 08 : Suggested code for "annotation where used" of complex types

From: Laurent Henocque <laurent.henocque@gmail.com>
Date: Fri, 26 May 2006 14:36:46 +0200
Message-ID: <4476F65E.4030907@gmail.com>
To: SAWSDL WG <public-ws-semann@w3.org>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

As a follow up to Action 08, I try to provide an example of how complex types might receive an external annotation. I
believe the term "external annotation" is inappropriate, since it is ambiguous with the idea of a permanent annotation
that would be provided from the outside of the main xsd.

Since the idea is to annotate an element having a complex type at the place where the type is used, I call this "where
used" annotation, hoping that some native English speaker can propose a better name for this if the idea is retained.

The example is excerpted from the WSDLS specification example, and inserted in the POBilling.xsd schema. Thanks to John
Miller and a colleague for having pointed me to this example:

http://www.w3.org/Submission/WSDL-S/#Example

In POBilling, the same complex type POAddress is used twice: once for "shipping" and the other time for "billing".
Although it can be accepted that this data type can be used for these two close aims, it may also very well be the case
that they receive distinct annotations.

My suggestion is very straightforward: annotate complex types where they are used, very much like simple types. In the
example below, I imagine the existence of two different concepts in the model space: "ShippingAddress" and "BillingAddress"

If some internal annotation exists for a complex type as well, any "where used" annotation takes precedence over the
internal one.


>>>>> adapted example
POBilling.xsd, which defines the billing information in a purchase order, is given below. In POBilling.xsd, the elements
of POBilling complex type namely shipToAddress and billToAddress are of type POAddress which is a complex type in
itself. Therefore, the specification of semantic annotations for these contained complex types are deferred to the
corresponding XSDs - in this case POAddress.xsd

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="qualified"
 elementFormDefault="unqualified"
 targetNamespace="http://lsdis.cs.uga.edu/projects/meteor-s/wsdl-s/examples/purchaseOrder.wsdl"
 xmlns="http://www.w3.org/2001/XMLSchema"
 xmlns:xsd1="http://lsdis.cs.uga.edu/projects/meteor-s/wsdl-s/examples/purchaseOrder.wsdl"
 xmlns:wssem="http://lsdis.cs.uga.edu/projects/meteor-s/wsdl-s/examples/purchaseOrder.wsdl"
 xmlns:POOntology="http://lsdis.cs.uga.edu/projects/meteor-s/wsdl-s/ontologies/PurchaseOrder.owl">

  <include schemaLocation="POAddress.xsd"/>
  <complexType name="POBilling">
    <all>
      <element name="shipToAddress" nillable="true" type="xsd1:POAddress"
	sawsdl:modelReference="http://example.org/RNet#ShippingAddress"/>
      <element name="billToAddress" nillable="true" type="xsd1:POAddress"
	sawsdl:modelReference="http://example.org/RNet#BillingAddress"/>
      <element name="accountID" nillable="true" type="xsd1:string"
	       sawsdl:modelReference="POOntology#AccountID"/>
    </all>
  </complexType>
</schema>




- --
*************************************************************************
Laurent Henocque
Maître de Conférences Hdr
tel: +33 6 83 88 20 01
Enseignant à l'Ecole Supérieure d'Ingénieurs de Luminy - Marseille
    http://www.esil.univ-mrs.fr
Chercheur au Laboratoire des Sciences de l'Information et des Systèmes - Marseille
    http://www.lsis.org

clé publique open pgp / open pgp public key :
http://www.esil.univ-mrs.fr/~henocque/0x987E183.pub.asc
************************************************************************
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEdvZeIF1tz5h+GDARAo1bAKCDlaBgRqWf1QgEW0P+MxTkHiG5uQCeLg5Y
AOnJWbxGUg9tVALnjWTjgzo=
=U2P8
-----END PGP SIGNATURE-----
Received on Friday, 26 May 2006 12:37:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 17 April 2012 12:14:27 GMT