From: Dan Connolly ([email protected])
Date: 09/04/01
Dan Connolly wrote: [...] > My tool of choice barfed... so I submitted the attached > ontology to our new RDF validation service > http://www.w3.org/RDF/Validator/ > and I got: > > Error: {E201} Syntax error when processing rdf:parseType. Cannot have > rdf:parseType in this context.[Line = 41, Column = 58] > Error: {E201} Syntax error when processing rdf:parseType. Cannot have > rdf:parseType in this context.[Line = 118, Column = 58] > Error: {E201} Syntax error when processing rdf:parseType. Cannot have > rdf:parseType in this context.[Line = 216, Column = 58] > Error: {E201} Syntax error when processing rdf:parseType. Cannot have > rdf:parseType in this context.[Line = 354, Column = 58] > > I'm in the process of fixing these errors... I'll share > the results when I have them. The probem was the use of two RDF property elements inside each other without an interleaved class... the nesting of elements in RDF is "striped"; it alternates between class and property; this wasn't properly striped... <daml:Class rdf:ID="Query"> <rdfs:subClassOf> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#queryPremise"/> <daml:maxCardinality> 1 </daml:maxCardinality> </daml:Restriction> the child of the subClassOf element has to be a class (so called "typednode" or "object" in the RDF grammar); the degenerate/placeholder class tag is rdf:Description; so this works: <daml:Class rdf:ID="Query"> <rdfs:subClassOf> <rdf:Description> <!-- added this --> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#queryPremise"/> <daml:maxCardinality> 1 </daml:maxCardinality> </daml:Restriction> Full diffs are attached. Meanwhile... > We chuckled on the phone about what an obscure mechanism it is > for communication in the group... > but I hope each of us has at his/her disposal some tools > that render DAML+OIL intelligible to us in some familiar > notation/interface. > > My tool of choice... is cwm/notation3; I find it more readable... :PropertyTerm a daml:Class; daml:disjointUnionOf ( :Variable :PropertyConstant ) . :QualifiedName a daml:Class; rdfs:subClassOf [ daml:intersectionOf ( [ daml:onProperty :nsName; daml:cardinality " 1 " ] [ daml:onProperty :localName; daml:cardinality " 1 " ] ) ] . In case others do too, here's the whole thing in RDF/n3: http://www.w3.org/2000/10/swap/test/dpoq22Aug/query-answer.n3 TimBL wrote a pretty reasonable intro to RDF/n3 http://www.w3.org/2000/10/swap/Primer and I recently re-implemented the parser using a parser toolkit: http://www.w3.org/2000/10/swap/rdfn3.g I generated a hypertext version of the grammar while I was at it: http://www.w3.org/2000/10/swap/rdfn3-gram.html We haven't done much release engineering around cwm, so I won't recommend folks try to install it themselves, but you can use it to convert between RDF/xml and RDF/n3 (and back) via a web interface: http://swag.webns.net/n3tordf For the adventurous, source is available http://www.w3.org/2000/10/swap/ http://dev.w3.org/cvsweb/2000/10/swap/ -- Dan Connolly, W3C http://www.w3.org/People/Connolly/ Index: query-answer.daml =================================================================== RCS file: /w3ccvs/WWW/2000/10/swap/test/dpoq22Aug/query-answer.daml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- query-answer.daml 2001/09/04 20:57:23 1.1 +++ query-answer.daml 2001/09/04 21:44:45 1.2 @@ -6,7 +6,7 @@ > <daml:Ontology rdf:about=""> - <daml:versionInfo>$Id: query-answer.daml,v 1.1 2001/09/04 20:57:23 connolly Exp $</daml:versionInfo> + <daml:versionInfo>$Id: query-answer.daml,v 1.2 2001/09/04 21:44:45 connolly Exp $</daml:versionInfo> <rdfs:comment> An ontology of basic query answering terms </rdfs:comment> <daml:imports rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns"/> <daml:imports rdf:resource="http://www.w3.org/2000/01/rdf-schema"/> @@ -38,6 +38,7 @@ </rdfs:comment> <rdfs:subClassOf> + <rdf:Description> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#queryPremise"/> @@ -49,6 +50,7 @@ <daml:cardinality> 1 </daml:cardinality> </daml:Restriction> </daml:intersectionOf> + </rdf:Description> </rdfs:subClassOf> </daml:Class> @@ -115,6 +117,7 @@ <daml:Class rdf:ID="VariableBinding"> <rdfs:subClassOf> + <rdf:Description> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#var"/> @@ -136,6 +139,7 @@ <daml:cardinality> 1 </daml:cardinality> </daml:Restriction> </daml:intersectionOf> + </rdf:Description> </rdfs:subClassOf> </daml:Class> @@ -213,6 +217,7 @@ <daml:Class rdf:ID="Triple"> <rdfs:subClassOf> + <rdf:Description> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#predicate"/> @@ -229,6 +234,7 @@ <daml:cardinality> 1 </daml:cardinality> </daml:Restriction> </daml:intersectionOf> + </rdf:Description> </rdfs:subClassOf> </daml:Class> @@ -351,6 +357,7 @@ <daml:Class rdf:ID="QualifiedName"> <rdfs:subClassOf> + <rdf:Description> <daml:intersectionOf rdf:parseType="daml:collection"> <daml:Restriction> <daml:onProperty rdf:resource="#nsName"/> @@ -362,6 +369,7 @@ <daml:cardinality> 1 </daml:cardinality> </daml:Restriction> </daml:intersectionOf> + </rdf:Description> </rdfs:subClassOf> </daml:Class>
This archive was generated by hypermail 2.1.4 : 04/02/02 EST