W3C home > Mailing lists > Public > public-prov-wg@w3.org > February 2013

Re: PROV-XML element ordering

From: Curt Tilmes <Curt.Tilmes@nasa.gov>
Date: Tue, 5 Feb 2013 06:53:17 -0500
Message-ID: <5110F2AD.4060000@nasa.gov>
To: Luc Moreau <L.Moreau@ecs.soton.ac.uk>
CC: "public-prov-wg@w3.org" <public-prov-wg@w3.org>
It does not.

I have not used jaxb, and I don't understand how order should affect a 
well-crafted parser.  If it sees a "prov:location" then a "prov:type", 
why would it deal with it any differently from seeing first the 
"prov:type" then the "prov:location".  Why would it not parse them each 
identically?  I guess as jaxb builds its model from the schema, it sees 
the choice as a single method and doesn't understand the "multiple" 
choice aspect of it.

If, in order to work around the quirks of this particular tool, we 
change from a choice to a sequence, requiring, e.g. all "prov:type"s to 
precede "prov:location"s, it doesn't reduce expressivity in that we can 
still express every concept, but there would be definitely be fewer 
valid expressions for a given concept (and more ways to do it wrong).  
With things open the way they are now, I can look at PROV-N and turn it 
into PROV-XML almost mechanically (the order in XML can always be 
exactly as it is in PROV-N, which doesn't constrain the order).  With a 
more tightly constrained order in XML, I have to consult the docs for 
each expression and re-arrange things 'just right' to produce something 
valid.

That said, these intricacies will get eventually get buried inside XML 
tools/parsers/producers, so ultimately I'm ok with it either way.  I'll 
defer to your real world experience with this -- we need to design this 
so the tools are able to cope with it.

Any other opinions one way or the other?

Curt

On 2/5/13 1:37 AM, Luc Moreau wrote:
> Hi Curt,
>
> Does the schema  now impose an order on prov "attributes"?
>
> Without order, I have failed to define an object mapping (with jaxb) that is useful from an OO perspective. Likewise, i have not managed to define a meaningful ORM mapping. Now, this is my experience with these tools, maybe somebody has succeeded.
>
> In summary, The problem I encountered is as follows. If there is a choice (instead of sequence) between say, prov:type, prov:location, prov:label, all these elements are mapped to a single java method or a single sql column. This results in non natural code or SQL queries.
>
> Because of this, my preference is to keep these in a sequence. It does not at all reduce expressivity, I think.
>
>
> Professor Luc Moreau
> Electronics and Computer Science
> University of Southampton
> Southampton SO17 1BJ
> United Kingdom
>
> On 5 Feb 2013, at 01:17, "Curt Tilmes" <Curt.Tilmes@nasa.gov> wrote:
>
>> Last week, we also briefly mentioned the PROV-XML element
>> ordering issue, described here:
>>
>> https://www.w3.org/2011/prov/track/issues/572
>>
>> Are there strong opinions about changing anything (either
>> arguments, or attributes or anything else from the way it
>> is now?
>>
>> Tracker, this is ISSUE-572.
>>
>> Curt
>>


-- 
Curt Tilmes, Ph.D.
U.S. Global Change Research Program
1717 Pennsylvania Avenue NW, Suite 250
Washington, D.C. 20006, USA

+1 202-419-3479 (office)
+1 443-987-6228 (cell)
globalchange.gov
Received on Tuesday, 5 February 2013 11:53:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:51:30 UTC