- From: John F. Schlesinger <swick@w3.org>
- Date: Wed, 24 Jan 2001 17:02:21 -0500
- To: www-rdf-interest@w3.org
[freed from spam trap -rrs] To: www-rdf-interest@w3.org CC: johns@syscore.com From: johns@syscore.com (John F. Schlesinger) Organization: SysCore Message-ID: <20010123192652919.AAA161@SCHLESINGER> I hope I'm not being dense, but I'm having a lot of trouble writing a simple RDF schema and instance. I've been through the archive and there was some discussion of this a while back. In addition, I have looked at DAML+OIL and they have exactly what I want in their daml:Collection parseType. What I want is to create a schema for a two classes, one property and one container such that one class has a property which is a container of instances of the other class. Naively I thought I could use the following schema: <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <rdfs:Class rdf:ID="Container"/> <rdfs:Class rdf:ID="Bag"> <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/> </rdfs:Class> <rdf:Property rdf:ID="has"> <rdfs:domain rdf:resource="#Container"/> <rdfs:range rdf:resource="#Bag"/> </rdf:Property> <rdf:Description about="http://somwhere/something"> <Container> <has> <Contained>First</Contained> <Contained>Second</Contained> <Contained>Third</Contained> </has> </Container> </rdf:Description> </rdf:RDF> (Note that I originally used rdfs:Container instead of rdfs:Class but this failed validation as the range of range must be a class) Using VRP (from ICS-FORTH) I get the error message: Semantic error 3004: You are not allowed to change a rdf:Property to a rdfs:Class. file:Container.rdfs#has Error called by: Model.make_class at line 19(4) of input during parsing: </ (Note - I get this for each line) If I change the <Contained> tag to <rdf:li> then I get the message: Syntax error 1002: Error in a description, compare with [6.3] RDF M&S. Error called by: parser at line 15(10) of input during parsing: rdf:li Exception in thread "main" java.lang.Error: Symbol recycling detected (fix your scanner). I have no idea what this means (the symbol recycling that is) but I am prepared to believe I've done something wrong! Can anyone tell me two things: 1. What the syntax is for instances of rdfs:Container? 2. How to create a property that is a bg of classes? Thanks in desperation. John F Schlesinger SysCore Solutions johns@syscore.com Yours, John
Received on Friday, 26 January 2001 10:17:14 UTC