OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Standard way to express object, not resource, rels in XML?

[ Lists Home | Date Index | Thread Index ]
  • From: Jonathan Borden <jborden@mediaone.net>
  • To: Mike Brown <mbrown@corp.webb.net>, xml-dev@lists.xml.org
  • Date: Fri, 18 Aug 2000 22:25:43 -0400

Mike Brown wrote:

> I want to use XML to express relationships between instances of the
> conceptual/abstract objects that are each modeled by separate XML
> documents
> (or separate collections of documents). I was about to make something up
> that was specific to my application, but I was wondering if there was a
> standard way to do this.
>

RDF Schemas are designed for this. In this case the models are contained
within the same document, and referred to by identifiers. The models could
just as easily be contained in distinct documents.

Is this example explanatory? http://www.w3.org/TR/rdf-schema/#s7.1

<rdf:RDF xml:lang="en"
   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="Person">
  <rdfs:comment>The class of people.</rdfs:comment>
  <rdfs:subClassOf
rdf:resource="http://www.w3.org/2000/03/example/classes#Animal"/>
</rdfs:Class>

<rdf:Property ID="maritalStatus">
  <rdfs:range rdf:resource="#MaritalStatus"/>
  <rdfs:domain rdf:resource="#Person"/>
</rdf:Property>

<rdf:Property ID="ssn">
  <rdfs:comment>Social Security Number</rdfs:comment>
  <rdfs:range
rdf:resource="http://www.w3.org/2000/03/example/classes#Integer"/>
  <rdfs:domain rdf:resource="#Person"/>
</rdf:Property>

<rdf:Property ID="age">
  <rdfs:range
rdf:resource="http://www.w3.org/2000/03/example/classes#Integer"/>
  <rdfs:domain rdf:resource="#Person"/>
</rdf:Property>

<rdfs:Class rdf:ID="MaritalStatus"/>

<MaritalStatus rdf:ID="Married"/>
<MaritalStatus rdf:ID="Divorced"/>
<MaritalStatus rdf:ID="Single"/>
<MaritalStatus rdf:ID="Widowed"/>

</rdf:RDF>

Jonathan Borden
The Open Healthcare Group
http://www.openhealth.org


>





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS