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

Q: RDF Content Model and DAML+OIL

From: <tony_hammond@harcourt.com>
Date: Mon, 29 Apr 2002 10:28:24 +0100
To: <www-rdf-interest@w3.org>
Message-ID: <OFC5C5D94B.7F1CB9C6-ON80256BAA.0032940C@harcourtbrace.com>
Hi:

I am trying to apply appropriate constraints on the content model for my
RDF schema. See

     http://www2.elsevier.co.uk/~tony/cookbook/doc/yads.html

for a schema tree - resources are clickable. (Background: The YADS model is
aimed at providing a simple means to manage resource collections.)

My question is if I have this DTD for an <item> element


  <!ELEMENT item (property*, (resource | collection), property*)>

  <!ELEMENT collection (nest+ | item+)>
  <!ELEMENT resource (#PCDATA)>
  <!ELEMENT property (#PCDATA)>


then is the below the correct way of implementing this in DAML+OIL or is it
simpler than this?

Thanks,
Tony


<r:RDF
  xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns:s="http://www.w3.org/2000/01/rdf-schema#"
  xmlns:d="http://www.w3.org/2001/10/daml+oil#"
>
<d:Class r:ID="Item">
  <s:label>Item</s:label>
  <s:subClassOf>
    <r:Alt>
      <r:li>
        <r:Bag>
          <r:li>
            <d:Restriction d:cardinality="1">
              <d:onProperty r:resource="#resource"/>
            </d:Restriction>
          </r:li>
          <r:li>
            <d:Restriction d:cardinality="0">
              <d:onProperty r:resource="#collection"/>
            </d:Restriction>
          </r:li>
        </r:Bag>
      </r:li>
      <r:li>
        <r:Bag>
          <r:li>
            <d:Restriction d:cardinality="0">
              <d:onProperty r:resource="#resource"/>
            </d:Restriction>
          </r:li>
          <r:li>
            <d:Restriction d:cardinality="1">
              <d:onProperty r:resource="#collection"/>
            </d:Restriction>
          </r:li>
        </r:Bag>
      </r:li>
    </r:Alt>
  </s:subClassOf>
</d:Class>
Received on Monday, 29 April 2002 05:31:02 GMT

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