Re: Notes on PROV-XML schema

On Aug 19, 2012, at 10:14 PM, "Reza B'Far (Oracle)" <reza.bfar@oracle.com> wrote:

> Stephan -
> 
> Please see below -
> 
> [Stephan]
> Should Person, Organization, SoftwareAgent, Collection be complexTypes?
> [Reza]
> Yes.  That'd be my vote.

I added an xml example for Person at https://dvcs.w3.org/hg/prov/file/tip/examples/eg-40-xml-examples-by-term/xml/Person.xml.

Since the value of the prov:type is anySimpleType there is no validation on what is put in type element.  A datetime or boolean value would be a valid prov:type, I think this is an issue.  This issue originates in the DM, where the value of prov:type is Value (http://www.w3.org/TR/prov-dm/#term-value)

If anyone agrees that this is an issue I will be willing to raise the matter formally.

Also, I can see no way to use the schema to validate usage of the Person, Organization, SoftwareAgent, and Collection types in xml based on the current schema.  These types don't actually exist in the schema.  We are relying on a application interpretation of the anySimpleType value of the prov:type element.  Also, it would be valid to say a prov:Activity has prov:type "prov:Person" and validation by schema would not catch this issue.

--Stephan

> 
> [Stephan]
> I think we should move dictionary elements/types into a separate schema 
> [Reza]
> Agreed.  This is in-line with my understanding of XSD.
> 
> Best.
> 
> On 8/15/12 1:09 PM, Stephan Zednik wrote:
>> Here are some notes from a review of the XML schema
>> Does prov.xsd validate?
>> xmllint returned errors when trying to parse the schema (see https://www.w3.org/2011/prov/track/issues/480)
>> I think we should move dictionary elements/types into a separate schema (prov-dictionary.xsd?)
>> This list includes
>> complexType DictionaryMemberOf
>> complexType DerivedByInsertionFrom
>> complexType DerivedByRemovalFrom
>> complexType Entry
>> element key
>> element dictionaryMemberOf
>> element derivedByInsertionFrom
>> element derivedByRemovalFrom
>> Should Person, Organization, SoftwareAgent, Collection be complexTypes?
>> Should the type of prov:type be xs:QName?
>> Currently has type xs:AnySimpleType in the schema
>> so <prov:type>42</prov:type> is legal
>> as is <prov:type>2001-08-15</prov:type>
>> and <prov:type>true</prov:type>
>> It's defined as a Value (http://www.w3.org/TR/prov-dm/#concept-value) in PROV-DM
>> A value ◊ is a constant such as a string, number, time, qualified name, IRI, and encoded binary data, whose interpretation is outside the scope of PROV.
>> I've started an example xml file for Agent based on example 33 from the PROV-DM (http://www.w3.org/TR/prov-dm/#term-agent)
>> 
>> <?xml version="1.0" encoding="UTF-8"?>
>> <prov:Agent prov:id="e1" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:ex="http://www.example.com/ns/ex/">
>>  <prov:type>prov:Person</prov:type>
>>  <ex:name>Alice</ex:name>
>>  <ex:employee>1234</ex:employee>
>> </prov:Agent>
>> 
>> I think this is correct, but I have been unable to validate it against the schema yet (https://www.w3.org/2011/prov/track/issues/480).
>> 
>> I'll look into the schema parsing error and then generate some more example xml serializations and commit them to the repository.
>> 
>> --Stephan
> 

Received on Monday, 20 August 2012 04:34:30 UTC