ODRL V2.0 - XML Encoding

Working Draft: 12 February 2010

This version:
http://odrl.net/2.0/WD-ODRL-XML-20100212.html
Latest version:
http://odrl.net/2.0/WD-ODRL-XML.html
Editor:
Renato Iannella, NICTA, renatoATnicta.com.au

Abstract

This document describes how to encode the ODRL Version 2.0 model and vocabulary using XML.

Status of this document

This is the first and incomplete public Working Draft of the ODRL V2.0 XML Encoding Specification document produced by the ODRL Version 2.0 Working Group. The ODRL Initiative publishes a Working Draft for review by working group members and other interested parties. The ODRL Version 2.0 Working Group expects to advance this document to a Draft Specification once the Working Group is satisfied the Encoding has broad consensus and demonstrated at least two interoperable implementations.

Comments on this document should be sent to editors and discussion of this document takes place on the public working group mailing list odrl-version2@odrl.net archived at http://odrl.net/pipermail/odrl-version2_odrl.net/.

This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than "work in progress". Publication as a Working Draft does not imply endorsement by the ODRL Initiative.

Table of contents

1. Overview
2. Namespace and Identifiers
3. XML Encoding
4. Scenario Examples
Appendix-A. XML Schema (Normative)
Appendix-B. Encoding Profiles (Informative)
Acknowledgements
References


1. Overview

The ODRL Version 2.0 language is defined by the ODRL Model [ODRL-MODEL] and ODRL Common Vocabulary [ODRL-VOCAB] in an abstract manner to capture the semantics of the expression, without any specific syntax and/or encoding method.

This document describes how to encode both the Model and Common Vocabulary, including any community developed Profiles, using the XML syntax [XML] with XML Schema [XML-SCHEMA].

This document utlilises the key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in accordance to [RFC2119].

2. Namespace and Identifiers

ODRL Version 2.0 defines an XML Namespace [XML-NAME] for the core Model:

   http://odrl.net/2.0/

Examples in this document will use "o" as the prefix for this Namespace. However, any prefix can be utilised as long as it is associated with the correct Namespace.

The ODRL Common Vocabulary will be encoded using URIs. A single URI will represent each of the terms in the Common Vocabulary created by appending the entity name and identifier to the XML Namespace.

For example, the Play action would be represented as:

   http://odrl.net/2.0/action/play

3. XML Encoding

Each of the core entities from the ODRL Model will be represented by an XML element of the same name. Each entity attribute will be represented as an XML attribute of the parent element. The named roles on associations (eg Assigner) will be represented as an attribute on the element.

The linking of associations (eg between one Duty and multiple Permissions) will be via XML id and idref attributes.

The Extended Relation shall be represented by an element with an attribute for the operation. XML id and idref will be used to link to the main entities that are being bound together.

The examples in Section 4 give concrete instances of these XML encoding rules for the Model and Common Vocabulary. Appendix A shows the formal XML Schema that encapsulates these rules.

Additional metadata elements to describe Assets and Parties may be included as direct children to these elements. No validation will be preformed, and suitable metadata schemes should be used. For example:

   <o:rights xmlns:o="2.0/"
             xmlns:v="urn:ietf:params:xml:ns:vcard-4.0"
             xmlns:d="http://purl.org/dc/elements/1.1/"
             uid="urn:exp:9843">
    <o:permission>
       <o:asset uid="urn:music:4545">
         <d:title>+555 5555 5555 Inc</d:title>
         <d:creator>+555 5555 5555 Inc</d:creator>
       </o:asset>       
       <o:action resource="2.0/action/play"/>             
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/>
         <v:org>Sony Music International Inc</v:org>
         <v:tel>+555 5555 5555 Inc</v:tel>
      </o:party>
    </o:permission>
   </o:rights>

ISSUE: How do we express the rightsholder associations - do we really need it - we need an example

4. Scenario Examples

These examples represent the XML Encodings for all the Scenarios described in the [ODRL-Model] document.

ISSUE: Check these actions are in the Common Vocab - if not - change the examples!

ISSUE: Add the Types to the Common Vocab

4.1 The Set

   <o:rights xmlns:o="2.0/"
             uid="urn:exp:0099"
             type="2.0/type/set">
     <o:permission>
       <o:asset uid="urn:asset:9898"/>
       <o:action resource="2.0/action/publish"/>
     </o:permission>
     <o:prohibition>
       <o:asset uid="urn:asset:9898"/>
       <o:action resource="2.0/action/modify"/>
     </o:prohibition>
   </o:rights>

4.2 The Offer

   <o:rights xmlns:o="2.0/"
             uid="urn:exp:0231"
             type="2.0/type/offer">
    <o:permission>
       <o:asset uid="urn:music:4545"/>
       <o:action resource="2.0/action/play"/>
       <o:duty idref="1"/>                  
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
    </o:permission>
    <o:permission>
       <o:asset uid="urn:music:4545"/>
       <o:action resource="2.0/action/copy"/>
       <o:constraint name="2.0/constraint/count"
                     operator="2.0/operator/lteq"
                     rightOperand="1"/>    
       <o:duty idref="1"/>                  
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
    </o:permission>
    <o:duty id="1">
       <o:action resource="2.0/action/pay"/>
       <o:object measure="2.0/object/EUR"
                 value="0.50"/>        
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
    </o:duty>
   </o:rights>

ISSUE: In the Model Scenarios (Fig 4.2) add a link between Duty and the Permissions

ISSUE: In the Common Vocab (Section 2.3) - I think the Pay duty example should have measure=currency and value=EUR20.0 ??

ISSUE: Is using the id/idrefs to link the Permission/Duties ok? Does it mean you do the Duty once and get both Permissions? Or should we link from the Duty to the Permissions?

4.3 The Agreement

   <o:rights xmlns:o="2.0/"
             uid="urn:exp:9001"
             type="2.0/type/agreement">
    <o:permission>
       <o:asset uid="urn:music:4545"/>
       <o:action resource="2.0/action/play"/>
       <o:duty idref="1"/>
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
       <o:party uid="urn:billie:888"
                role="2.0/role/assignee/">
    </o:permission>
    <o:permission>
       <o:asset uid="urn:music:4545"/>
       <o:action resource="2.0/action/copy"/>
       <o:constraint name="2.0/constraint/count"
                     operator="2.0/operator/lteq"
                     rightOperand="1"/>  
       <o:duty idref="1"/>
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
       <o:party uid="urn:billie:888"
                role="2.0/role/assignee/">
    </o:permission>
    <o:duty id="1">
       <o:action resource="2.0/action/pay"/>
       <o:object measure="2.0/object/EUR"
                 value="0.50"/>        
       <o:party uid="urn:sony:10"
                role="2.0/role/assigner/">
       <o:party uid="urn:billie:888"
                role="2.0/role/assignee/">
    </o:duty>
   </o:rights>

ISSUE: Can we extrapolate the two Parties to make it more compact?

4.4 The Request

4.5 The Ticket

4.6 The Offer and Next Rights

4.7 The Extended Relation

   <o:rights xmlns:o="2.0/"
             uid="urn:exp:0321"
             type="2.0/type/offer">
       <o:extendedRelation
            operation="2.0/operation/xor
            idref="1,2"/>
       <o:permission id="1">
       <o:asset uid="urn:asset:777"/>
       <o:action resource="2.0/action/print"/>
       <o:constraint name="2.0/constraint/count"
                     operator="2.0/operator/lteq"
                     rightOperand="5"/>  
     </o:permission>
     <o:permission id="2">
       <o:asset uid="urn:asset:777"/>
       <o:action resource="2.0/action/copy"/>
     </o:permission>
   </o:rights>

ISSUE: Should Extended Relations be an Parent element instead?

ISSUE: Should we link from the Permission to the Operation instead?

4.8 The Permission and Prohibition

4.9 The Inheritance

Appendix-A. XML Schema (Normative)

The Schema file is at.....

Appendix-B. Encoding Profiles (Informative)

Acknowledgements

The editors gratefully acknowledge feedback and contributions to this document from:

References

[ODRL-MODEL] S. Guth & R. Iannella (eds). Open Digital Rights Language (ODRL) Version 2.0 - Core Model. Draft Specification, ODRL Initiative, 23 September 2009.
http://odrl.net/2.0/DS-ODRL-Model.html
[ODRL-VOCAB] S. Guth & R. Iannella (eds). Open Digital Rights Language (ODRL) Version 2.0 - Common Vocabulary. Draft Specification, ODRL Initiative, 25 September 2009.
http://odrl.net/2.0/WD-ODRL-Vocab.html
[RFC2119] Key words for use in RFCs to Indicate Requirement Levels, S. Bradner. The Internet Society, March 1997. http://www.ietf.org/rfc/rfc2119.txt
[XML] T. Bray & J. Paoli & C. M. Sperberg-McQueen & E. Maler & F. Yergeau (eds). Extensible Markup Language (XML) 1.0 (Fifth Edition). W3C Recommendation 26 November 2008.
http://www.w3.org/TR/xml/
[XML-SCHEMA] H. S. Thompson & D. Beech & M. Maloney & N. Mendelsohn (eds). XML Schema Part 1: Structures Second Edition. W3C Recommendation 28 October 2004.
http://www.w3.org/TR/xmlschema-1/
[XML-NAME] T. Bray & D. Hollander & A. Layman & R. Tobin & H. S. Thompson (eds). Namespaces in XML 1.0 (Third Edition). W3C Recommendation 8 December 2009.
http://www.w3.org/TR/xml-names/

Valid HTML 4.0 Strict