Citations with added RDFa: Difference between revisions

From The Digital Classicist Wiki
Jump to navigation Jump to search
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
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.
The page [[Citation_in_digital_scholarship]] describes a convention for making citations that relies on the 'class' and 'title' attributes when implemented in (x)html. This page further elaborates that convention by describing how to add 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.
Sample sentences:  
*Ephesus demonstrates the potential complexity of ancient Mediterranean urban centers.
*The first chapter of Herodotus is an early example of Greek historical writing.
*Herodotus (1.78) gives a brief characterization of the city of Babylon
* Millar (2001) stresses the polyglot nature of the Roman near east.


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.
With citation markup added:  
*<a class="citation" href="http://pleiades.stoa.org/places/599612">Ephesus</a> ...
* The <a class="citation" href="http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1" title="Herodotus Histories Book 1 Chapter 1">first chapter of Herodotus</a>...
* <a class="citation" href="http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78">Herodotus (1.78)</a> gives a brief ...
* <a class="citation" href="http://www.worldcat.org/title/roman-near-east-31-bc-ad-337/oclc/27431147">Millar (2001)</a> ...


===RDFa Pattern 1===
==Discussion==
The 'Citation with added RDFa' convention allows three basic types of information to be added to a citation:
* The nature of the entity being cited (@typeof). Dublin Core is the default typology. Authors can add their own typology as needed.
* The reason the entity is being cited (@rel).
* The relationship of the web-based resource being cited to the underlying concept being invoked (@rel).
 
The representation of these three types of information can be explored by way of example using the sample sentences defined above.
* <a class="citation" rel="dc:references" href="http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78">Herodotus (1.78)</a> gives a brief ...
* <a class="citation" rel="dc:references skos:definition" href="http://pleiades.stoa.org/places/599612">Ephesus</a> ...
 
In the second RDFa example, the use of 'skos:definition' makes clear that the resource at 'http://pleiades.stoa.org/places/599612' is not Ephesus itself, but a definition thereof.
 
==RDFa Pattern 1==
Focusing just on the 'a' element, the following RDFa provides additional levels of detail:
Focusing just on the 'a' element, the following RDFa provides additional levels of detail:
   <a class="citation"
   <nowiki><a class="citation"
      title="Homer Iliad 2.494"
    typeof="dc:Text"
      rel="dc:references"
    rel="dc:references"
      href="http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494"
    href="http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78">Herodotus (1.78)</a></nowiki>
      >Il. 2.494-759</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:
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:
  @prefix dc: <http://purl.org/dc/terms/> .
  <nowiki><http://example.org/article01>
  <http://example.org/article01>
[]
     dc:references <http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494> ;
    a dc:Text ;
===RDFa Pattern 2===
    dc:references <hhttp://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78> .</nowiki>
 
==RDFa Pattern 2==
If it is clear that an internet-based resource (aka a "web page") provides a description or definition of a cited entity, use:
  <a typeof="dctype:Location"
      rel="dc:references skos:definition"
      href="http://pleiades.stoa.org/places/599612"
      >Ephesus</a>
This produces:
  <nowiki><http://example.org/article01>
[]
    a dc:Location ;
     dc:references <http://pleiades.stoa.org/places/599612>;
    skos:definition <http://pleiades.stoa.org/places/599612> .</nowiki>
 
==RDFa Pattern 3==
Adding some hierarchy allows for more expressive RDFa
Adding some hierarchy allows for more expressive RDFa
  &lt;span rel="dc:references">
  <nowiki>&lt;span class="citation" rel="dc:references">
   <a class="citation"
   <a typeof="dc:Location"
      title="Homer Iliad 2.494"
      typeof="dctype:Text"
       rel="skos:definition"
       rel="skos:definition"
       href="http://perseus.uchicago.edu/perseus-cgi/citequery3.pl?dbname=GreekTexts&query=Hom.%20Il.%202.494"
       href="http://pleiades.stoa.org/places/599612"
       >Il. 2.494-759</a>
       >Ephesus</a>
  </span>
  </span></nowiki>


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 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&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://pleiades.stoa.org/places/599612 ." This is the preferred markup of conformant citations that rely on RDFa to add further information.


[[category:citation_in_digital_scholarship]]
[[category:citation_in_digital_scholarship]]

Revision as of 22:34, 4 October 2010

The page Citation_in_digital_scholarship describes a convention for making citations that relies on the 'class' and 'title' attributes when implemented in (x)html. This page further elaborates that convention by describing how to add RDFa to conformant citations.

Sample sentences:

  • Ephesus demonstrates the potential complexity of ancient Mediterranean urban centers.
  • The first chapter of Herodotus is an early example of Greek historical writing.
  • Herodotus (1.78) gives a brief characterization of the city of Babylon
  • Millar (2001) stresses the polyglot nature of the Roman near east.

With citation markup added:

Discussion

The 'Citation with added RDFa' convention allows three basic types of information to be added to a citation:

  • The nature of the entity being cited (@typeof). Dublin Core is the default typology. Authors can add their own typology as needed.
  • The reason the entity is being cited (@rel).
  • The relationship of the web-based resource being cited to the underlying concept being invoked (@rel).

The representation of these three types of information can be explored by way of example using the sample sentences defined above.

In the second RDFa example, the use of 'skos:definition' makes clear that the resource at 'http://pleiades.stoa.org/places/599612' is not Ephesus itself, but a definition thereof.

RDFa Pattern 1

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

 <a class="citation"
    typeof="dc:Text"
    rel="dc:references"
    href="http://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78">Herodotus (1.78)</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:Text ;
    dc:references <hhttp://www.perseus.tufts.edu/hopper/text?doc=Perseus:text:1999.01.0125:book%3D1:chapter%3D78> .

RDFa Pattern 2

If it is clear that an internet-based resource (aka a "web page") provides a description or definition of a cited entity, use:

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

This produces:

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

RDFa Pattern 3

Adding some hierarchy allows for more expressive RDFa

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

Which produces the following RDF/Turtle:

 @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://pleiades.stoa.org/places/599612 ." This is the preferred markup of conformant citations that rely on RDFa to add further information.