[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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

  • From: Jonathan Borden <jborden@m...>
  • To: Mike Brown <mbrown@c...>, xml-dev@l...
  • Date: Fri, 18 Aug 2000 22:25:43 -0400

express object
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


>


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.