W3C home > Mailing lists > Public > public-prov-wg@w3.org > November 2012

Re: ISSUE-595: Prov-xml subtyping needs to be marked in the document

From: Hua, Hook (388C) <hook.hua@jpl.nasa.gov>
Date: Thu, 22 Nov 2012 00:00:31 +0000
To: Luc Moreau <L.Moreau@ecs.soton.ac.uk>, Stephan Zednik <zednis@rpi.edu>
CC: Provenance Working Group <public-prov-wg@w3.org>
Message-ID: <4E89C8FBFDC5114C91B9653584F1FEC9103E7524@ap-embx-sp40.RES.AD.JPL>
Hi Stephan and Luc,

If we end up supporting both ways (three if you count Luc's one-liner
attribute way), then it may leave some variability of validation in the
different approaches.

For example, with the <prov:wasRevisionOf> approach, it can be explicitly
validated by code ingesting the XML traces since the type is expressed in
the XSD.

But with the <prov:type xsi:type="xsd:QName">prov:Revision</prov:type>
approach, the type value is currently left open as an xs:anySimpleType.

Since we are explicitly defining an <prov:wasRevisionOf>, should we then
define a matching set of restriction constraints on <prov:type> ? For
example, a simpleType restriction with enumerations that match the
explicit extensions:

  <xs:complexType name="Derivation">
    <xs:sequence>
      <xs:element name="generatedEntity"  type="prov:EntityRef"/>
      <xs:element name="usedEntity"       type="prov:EntityRef"/>
      <xs:element name="activity"         type="prov:ActivityRef"
minOccurs="0"/>
      <xs:element name="generation"       type="prov:GenerationRef"
minOccurs="0"/>
      <xs:element name="usage"            type="prov:UsageRef"
minOccurs="0"/>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="prov:label"/>
        <xs:element ref="prov:type">
            <xs:simpleType>
                <xs:restriction base="xs:anySimpleType">
                    <xs:enumeration value="prov:Revision"></xs:enumeration>
                </xs:restriction>
            </xs:simpleType>
        </xs:element>
        <xs:any namespace="##other"/>
      </xs:choice>
    </xs:sequence>
    <xs:attribute ref="prov:id"/>
  </xs:complexType>

  <xs:element name="wasDerivedFrom" type="prov:Derivation"/>


--Hook




On 11/19/12 10:33 PM, "Luc Moreau" <L.Moreau@ecs.soton.ac.uk> wrote:

>Hi Stephan,
>
>I think I concur with your conclusion: it may end up making tooling
>complex. Plus, the third way of writing things:
>
><proc:agent xsi:type="prov:Person" prov:id="ex:e"/>
>
>Professor Luc Moreau
>Electronics and Computer Science
>University of Southampton
>Southampton SO17 1BJ
>United Kingdom
>
>>>> 
>>>> <prov:wasDerivedFrom>
>>>>  <prov:generatedEntity prov:ref="tr:WD-prov-dm-20111215"/>
>>>>  <prov:usedEntity prov:ref="tr:WD-prov-dm-20111018"/>
>>>>  <prov:type xsi:type="xsd:QName">prov:Revision</prov:type>
>>>> </prov:wasDerivedFrom>
>>>> 
>>>> could now be modeled as
>>>> 
>>>> <prov:wasRevisionOf>
>>>>  <prov:generatedEntity prov:ref="tr:WD-prov-dm-20111215"/>
>>>>  <prov:usedEntity prov:ref="tr:WD-prov-dm-20111018"/>
>>>> </prov:wasRevisionOf>
>>>> 
>>>>


>>>>
Received on Thursday, 22 November 2012 00:02:43 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 22 November 2012 00:02:43 GMT