Re: Question about rdf:first and validation error in enumerated datatype range

looking to it through N3 glasses, I assume it is OK to say

@prefix owl:    <http://www.w3.org/2002/07/owl#> .
@prefix rdfs:   <http://www.w3.org/2000/01/rdf-schema#> .
@prefix :               <#>.

:CONTROL-TYPE
        a       owl:DatatypeProperty ;
        rdfs:range [
                a       owl:DataRange ;
                owl:oneOf (
                        "INHIBITION"
                        "ACTIVATION"
                        "INHIBITION-ALLOSTERIC"
                        "INHIBITION-COMPETITIVE"
                        "INHIBITION-IRREVERSIBLE"
                        "INHIBITION-NONCOMPETITIVE"
                        "INHIBITION-OTHER"
                        "INHIBITION-UNCOMPETITIVE"
                        "INHIBITION-UNKMECH"
                        "ACTIVATION-UNKMECH"
                        "ACTIVATION-NONALLOSTERIC"
                        "ACTIVATION-ALLOSTERIC"
                )
        ] .


-- 
Jos De Roo, AGFA http://www.agfa.com/w3c/jdroo/




Andrea Splendiani <andrea@pasteur.fr>
Sent by: semantic-web-request@w3.org
04/08/2005 04:00

 
        To:     semantic-web@w3.org
        cc:     (bcc: Jos De_Roo/AMDUS/MOR/Agfa-NV/BE/BAYER)
        Subject:        Question about rdf:first and validation error in enumerated datatype range


Hi all,

I have problems with a piece of an ontology where the validator 
complains about the object of the rdf:first property not being a 
resource. However it seems this is possible:

 From the enumerated data type example in the official documentation I 
get:


<owl:DatatypeProperty rdf:ID="tennisGameScore">
   <rdfs:range>
     <owl:DataRange>
       <owl:oneOf>
         <rdf:List>
            <rdf:first rdf:datatype="&xsd;integer">0</rdf:first>
            <rdf:rest>
              <rdf:List>
                <rdf:first rdf:datatype="&xsd;integer">15</rdf:first>
                <rdf:rest>
                  <rdf:List>
                    <rdf:first rdf:datatype="&xsd;integer">30</rdf:first>
                    <rdf:rest>
                      <rdf:List>
                        <rdf:first 
rdf:datatype="&xsd;integer">40</rdf:first>
                        <rdf:rest rdf:resource="&rdf;nil" />
                      </rdf:List>
                    </rdf:rest>
                  </rdf:List>
               </rdf:rest>
             </rdf:List>
           </rdf:rest>
         </rdf:List>
       </owl:oneOf>
     </owl:DataRange>
   </rdfs:range>
</owl:DatatypeProperty>

My ontology its similar (Protégé ouputi for the Range/Allowed values 
Datatype restriction:

  <rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#double"/>
   </owl:DatatypeProperty>
   <owl:DatatypeProperty rdf:about="#CONTROL-TYPE">
     <rdfs:range>
       <owl:DataRange>
         <owl:oneOf rdf:parseType="Resource">
           <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
           >INHIBITION</rdf:first>
           <rdf:rest rdf:parseType="Resource">
             <rdf:rest rdf:parseType="Resource">
               <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
               >INHIBITION-ALLOSTERIC</rdf:first>
               <rdf:rest rdf:parseType="Resource">
                 <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                 >INHIBITION-COMPETITIVE</rdf:first>
                 <rdf:rest rdf:parseType="Resource">
                   <rdf:rest rdf:parseType="Resource">
                     <rdf:rest rdf:parseType="Resource">
                       <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                       >INHIBITION-OTHER</rdf:first>
                       <rdf:rest rdf:parseType="Resource">
                         <rdf:rest rdf:parseType="Resource">
                           <rdf:rest rdf:parseType="Resource">
                             <rdf:rest rdf:parseType="Resource">
                               <rdf:rest rdf:parseType="Resource">
                                 <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                                 >ACTIVATION-ALLOSTERIC</rdf:first>
                                 <rdf:rest 
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"/>
                               </rdf:rest>
                               <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                               >ACTIVATION-NONALLOSTERIC</rdf:first>
                             </rdf:rest>
                             <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                             >ACTIVATION-UNKMECH</rdf:first>
                           </rdf:rest>
                           <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                           >INHIBITION-UNKMECH</rdf:first>
                         </rdf:rest>
                         <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                         >INHIBITION-UNCOMPETITIVE</rdf:first>
                       </rdf:rest>
                     </rdf:rest>
                     <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                     >INHIBITION-NONCOMPETITIVE</rdf:first>
                   </rdf:rest>
                   <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
                   >INHIBITION-IRREVERSIBLE</rdf:first>
                 </rdf:rest>
               </rdf:rest>
             </rdf:rest>
             <rdf:first 
rdf:datatype="http://www.w3.org/2001/XMLSchema#string"
             >ACTIVATION</rdf:first>
           </rdf:rest>
         </owl:oneOf>
       </owl:DataRange>
     </rdfs:range>

Finally, when I run the validator (vowlidator) I get the following 
errors (warnings) :


[3] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa3, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"ACTIVATION-UNKMECH":http://www.w3.org/2001/XMLSchema#string] line 1113



[4] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa4, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"ACTIVATION-NONALLOSTERIC":http://www.w3.org/2001/XMLSchema#string] 
line 1110



[5] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Class.  (Object 
is declared type  [http://www.w3.org/2002/07/owl#DataRange])
At [http://www.biopax.org/release/biopax-level1.owl#SPONTANEOUS, 
http://www.w3.org/2000/01/rdf-schema#range, 65a43b:105328707b3:-7fb6] 
line 952



[6] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa9, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION":http://www.w3.org/2001/XMLSchema#string] line 1087



[7] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Class.  (Object 
is declared type  [http://www.w3.org/2002/07/owl#DataRange])
At [http://www.biopax.org/release/biopax-level1.owl#STRUCTURE-FORMAT, 
http://www.w3.org/2000/01/rdf-schema#range, 65a43b:105328707b3:-7fb3] 
line 981



[8] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fb5, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"R-L":http://www.w3.org/2001/XMLSchema#string] line 946



[9] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fb1, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"SMILES":http://www.w3.org/2001/XMLSchema#string] line 977



[10] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7f9f, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-IRREVERSIBLE":http://www.w3.org/2001/XMLSchema#string] line 
1126



[11] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fad, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"IRREVERSIBLE-LEFT-TO-RIGHT":http://www.w3.org/2001/XMLSchema#string] 
line 1043



[12] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa2, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-UNKMECH":http://www.w3.org/2001/XMLSchema#string] line 1116



[13] WARNING - Domain Type Mismatch: Use of this property implies that 
subject is of type http://www.w3.org/2000/01/rdf-schema#Class. 
(Subject is declared type [http://www.w3.org/2002/07/owl#DataRange])
At [65a43b:105328707b3:-7fb0, http://www.w3.org/2002/07/owl#oneOf, 
65a43b:105328707b3:-7fab] line 1051



[14] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa5, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"ACTIVATION-ALLOSTERIC":http://www.w3.org/2001/XMLSchema#string] line 
1106



[15] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fac, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"PHYSIOL-RIGHT-TO-LEFT":http://www.w3.org/2001/XMLSchema#string] line 
1046



[16] WARNING - Domain Type Mismatch: Use of this property implies that 
subject is of type http://www.w3.org/2000/01/rdf-schema#Class. 
(Subject is declared type [http://www.w3.org/2002/07/owl#DataRange])
At [65a43b:105328707b3:-7faa, http://www.w3.org/2002/07/owl#oneOf, 
65a43b:105328707b3:-7fa9] line 1133



[17] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa7, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-COMPETITIVE":http://www.w3.org/2001/XMLSchema#string] line 
1094



[18] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Class.  (Object 
is declared type  [http://www.w3.org/2002/07/owl#DataRange])
At [http://www.biopax.org/release/biopax-level1.owl#DIRECTION, 
http://www.w3.org/2000/01/rdf-schema#range, 65a43b:105328707b3:-7fb0] 
line 1053



[19] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Class.  (Object 
is declared type  [http://www.w3.org/2002/07/owl#DataRange])
At [http://www.biopax.org/release/biopax-level1.owl#CONTROL-TYPE, 
http://www.w3.org/2000/01/rdf-schema#range, 65a43b:105328707b3:-7faa] 
line 1135



[20] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa8, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-ALLOSTERIC":http://www.w3.org/2001/XMLSchema#string] line 
1091



[21] WARNING - Domain Type Mismatch: Use of this property implies that 
subject is of type http://www.w3.org/2000/01/rdf-schema#Class. 
(Subject is declared type [http://www.w3.org/2002/07/owl#DataRange])
At [65a43b:105328707b3:-7fb6, http://www.w3.org/2002/07/owl#oneOf, 
65a43b:105328707b3:-7fb4] line 950



[22] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7faf, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"PHYSIOL-LEFT-TO-RIGHT":http://www.w3.org/2001/XMLSchema#string] line 
1034



[23] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7f9e, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"ACTIVATION":http://www.w3.org/2001/XMLSchema#string] line 1131



[24] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fb2, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"CML":http://www.w3.org/2001/XMLSchema#string] line 973



[25] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa0, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-NONCOMPETITIVE":http://www.w3.org/2001/XMLSchema#string] 
line 1123



[26] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fab, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"REVERSIBLE":http://www.w3.org/2001/XMLSchema#string] line 1050



[27] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa1, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-UNCOMPETITIVE":http://www.w3.org/2001/XMLSchema#string] 
line 1119



[28] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fae, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"IRREVERSIBLE-RIGHT-TO-LEFT":http://www.w3.org/2001/XMLSchema#string] 
line 1040



[29] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fa6, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"INHIBITION-OTHER":http://www.w3.org/2001/XMLSchema#string] line 1099



[30] WARNING - Domain Type Mismatch: Use of this property implies that 
subject is of type http://www.w3.org/2000/01/rdf-schema#Class. 
(Subject is declared type [http://www.w3.org/2002/07/owl#DataRange])
At [65a43b:105328707b3:-7fb3, http://www.w3.org/2002/07/owl#oneOf, 
65a43b:105328707b3:-7fb2] line 979



[31] WARNING - Range Type Mismatch: Use of this property implies that 
object is of type http://www.w3.org/2000/01/rdf-schema#Resource.
At [65a43b:105328707b3:-7fb4, 
http://www.w3.org/1999/02/22-rdf-syntax-ns#first, 
"L-R":http://www.w3.org/2001/XMLSchema#string] line 949


It seems to me mostly a validator's problem.
Any hints ?

best,
Andrea Splendiani

Received on Thursday, 4 August 2005 10:56:36 UTC