Re: [poe] XML Schema design

Re @riannella 

re 1. I'm aware that a XML element with generic semantics and with an attribute to narrow down semantics (e.g. for a subproperty in RDF) is a very flexible solution. 
The ODRL IM defines only two functions of Party: assigner and assignee, all other functions are "add ons" (and I think should be from another namespace). This way a new function gets a new name/identifier in a not-ODRL namespace, e.g. `"xyz:paymentReceiver" : ""` . The same could be achieved in XML: defining `<assignee>` and `<assigner>` as Party instances in the ODRL namespace, and the "add on" party is `<xyz:paymentReceiver id="" />` - the required `any ##other` extension point already exists in the XML Schema.
Summary: what ODRL defines on its own is an element in the ODRL namespace, optional additional things have to be in another namespace and are taken by extension points. This supports having identifiers of  Things reflected by the QName of an element and it would be closer to the JSON serialisation.

re 3. There is a design to enforce required elements but this needs a slight Schema redesign: all mandatory elements have to be children of a sequence, all the optional elements are children of a choice which is also a child of the sequence (after the mandatory elements). I've tested this design and it delivers what the IM requires. 
<xs:complexType name="Permission">
 <xs:sequence minOccurs="1">
  <xs:element ref="o:asset" maxOccurs="unbounded"/>
  <xs:element ref="o:action"/>
  <xs:choice minOccurs="0" maxOccurs="unbounded">
   <xs:element ref="o:constraint"/>
   <xs:element ref="o:duty"/>
   <xs:element ref="o:party"/>
  <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
 <xs:attributeGroup ref="o:idAttributes"/>
re 6. Sorry, my question was about rightOperand, not operator.

GitHub Notification of comment by nitmws
Please view or discuss this issue at using your GitHub account

Received on Wednesday, 21 June 2017 07:01:50 UTC