RE: modeling nested containers with items

Thanks Graham! I managed to combine your two examples to keep the
"Container" and "Item" names in, while still maintaining the rdf:Bag
constructs, then got rid of the rdf:Bags to reduce the verbosity by adding
rdf:parseType="Resource" to each Container, and it parses fine. Results
based on my original example are shown below. (By the way: also note Tony
Hammond's YADS work at http://dx.doi.org/1014/yads, where he tackled a
similar problem.)

My new question: instead of the "created" predicate coming from some
namespace that I just make up, does anyone know of one with these semantics
in a more well-known namespace? The W3C RDF Primer even has a myfoo:contains
predicate; it looks like a pretty straightforward need for a lot of
RDF-based projects.

Bob 

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:ex="http://example.org/">
   <ex:Container rdf:ID="i1" ex:created="20031001">

      <ex:contains rdf:parseType="Resource">

         <ex:Item rdf:ID="i2" ex:created="20031001"/>
         <ex:Item rdf:ID="i3" ex:created="20031003"/>

         <ex:Container rdf:ID="i4" rdf:parseType="Resource">

            <ex:created>20031002</ex:created>

            <ex:contains rdf:parseType="Resource">
               <ex:Item rdf:ID="i5" ex:created="20031002"/>
               <ex:Item rdf:ID="i6" ex:created="20031003"/>
               <ex:Item rdf:ID="i7" ex:created="20031001"/>

               <ex:Container rdf:ID="i8" rdf:parseType="Resource">
                  <ex:created>20031003</ex:created>
                  <ex:contains rdf:parseType="Resource">
                     <ex:Item rdf:ID="i9" ex:created="20031004"/>
                  </ex:contains>
               </ex:Container>

               <ex:Container rdf:ID="i10" rdf:parseType="Resource">
                  <ex:created>20031004</ex:created>
               </ex:Container>

            </ex:contains>

         </ex:Container>

      </ex:contains>

   </ex:Container>
</rdf:RDF>

Received on Wednesday, 8 October 2003 11:58:36 UTC