W3C home > Mailing lists > Public > www-rdf-interest@w3.org > April 2002

Constraints: Content model - how to?

From: <tony_hammond@harcourt.com>
Date: Tue, 16 Apr 2002 10:17:29 +0100
To: www-rdf-interest@w3.org
Message-ID: <OF247720B2.DFEC19EF-ON80256B9D.0022F820@harcourtbrace.com>
Hi:

Naive question, but: Is there any means of specifying content model type
constraints in an RDF schema? Eg in the schema below I'd like to
differentiate between the Nest and Item classes - see comments - but I
don't seem to have a means to express that. Oh, and if I'd further like to
constrain the literal properties to be zero or one? Is this straying into
DAML territory or is there some other way to do this?

Thanks,
Tony



@prefix  : <#> .
@prefix s: <http://www.w3.org/2000/01/rdf-schema> .

# Nest class ( :resource & :collection )
:Nest a s:Class .
# Item class ( :resource | :collection )
:Item a s:Class .

# Resource properties
:resource a s:Property ;
    s:domain :Item, :Nest ; s:range s:Resource .
:collection a s:Property ;
    s:domain :Item, :Nest ; s:range s:Container .

# Literal properties
:access a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
:detail a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
:directive a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
:label a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
:role a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
:type a s:Property ;
    s:domain :Item, :Nest ; s:range s:Literal .
Received on Tuesday, 16 April 2002 05:24:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:51:53 GMT