Re: Fwd: Markup of SKOS in HTML

<ol
   class="menu"
   xmlns:skos="http://www.w3.org/2004/02/skos/core#"
   xmlns:foaf="http://xmlns.com/foaf/0.1/"
   about="http://ukwildlife.co.uk/concepts#wildlife"
   typeof="skos:Concept"
   rel="skos:narrower">

  <!-- The above means that http://ukwildlife.co.uk/concepts#wildlife
  is a Concept, and the child elements (the <li> elements) are
  related to it by being narrower concepts. -->

   <li typeof="skos:Concept">

      <!-- Above introduces another Concept, but one without a URI.
      Giving the concept a URI (in an 'about' attribute) is generally
      a good idea because it allows other people to link to it. -->

      <a
         rel="foaf:page"
         href="/galleries/mammals/"
         property="skos:prefLabel"
         >Mammals</a>

      <!-- Above says that the concept has a page, with address
      /galleries/mammals/, and has a preferred label "Mammals".
      These attributes apply to the concept defined by the <li>
      element, not to the concept defined by the <ol> element,
      thanks to RDFa's nesting rules. -->

   </li>

   <li typeof="skos:Concept">
      <a
         rel="foaf:page"
         href="/galleries/birds-ornithology/"
         property="skos:prefLabel">Birds</a>

      <!-- The above is similar to the mammals concept. -->

      <span rel="skos:related">
         <span
            typeof="skos:Concept"
            property="skos:prefLabel">Ornithology</span>
      </span>

      <!-- This says that the Birds concept is related to another
      concept that has a preferred label "Ornithology".

      Previously you were using something like this:

          <span property="skos:related">Ornithology</span>

      This is wrong though, because the RDFa property attribute
      is used to mark literal properties (strings essentially),
      whereas the skos:related property is intended to be used to
      related between two concepts, not one concept and a literal.
      So rel is used instead, the target being a concept that has
      a preferred label. -->

   </li>
   
   <!-- The other concepts in your example were mostly similar. -->

</ol>


-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Monday, 22 February 2010 23:10:08 UTC