Re: Combined Permissions and Restrictions in ODRL 2.0: Is this example correct?

On 25 Feb 2012, at 21:43, Renato Iannella wrote:

> Hmmm..that is interesting…you are correct in that it passes the XML Schema Validation (I used Oxygen)…
> But looking at this line:
> 
>>         <o:asset uid="ns:myContentAsset" relation="target"/>
>> 
> Tells me that it should have failed, as the value "target" is neither a URI, QName or QCode.
> I checked the ODRL XML Schema again and it should match the regular expression (if it is a QCode) and clearly it is not a QName or a URI…


To follow up this…I asked the Oxygen support line how this is validated, and since it is not a QName or a QCode (no colon) then it *could* be a relative URI reference (this matches AnyURI) [Aside, I always thought that a relative URI started with a #…but….]

When you look into the XML Schema spec it says:

http://www.w3.org/TR/xmlschema-2/#anyURI
***
Note:  Section 5.4 Locator Attribute of [XML Linking Language] requires that relative URI references be absolutized as defined in [XML Base] before use. This is an XLink-specific requirement and is not appropriate for XML Schema, since neither the ·lexical space· nor the ·value space· of the anyURI type are restricted to absolute URIs. Accordingly absolutization must not be performed by schema processors as part of schema validation.
***

Hence - any XML Schema validator (by itself) must not try and turn that relative URI reference into an absolute URI.

And the result of this is that the value (in this case "target") is not validated.

It the responsibility of the application to "absolutize" the URI reference.

Since no xml:base is specified, then the base URI is taken to be the URI of the document that contains that relative URI reference.

This is an important implementation note.

Cheers...
Renato Iannella
Semantic Identity
http://semanticidentity.com
Mobile: +61 4 1313 2206

Received on Sunday, 26 February 2012 12:39:52 UTC