<> <#rcsid> "$Id: xsd-rules.n3,v 1.28 2003/12/07 12:34:54 amdus Exp $". @prefix log: . @prefix math: . @prefix owl: . @prefix xsd: . @prefix rdfs: . @prefix rdf: . @prefix : . ### XML Schema Datatypes XSD xsd:ID a rdfs:Datatype; rdfs:subClassOf xsd:anyURI, xsd:Name. xsd:IDREF a rdfs:Datatype; rdfs:subClassOf xsd:anyURI, xsd:Name. xsd:NCName a rdfs:Datatype; rdfs:subClassOf xsd:anyURI, xsd:Name. xsd:NMTOKEN a rdfs:Datatype; rdfs:subClassOf xsd:token. xsd:Name a rdfs:Datatype; rdfs:subClassOf xsd:NMTOKEN. xsd:anyURI a rdfs:Datatype; rdfs:subClassOf xsd:token. xsd:base64Binary a rdfs:Datatype. xsd:boolean a rdfs:Datatype. xsd:byte a rdfs:Datatype; rdfs:subClassOf xsd:short. xsd:date a rdfs:Datatype. xsd:dateTime a rdfs:Datatype. xsd:decimal a rdfs:Datatype. xsd:double a rdfs:Datatype. xsd:duration a rdfs:Datatype. xsd:float a rdfs:Datatype; rdfs:subClassOf xsd:double. xsd:gDay a rdfs:Datatype. xsd:gMonth a rdfs:Datatype. xsd:gMonthDay a rdfs:Datatype. xsd:gYear a rdfs:Datatype. xsd:gYearMonth a rdfs:Datatype. xsd:hexBinary a rdfs:Datatype. xsd:int a rdfs:Datatype; rdfs:subClassOf xsd:long, xsd:double. xsd:integer a rdfs:Datatype; rdfs:subClassOf xsd:decimal. xsd:language a rdfs:Datatype; rdfs:subClassOf xsd:NCName, xsd:ID, xsd:IDREF. xsd:long a rdfs:Datatype; rdfs:subClassOf xsd:integer. xsd:negativeInteger a rdfs:Datatype; rdfs:subClassOf xsd:nonPositiveInteger. xsd:nonNegativeInteger a rdfs:Datatype; rdfs:subClassOf xsd:integer. xsd:nonPositiveInteger a rdfs:Datatype; rdfs:subClassOf xsd:integer. xsd:normalizedString a rdfs:Datatype; rdfs:subClassOf xsd:string. xsd:positiveInteger a rdfs:Datatype; rdfs:subClassOf xsd:nonNegativeInteger. xsd:short a rdfs:Datatype; rdfs:subClassOf xsd:int, xsd:float. xsd:string a rdfs:Datatype. xsd:time a rdfs:Datatype. xsd:token a rdfs:Datatype; rdfs:subClassOf xsd:normalizedString. xsd:unsignedByte a rdfs:Datatype; rdfs:subClassOf xsd:short, xsd:unsignedShort. xsd:unsignedInt a rdfs:Datatype; rdfs:subClassOf xsd:long, xsd:double, xsd:unsignedLong. xsd:unsignedLong a rdfs:Datatype; rdfs:subClassOf xsd:nonNegativeInteger. xsd:unsignedShort a rdfs:Datatype; rdfs:subClassOf xsd:int, xsd:float, xsd:unsignedInt. ### inference rules for XML Schema Datatypes XSD {:xsd1l log:racine ?LR. ?S a xsd:int, xsd:nonNegativeInteger} => {?S a xsd:unsignedLong}. {:xsd1i log:racine ?LR. ?S a xsd:short, xsd:nonNegativeInteger} => {?S a xsd:unsignedInt}. {:xsd1s log:racine ?LR. ?S a xsd:byte, xsd:nonNegativeInteger} => {?S a xsd:unsignedShort}. {:xsd2i log:racine ?LR. ?P rdfs:range xsd:int, xsd:unsignedLong} => {?P rdfs:range xsd:unsignedInt}. {:xsd2s log:racine ?LR. ?P rdfs:range xsd:short, xsd:unsignedInt} => {?P rdfs:range xsd:unsignedShort}. {:xsd2b log:racine ?LR. ?P rdfs:range xsd:byte, xsd:unsignedShort} => {?P rdfs:range xsd:unsignedByte}. {:xsd3s log:racine ?LR. ?P rdfs:range xsd:nonNegativeInteger, xsd:nonPositiveInteger} => {?P rdfs:range xsd:short}. {:xsd4r log:racine ?LR. ?P rdfs:range xsd:byte} => {?P rdfs:range xsd:short}. {:xsd5s log:racine ?LR. ?P rdfs:range xsd:integer, xsd:string} => {?P rdfs:subPropertyOf ?Q}. {:xsd19d1 log:racine ?LR. ?R @has owl:onProperty ?P; owl:cardinality ?M. ?P rdfs:range xsd:byte, xsd:unsignedInt. ?M math:notLessThan 128. ?N math:lessThan ?M. ?S a ?R} => {?S ?P ?N}. {:xsd19d2 log:racine ?LR. ?R @has owl:onProperty ?P; owl:someValuesFrom xsd:nonPositiveInteger. ?P rdfs:range xsd:nonNegativeInteger. ?N math:equalTo 0. ?S a ?R} => {?S ?P ?N}. ### inconsistency detections @@ {:xsdIb1 log:racine ?LR. ?R owl:onProperty ?P; owl:cardinality ?M. ?P rdfs:range xsd:byte. ?M math:greaterThan 256} => {{?R owl:onProperty ?P; owl:cardinality ?M. ?P rdfs:range xsd:byte. ?M math:greaterThan 256} log:inconsistentWith owl:}. {:xsdIb2 log:racine ?LR. ?R owl:onProperty ?P; owl:cardinality ?M. ?P rdfs:range xsd:byte, xsd:unsignedInt. ?M math:greaterThan 128} => {{?R owl:onProperty ?P; owl:cardinality ?M. ?P rdfs:range xsd:byte, xsd:unsignedInt. ?M math:greaterThan 128} log:inconsistentWith owl:}. {:xsdIx1 log:racine ?LR. ?P @has rdf:type owl:FunctionalProperty. ?X ?P ?A^^rdf:XMLLiteral, ?B^^rdf:XMLLiteral. ?A log:notEqualTo ?B} => {{?P @has rdf:type owl:FunctionalProperty. ?X ?P ?A^^rdf:XMLLiteral, ?B^^rdf:XMLLiteral. ?A log:notEqualTo ?B} log:inconsistentWith owl:}. {:xsdI1 log:racine ?LR. ?P rdfs:range xsd:string. ?S ?P ?X^^xsd:decimal} => {{?P rdfs:range xsd:string. ?S ?P ?X^^xsd:decimal} log:inconsistentWith xsd:}. {:xsdI2 log:racine ?LR. ?P rdfs:range ?D. ?D a rdfs:Datatype. ?S ?P ?X. ?X a xsd:string} => {{?P rdfs:range ?D. ?D a rdfs:Datatype. ?S ?P ?X. ?X a xsd:string} log:inconsistentWith xsd:}. {:xsdI3 log:racine ?LR. ?C rdfs:subClassOf xsd:decimal; rdfs:subClassOf xsd:string} => {{?C rdfs:subClassOf xsd:decimal; rdfs:subClassOf xsd:string} log:inconsistentWith xsd:}. {:xsdI01 log:racine ?LR. ?S a xsd:ID; log:clashesWith xsd:ID} => {{?S a xsd:ID} log:inconsistentWith xsd:}. {:xsdI02 log:racine ?LR. ?S a xsd:IDREF; log:clashesWith xsd:IDREF} => {{?S a xsd:IDREF} log:inconsistentWith xsd:}. {:xsdI03 log:racine ?LR. ?S a xsd:NCName; log:clashesWith xsd:NCName} => {{?S a xsd:NCName} log:inconsistentWith xsd:}. {:xsdI04 log:racine ?LR. ?S a xsd:NMTOKEN; log:clashesWith xsd:NMTOKEN} => {{?S a xsd:NMTOKEN} log:inconsistentWith xsd:}. {:xsdI05 log:racine ?LR. ?S a xsd:Name; log:clashesWith xsd:Name} => {{?S a xsd:Name} log:inconsistentWith xsd:}. {:xsdI06 log:racine ?LR. ?S a xsd:anyURI; log:clashesWith xsd:anyURI} => {{?S a xsd:anyURI} log:inconsistentWith xsd:}. {:xsdI07 log:racine ?LR. ?S a xsd:base64Binary; log:clashesWith xsd:base64Binary} => {{?S a xsd:base64Binary} log:inconsistentWith xsd:}. {:xsdI08 log:racine ?LR. ?S a xsd:boolean; log:clashesWith xsd:boolean} => {{?S a xsd:boolean} log:inconsistentWith xsd:}. {:xsdI09 log:racine ?LR. ?S a xsd:byte; log:clashesWith xsd:byte} => {{?S a xsd:byte} log:inconsistentWith xsd:}. {:xsdI10 log:racine ?LR. ?S a xsd:date; log:clashesWith xsd:date} => {{?S a xsd:date} log:inconsistentWith xsd:}. {:xsdI11 log:racine ?LR. ?S a xsd:dateTime; log:clashesWith xsd:dateTime} => {{?S a xsd:dateTime} log:inconsistentWith xsd:}. {:xsdI12 log:racine ?LR. ?S a xsd:decimal; log:clashesWith xsd:decimal} => {{?S a xsd:decimal} log:inconsistentWith xsd:}. {:xsdI13 log:racine ?LR. ?S a xsd:double; log:clashesWith xsd:double} => {{?S a xsd:double} log:inconsistentWith xsd:}. {:xsdI14 log:racine ?LR. ?S a xsd:duration; log:clashesWith xsd:duration} => {{?S a xsd:duration} log:inconsistentWith xsd:}. {:xsdI15 log:racine ?LR. ?S a xsd:float; log:clashesWith xsd:float} => {{?S a xsd:float} log:inconsistentWith xsd:}. {:xsdI16 log:racine ?LR. ?S a xsd:gDay; log:clashesWith xsd:gDay} => {{?S a xsd:gDay} log:inconsistentWith xsd:}. {:xsdI17 log:racine ?LR. ?S a xsd:gMonth; log:clashesWith xsd:gMonth} => {{?S a xsd:gMonth} log:inconsistentWith xsd:}. {:xsdI18 log:racine ?LR. ?S a xsd:gMonthDay; log:clashesWith xsd:gMonthDay} => {{?S a xsd:gMonthDay} log:inconsistentWith xsd:}. {:xsdI19 log:racine ?LR. ?S a xsd:gYear; log:clashesWith xsd:gYear} => {{?S a xsd:gYear} log:inconsistentWith xsd:}. {:xsdI20 log:racine ?LR. ?S a xsd:gYearMonth; log:clashesWith xsd:gYearMonth} => {{?S a xsd:gYearMonth} log:inconsistentWith xsd:}. {:xsdI21 log:racine ?LR. ?S a xsd:hexBinary; log:clashesWith xsd:hexBinary} => {{?S a xsd:hexBinary} log:inconsistentWith xsd:}. {:xsdI22 log:racine ?LR. ?S a xsd:int; log:clashesWith xsd:int} => {{?S a xsd:int} log:inconsistentWith xsd:}. {:xsdI23 log:racine ?LR. ?S a xsd:integer; log:clashesWith xsd:integer} => {{?S a xsd:integer} log:inconsistentWith xsd:}. {:xsdI24 log:racine ?LR. ?S a xsd:language; log:clashesWith xsd:language} => {{?S a xsd:language} log:inconsistentWith xsd:}. {:xsdI25 log:racine ?LR. ?S a xsd:long; log:clashesWith xsd:long} => {{?S a xsd:long} log:inconsistentWith xsd:}. {:xsdI26 log:racine ?LR. ?S a xsd:negativeInteger; log:clashesWith xsd:negativeInteger} => {{?S a xsd:negativeInteger} log:inconsistentWith xsd:}. {:xsdI27 log:racine ?LR. ?S a xsd:nonNegativeInteger; log:clashesWith xsd:nonNegativeInteger} => {{?S a xsd:nonNegativeInteger} log:inconsistentWith xsd:}. {:xsdI28 log:racine ?LR. ?S a xsd:nonPositiveInteger; log:clashesWith xsd:nonPositiveInteger} => {{?S a xsd:nonPositiveInteger} log:inconsistentWith xsd:}. {:xsdI29 log:racine ?LR. ?S a xsd:normalizedString; log:clashesWith xsd:normalizedString} => {{?S a xsd:normalizedString} log:inconsistentWith xsd:}. {:xsdI30 log:racine ?LR. ?S a xsd:positiveInteger; log:clashesWith xsd:positiveInteger} => {{?S a xsd:positiveInteger} log:inconsistentWith xsd:}. {:xsdI31 log:racine ?LR. ?S a xsd:short; log:clashesWith xsd:short} => {{?S a xsd:short} log:inconsistentWith xsd:}. {:xsdI32 log:racine ?LR. ?S a xsd:string; log:clashesWith xsd:string} => {{?S a xsd:string} log:inconsistentWith xsd:}. {:xsdI33 log:racine ?LR. ?S a xsd:time; log:clashesWith xsd:time} => {{?S a xsd:time} log:inconsistentWith xsd:}. {:xsdI34 log:racine ?LR. ?S a xsd:token; log:clashesWith xsd:token} => {{?S a xsd:token} log:inconsistentWith xsd:}. {:xsdI35 log:racine ?LR. ?S a xsd:unsignedByte; log:clashesWith xsd:unsignedByte} => {{?S a xsd:unsignedByte} log:inconsistentWith xsd:}. {:xsdI36 log:racine ?LR. ?S a xsd:unsignedInt; log:clashesWith xsd:unsignedInt} => {{?S a xsd:unsignedInt} log:inconsistentWith xsd:}. {:xsdI37 log:racine ?LR. ?S a xsd:unsignedLong; log:clashesWith xsd:unsignedLong} => {{?S a xsd:unsignedLong} log:inconsistentWith xsd:}. {:xsdI38 log:racine ?LR. ?S a xsd:unsignedShort; log:clashesWith xsd:unsignedShort} => {{?S a xsd:unsignedShort} log:inconsistentWith xsd:}.