Re: Semantics question (was Re: XSLT question)

On Tue Apr 22 17:57:45 2008 Phil Archer said:

> Let me try and answer my own question (because it's doing my head in and 
> I'd like to be able to think about something else at 3 o'clock tomorrow 
> morning).

Lemme see if I can finish this email before 3 o' clock then, so that at
least you have a little reader in case you're awake!

> >>-----Original Message-----
> >>From: public-powderwg-request@w3.org
> >>[mailto:public-powderwg-request@w3.org] On Behalf Of Phil Archer
> >>Sent: 21 April 2008 14:35
> >>To: Public POWDER
> >>Subject: Re: XSLT question
> >>
> >> [...]
> >>
> >>I ask because we might have things like this:
> >>
> >><descriptorset xml:id="descriptorset_1">
> >>   <ex:property1>value</ex:property1>
> >>   <ex:property2 ref="http://www.example.org/descriptions.rdf#Class" />
> >></descriptorset>
> >>
> >>Which transforms into ... what? This?
> >>
> >><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://www.example.org/descriptions.rdf#Class" />
> >>     <owl:Restriction>
> >>   <owl:intersectionOf>
> >></owl:Class>
> >>
> >>Which looks wrong and, well, suppose
> >>http://www.example.org/descriptions.rdf#Class is a POWDER descriptor
> >>set, we now have an 'RDF resource' of something that probably isn't RDF.

Except that ex:Class cannot, despite its name, be a set (POWDER
descriptorset or any other kind of set) as it is a filler for the
ex:property2 role. OWL roles (aka relations or object properties) by
definition connect two instances, hence either ex:Class is an instance
or this is not OWL.

One can always use XML to write a document that looks OWL-ish without
being OWL, and there is nothing anybody can do about it. What POWDER-WG
can do is make sure that good POWDER/XML gives good OWL/RDF, and there
is no way to fool Kevin's transformations into generating non-OWL from
legitimate POWDER/XML. I guess it might be worth being able to say:

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

or

<descriptorset ref="http://www.example.org/descriptions.rdf#Class">
  <ex:property1>value</ex:property1>
</descriptorset>

or something like that to treat vocabulary items that don't have a value
but simply are or are not. For example, instead of having a vocabulary
that has an ex:hasColour property with values like ex:green (which are
ex:Colour instances), one might have a vocabulary where the class
ex:ColouredThing has (among other) an ex:GreenThing subclass.

Then, if you want to be able to say:

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

this should translate into:

<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:nodeID="ex:GreenThing">
  <owl:intersectionOf>
</owl:Class>

> >Let me start with a question and add in some detail later.
> >
> >is this possible (I'm pretty sure the answer's no) - in which an RDF 
> >Description block is made the sub class of an OWL class?

since an RDF description is not a set of instances, no, it cannot be a
subclass, as OWL classes are simply sets of instances.

[example snipped]

> >If not... we have a problem.

No, not really. The only problem was not having come across a vocabulary
item that was propositional (just being of a certain type, belonging to
a certain class) as opposed to relational (having a certain value for a
certain property) before. You have stumbled upon it by confusing classes
and instances, which is a good thing I guess (stumbling upon the gap,
that is.)

> >Try this
> >
> ><descriptorset>
> >  <icra:na>1</icra:na>
> >  <icra:vj>1</icra:vj>
> >  <bbfc:rating ref="http://www.bbfc.org/1997/#12" />
> ></descriptorset>
> >
> >What's the S version? The ICRA stuff is easy - property value 
> >restrictions, OK, but the external reference?

bbfc:12 has to be an instance, and the whole statement asserts the
bbfc:rating relation between our resource and bbfc:12.
So, here you go:

<owl:Class rdf:nodeID="descriptorset_1">
  <owl:intersectionOf rdf:parseType="Collection">
    <owl:Restriction>
      <owl:onProperty rdf:resource="&icra;na" />
      <owl:hasValue>1</owl:hasValue>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&icra;vj" />
      <owl:hasValue>1</owl:hasValue>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&bbfc;rating" />
      <owl:hasValue rdf:resource="&bbfc;12" />
    </owl:Restriction>
  </owl:intersectionOf>
</owl:Class>

Again, one can imagine a situation where BBFC decided to define the
class bbfc:Rated12 and placing resources in this class instead of
relating them to a bbfc:12 instance. In this case:

<owl:Class rdf:nodeID="descriptorset_1">
  <owl:intersectionOf rdf:parseType="Collection">
    <owl:Restriction>
      <owl:onProperty rdf:resource="&icra;na" />
      <owl:hasValue>1</owl:hasValue>
    </owl:Restriction>
    <owl:Restriction>
      <owl:onProperty rdf:resource="&icra;vj" />
      <owl:hasValue>1</owl:hasValue>
    </owl:Restriction>
    <owl:Class rdf:resource="&bbfc;Rated12" />
  </owl:intersectionOf>
</owl:Class>

> >The problems I see are that:
> >
> >1. We've lost some data, i.e. the bbfc:rating predicate (does that matter)

If the property is important, ie, if it is possible that resources and
bbfc:12 can be related in more than one ways, then information is lost.
If there is only one possible way to relate resources to 12, one might
as well turn 12 into a class and use rdfs:type to make the connection.
Furthermore, the instane 12 might have interesting properties of its own.

As an example consider the color green. A ex:Car instance might have an
ex:hasHoodColour or an ex:hasDoorColour relation to the ex:Colour
instance ex:green, and they are indepently linking the same car to the
same colour. One cannot express this by simply placing the car
under GreenThing, as in this case information is, indeed, lost.
Furthmore, instance ex:green might have properties other that describing
our resource, like its RGB definition, which a class cannot have.

> >2. In the XML we're referring to an RDF class as if it's an XML element.

That's just a matter on agreeing on some XML way of saying that this is
an RDF class, like the ref thing for RDF properties.

> >3. If we say that the external referent must be an XML element that 
> >doesn't help us because we don't know the URI of the equivalent RDF class

I'm not sure what the suggestion here is, but I don't think it's
necessary anyway.

s

Received on Wednesday, 23 April 2008 00:15:28 UTC