Re: {Disarmed} Re: prov-family.provx errors

On May 10, 2013, at 5:00 AM, Luc Moreau <l.moreau@ecs.soton.ac.uk> wrote:

> 
> Hi Stephan, all,
> 
> So I think it's a good outcome. If we can fix the bug in the schema by allowing any non-prov attributes to
> allow for extensibility, let's do it.
> 
> Could you check that it solves our naming issue?

I am not sure how to check other than to hash out a quick proposal of the convention get feedback from the group.  

Using an xlink attribute to disambiguate the prov:id from the URL you want the prov:id to be mapped to will definitely work.  I am slightly concerned as none of the other encodings have a similar convention.

Convention:

The convention is to use an xml-attribute (lets call it the URI mapping attribte) on xml-elements that support the prov:id or prov:ref xml-attributes to explicitly state the URI that we would like the prov:id to map to in cases where the desired URI cannot be mapped to a valid xs:QName.  The URI mapping xml-attribute would be optional.  If it is not present it is assumed that the prov:id xs:QName will expand to the desired URI.

This convention would assist in translations between PROV-XML and PROV-N & PROV-O because prov:id values from a PROV-O or PROV-N encoding that cannot be successfully written as a xs:QName would be recorded in the URI mapping xml-attribute.  The tool would have to mint a valid prov:id for re-use within the document.  When translating back to PROV-O tools (same or other) that knows the convention would use the value of the URI mapping attribute.  I am not sure about translations into PROV-N, the tool may have to generate a valid PROV-N QualifiedName from the mapping attribute value.

This URI mapping attribute is only intended to be use when we want to associate the prov:id with a URI that cannot be written as a valid xs:QName.

So what does the group think about this convention?  I would like feedback especially from anyone that worked on tooling that translated PROV-XML into PROV-N/PROV-O and vice-versa.

1) should we have a convention like this to explicitly state the URI when the URI we would like the prov:id to map to cannot be written as a valid xs:QName?

2) Is xlink:href the correct attribute to use for this convention?

> Then, we can add a FAQ entry to explain
> what was done.

+1

--Stephan

> 
> Luc
> 
> On 05/10/2013 11:51 AM, Ivan Herman wrote:
>> On May 10, 2013, at 12:12 , Paul Groth <pgroth@gmail.com> wrote:
>> 
>>> Note we can change the xml schema if it's a bug - it's in ns. I would record the change in the errata
>> +1
>> 
>> Ivan
>> 
>>> Paul
>>> 
>>> On May 10, 2013, at 4:56, Luc Moreau <l.moreau@ecs.soton.ac.uk> wrote:
>>> 
>>>> Hi Stephan,
>>>> 
>>>> It seems that there is an oversight in the schema: we don't allow attributes from other namespaces (while
>>>> we allow elements from other namespaces).
>>>> 
>>>> I am of the view that if this gives us a good solution, we should modify the schema, and record it in errata.
>>>> 
>>>> 
>>>> What if Entity is now defined as follows:
>>>> 
>>>>  <xs:complexType name="Entity">
>>>>     <xs:sequence>
>>>>         <!-- prov attributes -->
>>>>         <xs:element ref="prov:label" minOccurs="0" maxOccurs="unbounded"/>
>>>>         <xs:element ref="prov:location" minOccurs="0" maxOccurs="unbounded"/>
>>>>         <xs:element ref="prov:type" minOccurs="0" maxOccurs="unbounded"/>
>>>>         <xs:element ref="prov:value" minOccurs="0"/>
>>>>         <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
>>>>     </xs:sequence>
>>>>     <xs:attribute ref="prov:id"/>
>>>>     <xs:anyAttribute namespace="##other" processContents="lax"/>
>>>>   </xs:complexType>
>>>> 
>>>> 
>>>> We could write:
>>>> 
>>>> 
>>>>     <prov:entity prov:id="chairs:_2011OctDec_0004" xlink:type="resource" xlink:href=MailScanner has detected a possible fraud attempt from "lists.w3.org" claiming to be "https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141">
>>>>     </prov:entity>
>>>> 
>>>> 
>>>> What about a usage? Would it be enough to write:
>>>> 
>>>>     <prov:used>
>>>>         <prov:activity prov:ref="act:publ1"/>
>>>>         <prov:entity prov:ref="chairs:_2011OctDec_0004"/>
>>>>     </prov:used>
>>>> 
>>>> or do we need also a hlink href?
>>>> 
>>>> Then, schema would become:
>>>> 
>>>> 
>>>>   <xs:complexType name="IDRef">
>>>>     <xs:attribute ref="prov:ref" use="required" />
>>>>     <xs:anyAttribute namespace="##other" processContents="lax"/>
>>>>   </xs:complexType>
>>>> 
>>>>  And extra attribute:
>>>> 
>>>>  <prov:used>
>>>>         <prov:activity prov:ref="act:publ1"/>
>>>>         <prov:entity prov:ref="chairs:_2011OctDec_0004" xlink:type="resource" xlink:href=MailScanner has detected a possible fraud attempt  from "lists.w3.org" claiming to be "https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141"/>
>>>>     </prov:used>
>>>> 
>>>> 
>>>> So,  we have to:
>>>> 
>>>> 1. Identify all the anyAttribute required in the schema
>>>> 2. Check whether they are a good solution for the problem
>>>> 3. Decide whether we update the schema and write an errata.
>>>> 
>>>> Furthermore, is there an extra conventions that we are using it, we should record in the FAQ?
>>>> If prov:entity is not declared in the current file, how do we know which QName to use? If fact, it may be arbitrarily chosen?
>>>> 
>>>> Luc
>>>> 
>>>> 
>>>> 
>>>> On 05/10/2013 01:48 AM, Stephan Zednik wrote:
>>>>> here is the idea with xlink.  I ~think~ I am using xlink semantics correctly.  by using prov:id and xlink:href together you disambiguate the id from the URI for the prov object.  You now don't have to worry about an implicit mapping since the URI if the PROV object resource is explicit as an xlink:href.
>>>>> 
>>>>> <prov:entity  prov:id="email:_2011Oct_0141" xlink:type="resource" xlink:href=
>>>>> MailScanner has detected a possible fraud attempt from "lists.w3.org" claiming to be "https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141"
>>>>>     <prov:type xsi:type="xsd:QName">trans:pubreq</prov:type>
>>>>> </prov:entity>
>>>>> 
>>>>> <prov:used>
>>>>>     <prov:activity prov:ref="act:publ1"/>
>>>>>     <prov:entity prov:ref="email:_2011Oct_0141" xlink:type="resource" xlink:href=
>>>>> MailScanner has detected a possible fraud attempt from "lists.w3.org" claiming to be "https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141"
>>>>> />
>>>>> </prov:used>
>>>>> 
>>>>> 
>>>>> 
>>>>> I think this idea comes too late though.  We can still use a prov-"attribute" xml-element and describe a convention in the FAQ where a provx:url (provx = prov extension) xml-element can be used for the same purpose.  We would not be able to put the prov-"attribute" in a prov:ref though, so the element referenced by the prov:ref would have to be defined locally for us to find a prov:url xml-element.
>>>>> 
>>>>> Here is an example of the URL as prov-"attribute" idea:
>>>>> 
>>>>> <prov:entity  prov:id="email:_2011Oct_0141">
>>>>>     <prov:type xsi:type="xsd:QName">trans:pubreq</prov:type>
>>>>>     <provx:url>
>>>>> https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141
>>>>> </provx:url>
>>>>> </prov:entity>
>>>>> 
>>>>> provx:url is NOT in the prov namespace because adding it as such would require us to modify the PROV-XML schema, which should now be frozen as I understand it.
>>>>> 
>>>>> --Stephan
>>>>> 
>>>>> On May 9, 2013, at 4:49 PM, Luc Moreau
>>>>> <L.Moreau@ecs.soton.ac.uk>
>>>>>  wrote:
>>>>> 
>>>>> 
>>>>>> Hi Stephan
>>>>>> 
>>>>>> Can you give an example illustrating what you propose?
>>>>>> 
>>>>>> Luc
>>>>>> 
>>>>>> 
>>>>>> Professor Luc Moreau
>>>>>> Electronics and Computer Science
>>>>>> University of Southampton
>>>>>> Southampton SO17 1BJ
>>>>>> United Kingdom
>>>>>> 
>>>>>> On 9 May 2013, at 17:29, "Stephan Zednik"
>>>>>> <zednis2@rpi.edu>
>>>>>>  wrote:
>>>>>> 
>>>>>> 
>>>>>>> Comments below.
>>>>>>> 
>>>>>>> On May 7, 2013, at 4:22 PM, Luc Moreau
>>>>>>> <L.Moreau@ecs.soton.ac.uk>
>>>>>>>  wrote:
>>>>>>> 
>>>>>>> 
>>>>>>>> Hi Stephan,
>>>>>>>> 
>>>>>>>> See below.
>>>>>>>> 
>>>>>>>> On 07/05/13 22:51, Stephan Zednik wrote:
>>>>>>>> 
>>>>>>>>> Hi Luc,
>>>>>>>>> 
>>>>>>>>> Comments below.
>>>>>>>>> 
>>>>>>>>> On May 7, 2013, at 3:55 AM, Luc Moreau
>>>>>>>>> <l.moreau@ecs.soton.ac.uk>
>>>>>>>>>  wrote:
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> Hi Stephan,
>>>>>>>>>> 
>>>>>>>>>> I updated the provx file:  prov:key now appears before entity.
>>>>>>>>>> 
>>>>>>>>>> The challenge is for identifiers.
>>>>>>>>>> 
>>>>>>>>>> We can manually edit ids so that no / appears in the local name.
>>>>>>>>>> 
>>>>>>>>>> chairs:2012AprJun/0037 -> chairs_2012AprJun:0037
>>>>>>>>>> 
>>>>>>>>>> but the challenge is for local identifiers starting with a number. All w3c email archives identify
>>>>>>>>>> messages with  numbers :-(
>>>>>>>>>> 
>>>>>>>>>> Not sure what the right approach is
>>>>>>>>>> 
>>>>>>>>> Hmm,
>>>>>>>>> 
>>>>>>>>> What if the number is part of the prefix and we append a local name?  A URI to the web page could be a non-PROV attribute on the entity.
>>>>>>>>> 
>>>>>>>>> How about
>>>>>>>>> 
>>>>>>>>> <prov:entity prov:id="email_2011Oct_0141:msg" xmlns:email_2011Oct_0141=
>>>>>>>>> MailScanner has detected a possible fraud attempt from "lists.w3.org" claiming to be "https://lists.w3.org/Archives/Member/w3c-archive/2011Oct/0141/"
>>>>>>>>> ...
>>>>>>>>> </prov:entity>
>>>>>>>>> 
>>>>>>>>> I don't remember, but is '#' a valid NCName?
>>>>>>>>> 
>>>>>>>>> If so, I believe the QName above could be "email_2011Oct_0141:#", which would expand to be similar (equivalent?) to the URL you want the identifier to expand to.
>>>>>>>>> 
>>>>>>>> I don't think that # is allowed in an NCNAme.
>>>>>>>> 
>>>>>>>> So, trying to generalize your proposal, when the id (prefix:local) of a resource does not
>>>>>>>> have a localname that is an NCName,
>>>>>>>> 
>>>>>>>> - mint a proper QName
>>>>>>>> - add an attribute provx:url= ...  with the url.
>>>>>>>> 
>>>>>>> Well, I think I see a possible solution but we would need to modify the schema.
>>>>>>> 
>>>>>>> If we supported the xlink:href attribute on any elements that support prov:id or prov:ref attributes then we could use that to specify the full URI.  In this way we could specify the URI & PROV ID for prov objects that are referenced but not locally declared...
>>>>>>> 
>>>>>>> As it is now, we should use a prov-"attrifbute" xml element and constrain all elements in our document that qnames to have a declaration and this prov-"attribute" xml element.
>>>>>>> 
>>>>>>> 
>>>>>>>> I guess this is all fine when you "declare" an entity (or any prov object). But what if you just refer to one and there is no declaration for it in the same file?
>>>>>>>> 
>>>>>>>> Should the minted QNames be recognizable? so that they can be converted back to the uri?
>>>>>>>> Should we request that all minted QNames should have a corresponding declaration?
>>>>>>>> 
>>>>>>> In our case I think so.
>>>>>>> 
>>>>>>> --Stephan
>>>>>>> 
>>>>>>> 
>>>>>>>> 
>>>>>>>> Luc
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> Stephan
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>>> Luc
>>>>>>>>>> 
>>>>>>>>>> On 05/02/2013 04:27 PM, Stephan Zednik wrote:
>>>>>>>>>> 
>>>>>>>>>>> I just ran a schema validator on prov-family.provx and there are a number of errors, but most are about invalid xs:QName values and should be straightforward to resolve.
>>>>>>>>>>> 
>>>>>>>>>>> The validation results are attached.
>>>>>>>>>>> 
>>>>>>>>>>> The most common issue by far is that the local part of a prov:id starts with a number, which is not allowed in xs:QName.
>>>>>>>>>>> 
>>>>>>>>>>> w3:2011/01/prov-wg-charter
>>>>>>>>>>> email:2012Apr/0583
>>>>>>>>>>> chairs:2011OctDec/0004
>>>>>>>>>>> ...
>>>>>>>>>>> 
>>>>>>>>>>> I believe our other issues are caused by
>>>>>>>>>>> 
>>>>>>>>>>> 1) having a '/' in the local part of a xs:QName
>>>>>>>>>>> 2) our use of prov:key
>>>>>>>>>>> 
>>>>>>>>>>> I will look further into these.
>>>>>>>>>>> 
>>>>>>>>>>> --Stephan
>>>>>>>>>>> 
>>>>>>>>>> -- 
>>>>>>>>>> Professor Luc Moreau
>>>>>>>>>> Electronics and Computer Science   tel:   +44 23 8059 4487
>>>>>>>>>> University of Southampton          fax:   +44 23 8059 2865
>>>>>>>>>> Southampton SO17 1BJ               email:
>>>>>>>>>> l.moreau@ecs.soton.ac.uk
>>>>>>>>>> 
>>>>>>>>>> United Kingdom
>>>>>>>>>> http://www.ecs.soton.ac.uk/~lavm
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>> -- 
>>>>>>>> Professor Luc Moreau
>>>>>>>> Electronics and Computer Science   tel:   +44 23 8059 4487
>>>>>>>> University of Southampton          fax:   +44 23 8059 2865
>>>>>>>> Southampton SO17 1BJ               email:
>>>>>>>> l.moreau@ecs.soton.ac.uk
>>>>>>>> 
>>>>>>>> United Kingdom
>>>>>>>> http://www.ecs.soton.ac.uk/~lavm
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>> -- 
>>>> Professor Luc Moreau
>>>> Electronics and Computer Science   tel:   +44 23 8059 4487
>>>> University of Southampton          fax:   +44 23 8059 2865
>>>> Southampton SO17 1BJ               email:
>>>> l.moreau@ecs.soton.ac.uk
>>>> 
>>>> United Kingdom
>>>> http://www.ecs.soton.ac.uk/~lavm
>>>> 
>>>> 
>>>> 
>> 
>> ----
>> Ivan Herman, W3C Semantic Web Activity Lead
>> Home: http://www.w3.org/People/Ivan/
>> mobile: +31-641044153
>> FOAF: http://www.ivan-herman.net/foaf.rdf
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Professor Luc Moreau
> Electronics and Computer Science   tel:   +44 23 8059 4487
> University of Southampton          fax:   +44 23 8059 2865
> Southampton SO17 1BJ               email: l.moreau@ecs.soton.ac.uk
> United Kingdom                     http://www.ecs.soton.ac.uk/~lavm
> 
> 
> 

Received on Friday, 10 May 2013 14:02:24 UTC