Citations with added RDFa: Difference between revisions

From The Digital Classicist Wiki
Jump to navigation Jump to search
Line 20: Line 20:
  <span rel="dc:references">
  <span rel="dc:references">
   <a class="citation"
   <a class="citation"
      title="Homer Iliad 2.494"
       typeof="dctype:Location"
       typeof="dctype:Text"
       rel="skos:definition"
       rel="skos:definition"
       href="http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&amp;query=Hom.%20Il.%202.494"
       href="http://pleiades.stoa.org/places/599612"
       >Il. 2.494-759</a>
       >Ephesis</a>
  </span>
  </span>


Which produces the following RDF/Turtle:
Which produces the following RDF/Turtle:
<nowiki>@prefix dc: <http://purl.org/dc/terms/> .
  @prefix dc: <http://purl.org/dc/terms/> .
  @prefix dc: <http://purl.org/dc/terms/> .
@prefix dctypes: <http://purl.org/dc/dcmitype/> .
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
  @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
  <http://example.org/article01>
  <http://example.org/article01>
     dc:references [
     dc:references [
         a dctypes:Text ;
         a dc:Location ;
         skos:definition <http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&amp;query=Hom.%20Il.%202.494>
         skos:definition <http://pleiades.stoa.org/places/599612>
     ] ;
     ] ;</nowiki>


The RDF can be read as saying, "There is a document at http://example.org/article01 that references a text that is defined at http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494 ."
The RDF can be read as saying, "There is a document at http://example.org/article01 that references a location that is defined at http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494 ."


===RDFa Pattern 2 with Geographic Entity===
===RDFa Pattern 2 with Geographic Entity===

Revision as of 22:38, 24 September 2010

The page Citation_in_digital_scholarship describes a convention for indicating citations that relies on the 'class' and 'title' attributes when implemented in (x)html. This page describes the extension of that convention to encompass adding RDFa to conformant citations.

Sample sentence: In the so-called "Catalog of Ships" (Il. 2.494-759), Homer lists the number of ships contributed by the Greeks and their allies.

With citation markup added: In the so-called "Catalog of Ships" (<a class="citation" title="Homer Iliad 2.494" href="http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494">Il. 2.494-759</a>), Homer lists the number of ships contributed by the Greeks and their allies.

RDFa Pattern 1

Focusing just on the 'a' element, the following RDFa provides additional levels of detail:

 <a class="citation" typeof="dc:Location" rel="skos:definition" href="http://pleiades.stoa.org/places/599612">Ephesus</a>


Assuming this snippet is found with a document with the URI http://example.org/article01 that contains the necessary prefix declaration, it produces the following RDF in Turtle format:

<http://example.org/article01>
 []
    a dc:Location ;
    skos:definition <http://pleiades.stoa.org/places/599612> .

RDFa Pattern 2

Adding some hierarchy allows for more expressive RDFa

<span rel="dc:references">
 <a class="citation"
     typeof="dctype:Location"
     rel="skos:definition"
     href="http://pleiades.stoa.org/places/599612"
      >Ephesis</a>

Which produces the following RDF/Turtle:

@prefix dc: <http://purl.org/dc/terms/> .
 @prefix dc: <http://purl.org/dc/terms/> .
 @prefix skos: <http://www.w3.org/2004/02/skos/core#> .
 <http://example.org/article01>
    dc:references [
        a dc:Location ;
        skos:definition <http://pleiades.stoa.org/places/599612>
    ] ;

The RDF can be read as saying, "There is a document at http://example.org/article01 that references a location that is defined at http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494 ."

RDFa Pattern 2 with Geographic Entity

The Pleiades identifier for Ephesus is http://pleiades.stoa.org/places/599612 . As an RDFa enhanced citation, that's:

<span rel="dc:references">
 <a class="citation"
     typeof="dctype:Location"
     rel="skos:definition"
     href="http://pleiades.stoa.org/places/599612"
      >Ephesus</a>

Which produces the following RDF/Turtle:

@prefix dc: <http://purl.org/dc/terms/> .
@prefix dctypes: <http://purl.org/dc/dcmitype/> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
<http://example.org/article01>
   dc:references [
       a dctypes:Location ;
       skos:definition <http://pleiades.stoa.org/places/599612>
   ] ;