From: Minor Gordon (email@example.com)
- My question is this: Is it possible to use an XSD complexType as the range in a daml:DatatypeProperty? So that the individual comes out like : <Classname rdf:ID="Individual"> <PropertyComplexType> <element/> <element2/> </PropertyComplexType> </Classname> I have seem some examples which use RDF properties to do something almost like this... but shouldn't I be able to write entirely in DAML (with types in XML Schema)? Please forgive my ignorance when it comes to frame-based representation languages. I am coming to DAML from XML and OOP, and am immensely attracted to the DAML representation's correspondence to OOP concepts such as classes and members (aside from its use in agents, which are what I'm working on). >Most unfortunately, there seems to be a dearth >of good DAML examples on the web, aside from those published by >daml.org, which do not demonstrate certain capacities of DAML I am >trying to employ >- namely, the extension of Properties to include user-defined XML Schema >data types. The daml-ex-dt shows simpleTypes from a .xsd acting as >restrictions on a daml:DatatypeProperty (#age), which has the rdfs:range >#nonNegativeInteger. I would like to use a Schema complexType to define a >"location", which is comprised of strings for city, state, etc. along with >GML types for geospatial data, like this: > > <xsd:complexType name="LocationType"> > <xsd:sequence> > <xsd:element name="Address"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="City" type="xsd:string"/> > <xsd:element name="State" type="xsd:string"/> > <xsd:element name="Country" type="xsd:string"/> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > </xsd:sequence> > </xsd:complexType> > >And then have this type as a property such as "destination", like: > ><daml:Class> >... > <rdfs:subClassOf> > <daml:Restriction> > <daml:minCardinality>1</daml:minCardinality> > <daml:onProperty rdf:resource="#hasDestination"/> > </daml:Restriction> > </rdfs:subClassOf> ></daml:Class> > ><daml:ObjectProperty rdf:ID="hasDestination"> > <rdfs:domain rdf:resource="#location"/> > <rdfs:range rdf:resource="#location"/> </daml:ObjectProperty> > > <daml:DatatypeProperty rdf:ID="location"> > <rdfs:range > rdf:resource="file:/jardin/jardin/jardintypes#LocationType"/> > </daml:DatatypeProperty> > >I've tried all sorts of mutations, but nothing has gotten past the >validator. The DAML 3/01 specification claims to support XML Schema >types... does this only apply to the example situation (simpleTypes >restricting daml:DatatypeProperty's) in the walkthrough?
This archive was generated by hypermail 2.1.4 : 04/03/02 EST