W3C home > Mailing lists > Public > www-rdf-interest@w3.org > February 2003

2 RDF Schema Questions: defining a property to contain a value that is anonymous, and ORing rdfs:domain?

From: Roger L. Costello <costello@mitre.org>
Date: Wed, 19 Feb 2003 15:55:15 -0500
Message-ID: <3E53EF33.330712F0@mitre.org>
To: www-rdf-interest@w3.org, "Costello,Roger L." <costello@mitre.org>

Hi Folks,

I have a couple of questions on RDF Schemas:

1. Suppose that I have an RDF/XML instance that contains a Length
property:

     <Length>
          <rdf:Description>
               <rdf:value>6300</rdf:value>
               <uom:units>kilometers</uom:units>
          </rdf:Description>
     </Length>

As you can see, the contents of Length is an anonymous resource.

How should Length be defined in an RDF Schema?  Here is how I imagine
that it should be defined:

     <rdf:Property rdf:ID="Length">
        <rdfs:domain rdfs:resource="#River"/>
    </rdf:Property>

Note that I do not specify an rdfs:range value, thus Length can have any
value.  Is this the proper way to define a property with a value that is
an anonymous resource?

Similarly, above it shows a property uom:units within the anonymous
resource.  I am not sure how to define it.  I believe that this is how
to define it:

     <rdf:Property rdf:ID="units">
          <rdfs:range rdf:resource="http://.../rdf-schema#Literal"/>
    </rdf:Property>

Note that I do not specify an rdfs:domain value, thus units can be used
in any class.  Is this the proper way to define a property that is to be
used in an anonymous resource?

2. Consider this property definition of FlowRate:

<rdf:Property rdf:ID="FlowRate">
  <rdfs:range rdf:resource="http://.../rdf-schema#Literal"/>
  <rdfs:domain rdf:resource="#River"/>
  <rdfs:domain rdf:resource="#Brook"/>
</rdf:Property>

Note the two rdfs:domain statements.  This says that the property
FlowRate may be used with a class that is a River AND a Brook.

How do I define FlowRate so that it may be used with either a River
class OR a Brook class?

Is this the way to do it:

<rdf:Property rdf:ID="FlowRate">
  <rdfs:range rdf:resource="http://.../rdf-schema#Literal"/>
</rdf:Property>

<rdf:Property rdf:about="#FlowRate">
  <rdfs:domain rdf:resource="#River"/>
</rdf:Property>

<rdf:Property rdf:about="#FlowRate">
  <rdfs:domain rdf:resource="#Brook"/>
</rdf:Property>

Note that I defined the FlowRate property first and then I "added to it"
using two more property definitions.  Is this how ORing is achieved?  

/Roger
Received on Wednesday, 19 February 2003 15:55:27 GMT

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