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

Re: PROV-XML element ordering

From: Luc Moreau <L.Moreau@ecs.soton.ac.uk>
Date: Wed, 6 Feb 2013 23:58:49 +0000
To: Stephan Zednik <zednis@rpi.edu>
CC: Curt Tilmes <Curt.Tilmes@nasa.gov>, "public-prov-wg@w3.org" <public-prov-wg@w3.org>
Message-ID: <1DA06B02-205B-4866-A0D4-395C7AEE0F77@ecs.soton.ac.uk>
Hi Stephan and Curt,

It is good to keep choice in documentElement.  You both introduced it. Let's not remove it.

My concern about choice in prov  attributes is that they lead, by default, to non natural object mapping with jaxb.  I believe jaxb matters because jaxb is a community standard reaching well beyond the java community.

Now, I am not expert in jaxb. There may well be standard jaxb annotations that allow us To support a natural object mapping with an xsd choice. If so, we should go for xsd:choice.

Curt's suggestion of a plugin (-simple) is a good, as long as plugin is maintained, which with my jaxb experience, is not encouraging, especially.


In the absence of standard jaxb annotations that lead to natural jaxb mappings, my preference is to be conservative and go for ordered prov attributes.


Professor Luc Moreau
Electronics and Computer Science
University of Southampton 
Southampton SO17 1BJ
United Kingdom

On 6 Feb 2013, at 20:08, "Stephan Zednik" <zednis@rpi.edu> wrote:

> After having played around with JAB and gaining a better understanding of the problem I am more amenable to the idea of requiring element ordering for properties.
> 
> I am still not sold on the idea of element ordering in documentElements and without that the generated class methods for Bundle will be a 'bag of hurt'.
> 
> An alternate idea is a to have a section in the FAQ dedicated to providing ORM implementation-specific tips on how to generate 'nice' mappings.
> 
> The plugin Curt has mentioned could be mentioned in a FAQ entry and we could provide an example of how to use external hints to JAXB.  The FAQ could also contain links to a modified schema that uses ordered elements and is only intended to be used as a source for ORM mappings, but not as a schema to validate against.
> 
> I think I like the second option best as it allows us to respond to ORM-mapping issues after the WG activity has completed and is a natural way to talk about implementation specific ORM issues.
> 
> --Stephan
> 
> On Feb 5, 2013, at 11:56 AM, Curt Tilmes <Curt.Tilmes@nasa.gov> wrote:
> 
>> Luc,
>> 
>> I haven't tested this yet, but is it possible that the jaxb
>> "Simplify" plugin could address this problem with jaxb?
>> 
>> http://confluence.highsource.org/display/J2B/Simplify+Plugin
>> 
>> It seems (again, untested), that you could use it and specify
>> some application hints for jaxb ("simplify:as-element-property")
>> for the attributes that would instruct jaxb to model
>> each attribute family (type, location, label, etc.) with
>> its own list rather than bundling them together as it
>> does by default with choices.
>> 
>> Curt
>> 
>> On 02/05/2013 01: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 Wednesday, 6 February 2013 23:59:27 UTC

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