Sponsored by:

XML.comO'Reilly Networkoreilly.comONJava.com
  Home | Resources | Buyer's Guide | FAQs | Newsletter | Tech Jobs
  Resource Centers
Web Services

Annotated XML
What is XML?
What is XSLT?
What is XSL-FO?
What is XLink?
What is XML Schema?
What is RDF?
What are Web Services?

Manage Your Account
Forgot Your Password?

Article Archive

Add XML to your Website

Style Matters
Transforming XML
Perl and XML
XML Endpoints
Sacré SVG

XML Resources
Buyer's Guide
Events Calendar
Standards List
Submissions List


Syntax Checker

Seybold Publications

This site is on the O'Reilly Network

Format for printing

DAML Reference

by Uche Ogbuji, Roxane Ouellet
May 01, 2002

This third installment of our series looking at the DARPA Agent Markup Language provides a quick reference for concepts from RDF, RDF Schema and DAML.

1.  RDF Syntax Elements
2.  DAML+OIL Syntax Elements
3.  RDF Classes and Properties
4.  RDFS Classes and Properties
5.  DAML Classes and Properties

1. RDF Syntax Elements

Namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Specification: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222

The syntax elements in the RDF XML syntax have been designed to allow grouping of multiple statements about a resource into an rdf:Description element. These elements are not part of the model and are therefore not deserialized into triples.

1.1. rdf:about

Attribute. rdf:about identifies the resource to which the following statements apply. The value of the attribute is a URI reference.

1.2. rdf:Description

Element. The RDF XML syntax groups multiple statements for the same resource into this rdf:Description element. The rdf:Description element references, in the rdf:about attribute, the resource to which each of the statements apply. If the resource does not yet exist (i.e., does not yet have a resource identifier), then a rdf:Description element can supply the identifer for the resource using an rdf:ID attribute.

1.3. rdf:ID

Attribute. rdf:ID also identifies the resource to which the following statements apply. The resource will be created in the default namespace of the declaring document. The resulting URI is made by concatenating the namespace with the value of the attribute.

1.4. rdf:li

Element. rdf:li is used by RDF/XML as a convenience element to avoid having to explicitly number each member of a rdf:Bag, rdf:Seq, or rdf:Alt. The rdf:li element assigns the properties _1, _2, and so on as necessary. The element name "li" was chosen as a mnemonic with the term "list item" from HTML.

1.5. rdf:parseType

Attribute. rdf:ParseType is an attribute whose values are either Resource or Literal. The value is case-sensitive. DAML+OIL introduced the daml:collection value, see daml:collection

1.6. rdf:RDF

Element. The RDF element is a simple wrapper that marks the boundaries in an XML document between which the content is explicitly intended to be mapped into an RDF data model instance, including RDF, RDFS, and DAML+OIL.

1.7. rdf:resource

Attribute. rdf:resource is used in a property declaration to specify that some other resource, not a literal, is the value of the property.

1.8. Literal

Attribute value. Literal parsetype means that the content of the element is a literal and any markup will not be interpreted by RDF.

1.9. Resource

Attribute value. Resource parsetype specifies that the element content must be treated as if it were the content of an rdf:Description element.

1.10. xml:lang

Namespace URI: http://www.w3.org/2000/10/XML#
Specification: http://www.w3.org/TR/2001/REC-xml-20001006

Attribute. The xml:lang attribute may be used as defined by XML to associate a language with the property value.

2. DAML+OIL Syntax Elements

Namespace URI: http://www.daml.org/2001/03/daml+oil#
Specification: http://www.daml.org/2001/03/daml+oil.daml

2.1. daml:collection

Attribute value. DAML+OIL needs to represent unordered collections of items (also known as bags or multisets) in a number of constructions, such as daml:intersectionOf, daml:unionOf, daml:oneOf, daml:disjointUnionOf. DAML+OIL exploits the rdf:parseType attribute to extend the syntax of RDF with a convenient notation for such collections. Whenever an element has the rdf:parseType attribute with value "daml:collection", the enclosed elements must be interpreted as elements in a list structure, constructed using the elements daml:List, daml:first, daml:rest and daml:nil.

3. RDF Classes and Properties

Namespace URI: http://www.w3.org/1999/02/22-rdf-syntax-ns#
Specification: http://www.w3.org/TR/1999/REC-rdf-syntax-19990222

3.1. rdf:Alt

rdf:Alt represents an instance of an Alternative container resource type. It represents alternatives for the (single) value of a property. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.2. rdf:Bag

rdf:Bag represents an instance of a Bag container resource type. A Bag is an unordered list of resources or literals. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.3. rdf:Property

rdf:Property represents the subset of RDF resources that are properties. A property is a specific aspect, characteristic, attribute, or relation used to describe a resource. For instance in the following statement "Mr. John Smith is a member of the Boulder Nordic Club", being a member would be a relation that Mr. Smith has with the Club, therefore member can be considered an rdf:Property of Mr. Smith. In XML that statement could be defined as shortly as this:

  <rdf:Description rdf:about="#jsmith">
    <member rdf:resource="#BoulderNordicClub"/>

3.4. rdf:Seq

rdf:Seq represents an instance of a Sequence container resource type. A Sequence is an ordered list of resources or literals. The members of the collection are denoted by rdf:li in the XML syntax and by _1, _2, _3 etc. in the model.

3.5. rdf:Statement

When a resource represents a reified statement and has an rdf:type of rdf:Statement, then that resource must have a rdf:subject property, one rdf:object property, and one rdf:predicate property. A reified statement is a statement about another statement.

For instance the statement "The manager says that Mr. John Smith is a member of the Boulder Nordic Club" is a reified statement where the statement "Mr. John Smith is a member of the Boulder Nordic Club" is attributed to the manager. The syntax of that statement could look like this:

    <rdf:subject rdf:resource="#jsmith" />
    <rdf:predicate rdf:resource="#member" />
    <rdf:object rdf:resource="#BoulderNordicClub">
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
    <attributedTo rdf:resource="#manager"/>

3.6. rdf:object

rdf:type rdf:Property

rdf:object identifies the value of the property in the modeled statement. The value of the object property is the object in the original rdf:Statement. In our example the resource "#BoulderNordicClub" is the rdf:object.

3.7. rdf:predicate

rdf:type rdf:Property
rdf:predicate identifies the original property itself in the modeled statement. In our example, the resource "#member" represents the member property.

3.8. rdf:subject

rdf:type rdf:Property

rdf:subject identifies the resource being described by the modeled statement; that is, the value of the subject property is the resource about which the original rdf:Statement was made. Therefore, "#jsmith" was our rdf:subject.

3.9. rdf:type

rdf:type rdf:Property

rdf:type indicates that a resource is a member of a class, and thus has all the characteristics that are to be expected of a member of that class. Note that a resource can be an instance of more than one class.

Take the following statements as an example:

  <rdf:Description rdf:ID="TreZetta1010">
    <rdf:type rdf:about="#Footwear"/>
    <rdf:type rdf:about="#HikingGear"/>

Not only are we saying that the resource "#TreZetta1010" is an instance of both "#Footwear" and "#HikingGear" but by inference it is also of rdf:type "#HikingShoes".

  <daml:Class rdf:ID="HikingShoes">
    <rdfs:label>Hiking Shoes</rdfs:label>
    <rdfs:comment>An item worn on the feet while hiking</rdfs:comment>
    <daml:intersectionOf rdf:parseType="daml:collection">
      <daml:Class rdf:about="#HikingGear"/>
      <daml:Class rdf:about="#Footwear"/>

3.10. rdf:value

rdf:type rdf:Property

rdf:value specifies the value of a property: it can be a literal or a resource defined by the attribute rdf:resource.

Pages: 1, 2, 3, 4

Contact Us | Our Mission | Privacy Policy | Advertise With Us | Site Help
Copyright © 2002 O'Reilly & Associates, Inc.