[Nml-wg] xml list examples

Jeroen van der Ham vdham at uva.nl
Fri Dec 3 03:55:07 CST 2010


On 03/12/2010 00:11, Jason Zurawski wrote:
> Freek/Jerone: what does RDF do (or would could RDF do) to do the same thing?

(Just a reminder, my name is Jeroen, not Jerone ;))

I've personally not used it before, but accoding to the RDF schemathere
are the following options (see example below):
- rdf:Bag containing numbered items (rdf:_1, rdf:_2, ...) which are
actually taken as unordered items.
- rdf:Bag containing unnumbered items like HTML lists (rdf:li)
- rdf:Seq contains unnumbered items like HTML lists (rdf:li), which are
supposed to be read in order.

I must say I'm a bit amazed by the last option since XML doesn't seem to
support ordering.

For completeness, there's also a rdf:Alt class for providing alternate
options, which also uses rdf:li

Jeroen.


<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:lib="http://www.zvon.org/library">

     <lib:Author about="RD">
          <lib:firstName>Roald</lib:firstName>
          <lib:surname>Dahl</lib:surname>

          <lib:books>
               <rdf:Bag>
                    <rdf:_1 resource="Matilda"/>
                    <rdf:_2 resource="The BFG"/>
               </rdf:Bag>
          </lib:books>
     </lib:Author>

     <rdf:Description about="JC">
          <rdf:type resource="http://www.zvon.org/library/Author"/>
          <lib:firstName>Joseph</lib:firstName>
          <lib:surname>Conrad</lib:surname>

          <lib:books>
               <rdf:Bag>
                    <rdf:li resource="Heart of Darkness"/>
                    <rdf:li resource="Lord Jim"/>
                    <rdf:li resource="The Secret Agent"/>
               </rdf:Bag>
          </lib:books>
     </rdf:Description>

     <lib:Book about="Matilda" lib:pages="240">
          <lib:copy>
               <rdf:Seq>
                    <rdf:li resource="M124"/>
                    <rdf:li resource="M125"/>
                    <rdf:li resource="M126"/>
               </rdf:Seq>
          </lib:copy>
     </lib:Book>

     <rdf:Description about="The BFG" lib:pages="208">
          <rdf:type resource="http://www.zvon.org/library/Book"/>
          <lib:copy rdf:resource="T458"/>
     </rdf:Description>

     <lib:Book about="Heart of Darkness" lib:pages="110">
          <lib:copy rdf:resource="H16"/>
     </lib:Book>

      <lib:Book about="Lord Jim" lib:pages="314">
          <lib:copy rdf:resource="L187"/>
      </lib:Book>

     <lib:Book about="The Secret Agent" lib:pages="249">
          <lib:copy rdf:resource="T360"/>
     </lib:Book>

</rdf:RDF>



More information about the nml-wg mailing list