Q: RDF Content Model and DAML+OIL

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 UTC