W3C home > Mailing lists > Public > public-powderwg@w3.org > April 2008

Try again then (was Re: Semantics question (was Re: XSLT question))

From: Phil Archer <parcher@icra.org>
Date: Wed, 23 Apr 2008 18:04:30 +0100
Message-ID: <480F6C1E.8040507@icra.org>
To: Public POWDER <public-powderwg@w3.org>

OK, thanks once again, Stasinos. Here's a repeat of the previous long 
mail with changes prompted by your expert input.

I've prepared several examples of POWDER descriptor sets and their 
equivalent DR-S versions. Logically they begin with a simple one and end 
up hideously complex just to prove that the same rules can be applied 
and yield a consistent answer.

So, the simple one first:

<descriptorset>
   <ex:property1>value</ex:property1>
</descriptorset>

Gives

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
   </owl:IntersectionOf>
</owl:Class>

I think that's uncontentious. The use of intersectionOf is unnecessary 
with a single property restriction but we discussed that on Monday's 
call and agreed this was how we'd do it (so the processing rules remain 
the same when there are more restrictions).

Next we have a case where the DR refers to a descriptor set in another 
document. See 
http://www.w3.org/2007/powder/Group/powder-dr/20080325.html#preDefinedDescriptors

<descriptorset ref="http://example.org/powder.xml#d1" />

Now http://example.org/powder.xml#d1 is not an RDF or OWL class, it's 
another POWDER descriptor element so we use ref and this generates a see 
also statement:

<owl:Class rdf:nodeID="descriptorset_1">
   <rdfs:seeAlso rdf:resource="http://example.org/powder.xml#d1" />
</owl:Class>

The assertion that the resource set is a sub class of this will be 
pretty meaningless - but accurate. The alternative would be to require 
POWDER processors to fetch the other document, extract the descriptor 
set and process that into POWDER-S which sounds like a possible 
never-ending loop - hence I suggest we leave it at "see also.' I guess a 
POWDER Processor MAY fetch the external resource and process it but I 
don't think it should be required to do so.

But what if the external resource is an OWL Class? Then I think we 
should refer to it as such like this:

<descriptorset
     rdf:resource="http://example.org/semantic/powder.rdf#d1" />

Which becomes

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Class
       rdf:resource="http://example.org/semantic/powder.rdf#d1" />
   </owl:IntersectionOf>
</owl:Class>

So much for descriptor sets that are empty except for the reference to 
external data. What if they are not empty? Let's go back to the ref 
example and we get:

<descriptorset ref="http://example.org/powder.xml#d1">
   <ex:property1>value</ex:property1>
</descriptorset>

Which, following the same rules as before, gives us

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
   </owl:IntersectionOf>
   <rdfs:seeAlso rdf:resource="http://example.org/powder.xml#d1" />
</owl:Class>

And for the rdf:resource one we get:

<descriptorset rdf:resource="http://example.org/semantic/powder.rdf#d1">
   <ex:property1>value</ex:property1>
</descriptorset>

Which is GRDDLed into

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Class
       rdf:resource="http://example.org/semantic/powder.rdf#d1" />
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
   </owl:IntersectionOf>
</owl:Class>

If the value of a property is an *RDF Class*, (i.e. an OWL instance, not 
an OWL Class) then we have this situation:

<descriptorset>
   <ex:property1>value</ex:property1>
   <ex:property2
       rdf:resource="http://example.org/semantic/powder.rdf#d1" />
</descriptorset>

Which generates:

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property2" />
       <owl:hasValue
          rdf:resource="http://example.org/semantic/powder.rdf#d1" />
     </owl:Restriction>
   </owl:IntersectionOf>
</owl:Class>

I suggest that <ex:property ref="..." is simply not allowed (and ex 
isn't the POWDER namespace so we couldn't define what to do with it anyway)

*new*

There are restrictions on what is allowed as a property restriction's value.

http://example.org/semantic/powder.rdf#d1 might be

<rdf:Description rdf:about="#d1">
   <ex:property5>value_5</ex:property5>
   ...
</rdf:Description>

but cannot be another OWL class.

Blank nodes are not allowed in descriptor sets. Typed nodes are, so that 
this is not permissible

<descriptorset>
   <ex:property1>
     <rdf:Description>
       <ex:property2>value</ex:property2>
     </rdf:Description>
   </ex:property1>
</descriptorset>

But this is OK:

<descriptorset>
   <ex:property1>
     <ex:Class>
       <ex:property2>value</ex:property2>
     </ex:Class>
   </ex:property1>
</descriptorset>

And becomes

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>
         <ex:Class>
           <ex:property2>value</ex:property2>
         </ex:Class>
       </owl:hasValue>
     </owl:Restriction>
   </owl:IntersectionOf>
</owl:Class>

Stasinos - am I right? We could say that <ex:Class> must have an 
identifier? (or that the GRDDL would generate one) in which case we 
might get:

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue rdf:resource="#generatedID_1">
       </owl:hasValue>
     </owl:Restriction>
   </owl:IntersectionOf>
</owl:Class>

<ex:Class rdf:about="#generatedID">
   <ex:property2>value</ex:property2>
</ex:Class>

But is that actually any different??

If the desired description is another OWL Class with no associated 
property then it can be written in directly thus:

<descriptorset>
   <ex:property1>value</ex:property1>
   http://example.org/semantic/powder.rdf#d1
</descriptorset>

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
     <owl:Class
       rdf:resource="http://example.org/semantic/powder.rdf#d1" />
   </owl:IntersectionOf>
</owl:Class>

Note, this is equivalent to adding an rdf:resource attribute to 
descriptorset, however, multiple classes can be included this way 
whereas rdf:resource takes a single URI.

I did consider introducing a new element of <seealso /> which, of 
course, would map to rdfs:seeAlso. This would allow the inclusion of 
multiple see also statements but... since ref can take whatever value we 
say - and I suggest we say it takes a white space separated list - the 
ref attribute on the descriptorset element is sufficient.

So let's try a hideously complex example just for the sake of it.

<descriptorset ref="&abc; &def;"
      rdf:resource="http://example.org/semantic/powder.rdf#d1">
   <ex:property1>value</ex:property1>
   http://example.org/semantic/powder.rdf#d2
   <ex:property3
      rdf:resource="http://example.org/semantic/powder.rdf#d3" />
</descriptorset>

Following the same rules, we get this

<owl:Class rdf:nodeID="descriptorset_1">
   <owl:intersectionOf rdf:parseType="Collection">
     <owl:Class
       rdf:resource="http://example.org/semantic/powder.rdf#d1" />
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property1" />
       <owl:hasValue>value</owl:hasValue>
     </owl:Restriction>
     <owl:Class
       rdf:resource="http://example.org/semantic/powder.rdf#d2" />
     <owl:Restriction>
       <owl:onProperty rdf:resource="&ex;property3" />
       <owl:hasValue
         rdf:resource="http://example.org/semantic/powder.rdf#d3" />
     </owl:Restriction>
   <rdfs:seeAlso rdf:resource="&abc;" />
   <rdfs:seeAlso rdf:resource="&def;" />
   </owl:IntersectionOf>
</owl:Class>

WDYT?

Phil.

Stasinos Konstantopoulos wrote:
> On Wed Apr 23 15:07:29 2008 Phil Archer said:
> 
>> I'm sorry Stasinos, this must be frustrating for you, but let me try this.
>>
>> <owl:Restriction>
>>   <owl:onProperty rdf:resource="&bbfc;rated" />
>>   <owl:hasValue rdf:resource="&bbfc;_12" />
>> </owl:Restriction>
>>
>> is OK iff
>>
>> <rdf:Description rdf:about="&bbfc;_12">
>>   <bbfc:rated>12</bbfc:rated>
>>   <bbfc:consumerAdvice>May contain nuts <bbfc:consumerAdvice>
>> </rdf:Description>
>>
>> Because bbfc:rated appears in the restriction and in the filler, but if  
>> we remove that bbfc:rated property from the rdf:Description, then it all  
>> falls apart?
> 
> This is not OK because bbfc:rated is at the same time a data property
> and an object property. This is OK:
> 
> <owl:Restriction>
>   <owl:onProperty rdf:resource="&bbfc;rated" />
>   <owl:hasValue rdf:resource="&bbfc;_12" />
> </owl:Restriction>
> 
> <rdf:Description rdf:about="&bbfc;_12">
>   <bbfc:rate>12</bbfc:rate>
>   <bbfc:consumerAdvice>May contain nuts <bbfc:consumerAdvice>
> </rdf:Description>
> 
> Where bbfc:rated is an object property linking our resource with the
> bbfc:_12 instance, which in its own turn has two data properties, 
> bbfc:rate and bbfc:consumerAdvice.
> 
>> My basic struggle here is that (as you know) we're trying to end up with  
>> triples that have the candidate resource as their subject. Given
>>
>> <descriptorset>
>>   <ex:property rdf:resource="&ex;foo" />
>> </descriptorset>
>>
>> and a candidate URI of u, well, it's easy to see
>>
>> <rdf:Description rdf:about="u">
>>   <ex:property rdf:resource="&ex;foo" />
>> </rdf:Description>
>>
>> as the output.
>>
>> Dan and Jeremy went to great lengths to explain some restrictions on  
>> this when I saw them together in Bristol at the end of last year. This,  
>> for example, would be unacceptable:
>>
>> <rdf:Description rdf:about="u">
>>   <ex:property>
>>     <ex:Class>
>>       <ex:property2 rdf:resource="&ex;foo" />
>>     </ex:Class>
>>   </ex:property>
>> </rdf:Description>
>>
>> ... it's the semantics of the blank node that mess this up - so we do  
>> already have limits on the expressivity of a DR's descriptor element,  
> 
> Exactly, and this happens because you tried to make a class be the value
> of a property, which you cannot.
> 
>> but being able to say
>>
>> <descriptorset>
>>   <ex:property rdf:resource="&ex;foo" />
>> </descriptorset>
>>
>> would be good to be able to do - even if we have to make clear the  
>> limitations of what &ex;foo can be.
> 
> ex:foo must be the RDF node of an individual, of a single thing. As
> opposed to the node of a class, a set of things.
> 
Received on Wednesday, 23 April 2008 17:05:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:42:12 GMT