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

On Feb 25, 2013, at 3:02 AM, Stian Soiland-Reyes <soiland-reyes@cs.manchester.ac.uk> wrote:

> On Thu, Feb 21, 2013 at 3:32 PM, Stephan Zednik <zednis@rpi.edu> wrote:
>> I have updated the editors draft of the note with a section on type
>> conventions.
>> https://dvcs.w3.org/hg/prov/raw-file/default/xml/prov-xml.html#type-conventions
>> Is this issue ready to be closed?
> 
> (I guess it's up to Paul to say if we should close the issue)
> 
> For someone consuming PROV-XML I guess it would be a bit bothersome
> that there are three almost equivalent mechanism, but in my opinion at
> least this section gives a decent explanation to those mechanisms.
> 
> 
> Is the implication from the xsi:type support that I can make an
> extension schema with a ex:Workflow complex type extending prov:Plan,
> and then use only xsi:type="ex:Workflow" (or equivalent custom
> element) in the XML?

The implication is that xsi:type can be used to specify the type of an element for validation purposes

http://www.w3.org/TR/xmlschema-1/#xsi_type

This is defined by XML Schema and is not something we are adding extra meaning to.

It means

<prov:plan prov:id="foo" xsi:type="ex:Workflow" />

will validate IFF ex:Workflow extends prov:Plan.

> 
> Would PROV-XML consumers who don't understand my schema (but have
> access to it through xsi declarations in the document) be expected to
> also understand those as prov:Plans?

What do you mean technically by "don't understand my schema"?

For the following xml snippet:

<prov:plan prov:id="foo" xsi:type="ex:Workflow" />

If the schema that defines ex:Workflow is not known (namespace "ex" is not defined) the xml will not validate because the namespace "ex" is not defined.

If the namespace is defined but the schema is unknown the xml will not validate because ex:Workflow does not resolve to a type definition.

If the namespace/schema are known but ex:Workflow is not defined the xml will not validate because ex:Workflow does not resolve to a type definition.

If the namespace/schema are known and ex:Workflow does exist but is not an extension of prov:Plan than the xml will not validate because the type definition ex:Workflow is not derived from prov:Plan.

If the namespace/schema are known and ex:Workflow is an extension of prov:Plan than the xml will validate.

...I think that covers about all options.

--Stephan

> 
> 
> 
> -- 
> Stian Soiland-Reyes, myGrid team
> School of Computer Science
> The University of Manchester
> 
> 

Received on Monday, 25 February 2013 14:55:03 UTC