Showing posts with label rdfa. Show all posts
Showing posts with label rdfa. Show all posts

Friday, March 4, 2011

From Typed Links to Annotations in Ancient Geography

I've been participating in the discusions of the Pelagios Project's plans to establish semantic web/linked data conventions for linking geographic information in the ancient world. Nomisma.org is listed as a partner and it's a good group of people who are coming together to think about the issue.

As always, the individuals and projects involved don't want to re-invent the wheel. And, also as always, some new work - even if it's just establishing a domain-specific use for existing standards - is necessary. That last is what I'm thinking about right now.

I mean the title of this post to establish an axis of complexity when it comes to relating a web-based resource to a geographic entity. A "typed link" is basically plain-old HTML with a little bit of RDF-sugar to say that the end-point is a geographic entity. I've already spoken about doing this in earlier posts. Here, let me start with the RDF/Turtle:

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix powder: <http://www.w3.org/2007/05/powder#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

[] a dcterms:Location,geo:SpatialThing;
powder:describedby <http://pleiades.stoa.org/places/423025>;
rdfs:label "Rome" .
This is the RDFa:

<a href="http://pleiades.stoa.org/places/423025" typeof="dcterms:Location geo:SpatialThing" rel="powder:describedby" property="rdfs:label">Rome</a>

Again, that's pretty simple html that adds a little in-place information that the link is to a geographic entity that is defined at a particular URL. There are many tools that can parse that link and do interesting things like show a map. Hence the term I'm using here, "typed link". And I include as an "interesting thing" the now prosaic ability of a user to click on that link when it's rendered by a browser. Human readable and machine actionable. Win, win.

To be clear, with this post I am suggesting to my Pelagios colleagues that we use this or a similarly "light-weight" convention for the simple case of a link to a geographic entity. And yes, I don't mind if you use dcterms:Location, geo:SpatialThing or both. Those are the most widespread RDF Classes for indicating that a resource is a geographic entity.

An "annotation" is something different. The source document is trying to say something about the geographic entity. In this case, consensus seems to be building around the Open Annotation Consortium. That's a good thing on the "use existing work" principle. This time I'll start with a sentence: "Rome was the capital of the Roman Empire". Trivial, I know, but the point is to focus on the markup.

In RDF/Turtle, I want to say something like:

@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix oac: <http://www.openannotation.org/ns/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .

_:oacEx a oac:Annotation ;
oac:hasTarget <http://pleiades.stoa.org/places/423025>;
oac:hasBody “was the capital of the Roman Empire” .

# choose one or both of dcterms:Location or geo:SpatialThing
<http://pleiades.stoa.org/places/423025> a dcterms:Location, geo:SpatialThing ;
rdfs:label "Rome" .


The top level concept is oac:Annotation , a class that encapsulates the relationship between a body (the thing annotating) and a target (the thing annotated). This RDF/Turtle basically says "There's a location 'Rome' that 'was the capital of the Roman empire'. In RDFa, that's:
<?xml version="1.0" encoding="UTF-8" ?>
<html xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
xmlns:oac="http://www.openannotation.org/ns/"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
base="http://example.org/doc-1.html"
>
<head></head>
<body>
<span id="annotation1" typeof="oac:Annotation" about="#annotation1" >
<a rel="oac:hasTarget" href="http://pleiades.stoa.org/places/423025">Rome</a> <span property="oac:hasBody">was the capital of the Roman Empire.</span>
</span>
<span style="display:none" about="http://pleiades.stoa.org/places/423025" typeof="dcterms:Location geo:SpatialThing"></span>
</body>
</html>

This is a first crack at the RDFa so note the 'hidden' span that says the Pleiades URI is a dctermsLocation/geo:SpatialThing. I'm guessing I or somebody else can do better than that.

But the real point of this post is to propose that ladder of complexity. Use a combination of 'powder:describedby' along with dcterms:Location and/or geo:SpatialThing when that will suffice. Open Annotation is for more complex situations. Reactions?

Wednesday, February 23, 2011

Test Bed for (X)HTML Conventions for Scholarly Publication

The main reason I joined the Institute for the Study of the Ancient World at NYU was to be part of initiating a program of digital publication of peer-reviewed scholarship. We haven't announced anything formally and this blog post isn't that announcement. It is the beginning of a nuts-and-bolts conversation about the markup of digital scholarship that is intended to encourage long-term viability, flexible re-use, and easy display (among many other things).

To get right down to business, http://dl.dropbox.com/u/17002562/isaw-papers-preprint.xhtml is the very temporary URL for a preprint version of "Review of Ptolemaic Numismatics, 1996 to 2007" by Catherine Lorber and Andrew Meadows. I'm very grateful to Andy and Cathy for their willingness to be part of this experiment. Their work is largely done. Now it's up to me to make progress on the markup and I'm hoping to do that in a very public way.

But where to begin the conversation? I think the best approach is to admit I'm in the middle of things and just start laying out issues and thoughts. Keep in mind that everything is subject to change...
  • The format for ISAW digital publications is XHTML with RDFa. XHTML (for now 1.1 but moving to XHTML5) is a widely supported standard with excellent tooling that is directly viewable in many contexts. That makes it appropriate for long-term archival storage of born-digital scholarship.
  • Internal reference structures are important.For now this means each <p> element has an @id. div's of class 'section' also have @id attributes. This is in anticipation of using the semantic elements of HTML5.
  • Named entities will be tagged with links to stable resources describing those entities. For geography, Pleiades. For many other entities, Wikipedia. See below for RDFa patterns.
  • Existing ontologies/vocabularies will be used whenever possible. Geographic entities are typed as "dcterms:Location". That sort of thing.
  • Basic constructs for marking up bibliography and footnote-like structures are lacking for HTML-based markup languages. There are lots of semi-complete "best practices" but narrowing these down to a consistent and flexible convention will be an importnat process.

Looking ahead:
  • Multiple formats will be supported. We will distribute this text as "raw" valid xhtml. It will be hosted in a more interactive environment that does slick things like make maps, etc. Epub, pdf... all those are coming. Again, the ease with which a base XHTML representation can be converted to these other formats is one reason to use XHTML.
  • We'll use CC licenses Right now the document is CC-BY-NC-ND. We'll drop the ND eventually, perhaps the NC as well. The preprint is ND as a signal that a better version is coming from us.


A word on RDFa (a standardized way of embedding information in XHTML pages)...

The basic pattern that I'm using to markup named entities is illustrated by the sentence:
In a study of tax receipts from early Ptolemaic <a class="citation"
href="http://pleiades.stoa.org/places/991398"
typeof="dcterms:Location" rel="iana:describedby"
property="rdfs:label">Thebes</a>...


That produces the RDF/Turtle
[ a dcterms:Location ;
rdfs:label "Thebes"@en ;
iana:describedby <http://pleiades.stoa.org/places/991398>].
You can see the turtle for the whole document at http://bit.ly/hJjgcx.

An "English" equivalent of the turtle snippet is 'There is a site in the text with label "Thebes" and a description at http://pleiades.stoa.org/places/991398.'

I like the use of the 'describedby' @rel value here. It's defined in the IANA's register of rel values (http://www.iana.org/assignments/link-relations/link-relations.xml). I take the semantics to be "I'm not saying I'm linking to Thebes itself, only to a description of it." That seems nice and "semantic webby".

There's more to come but I'm getting this out there just to get the ball rolling...

Tuesday, June 1, 2010

References in Digital Publications

Modern scholarship relies on citation. It's efficient in that one work can incorporate the results of another without having to repeat it. It's also a requirement of our modern academic culture that if you use somebody's idea, you give that person credit. There's more to be said on both points but this post is more about mechanics than purpose. (Though see here for a recent discussion of purpose. [I fall into the camp of : if you want credit for your work, make it easy to identify and be generous in giving credit to others. If you don't need credit, that's OK but still give it.]).

Back to references. They come in many forms in print works. In pre-linked media, among the purposes of citation is to give future readers the information they need to physically acquire the referenced work. That is, you take the title of the book or journal, go to the library to find the volume, and then start reading.

It is one of the great glories of the Internet that this physical labor is no longer always necessary. The simple construct '<a href="http://sebastianheath.com/files/HeathS2010-DigitalResearch.pdf">I wrote this</a>' is rendered as 'I wrote this', so that a mere click takes you directly to the article.

That form of link is too simple to support modern scholarly practice. Citations of the form (Heath 2010) give a preliminary indication to the reader of who wrote a referenced work. Full information in footnotes further enriches the reading experience, but at the cost of possibly interrupting the flow of an argument, or depriving the reader of a collected bibliography at the end of a work. Choose your own preference, that's not my point here.

Instead, I am exploring specific patterns of markup that promote access to referenced works while also recording bibliographic metadata in a robust and sustainable fashion. Two needs, two solutions.

Here's some markup: Late Roman pottery is very visible in Aegean landscapes (<a rel="dcterms:references" href="http://hdl.handle.net/10.2972/hesp.76.4.743">Pettegrew 2007</a>).

If we momentarily ignore the question of whether or not Handles records are good stable URIs for bibliographic resources, the semantics of this html are clear: it represents a citation of the 2007 article by David Pettegrew, The Busy Countryside of Late Roman Corinth. (Note: it doesn't reference the html page describing that title)

The use of the term "dcterms:references" in the RDFa rel attribute follows from the Dublin Core's Guidelines for Encoding Bibliographic Citation Information in Dublin Core Metadata. In this context 'references' is a verb, not a plural noun.

That html will render as: "Late Roman pottery is very visible in Aegean landscapes (Pettegrew 2007)." Again, this is all pretty clear.

It's also worth noting that the 'a' element in html is a building-block of our search-engine enabled world. Scholarship should not fight that, but use it. As many have said, "you get this for free."

I do, however, want to pair this reference with bibliographic metadata. Here's where some more RDFa comes in.

'http://hdl.handle.net/10.2972/hesp.76.4.743' is a unique identifier for Pettegrew's article. This suggests the following snippet: <div about="http://hdl.handle.net/10.2972/hesp.76.4.743"><span property="dcterms:bibliographicCitation">Pettegrew, D. (2007). "The Busy Countryside of Late Roman Corinth: Interpreting Ceramic Data Produced by Regional Archaeological Surveys" In <i>Hesperia</i> 76.4: 743-784.</span></div>

These two snippets can be adapted and combined with a little more RDFa scaffolding:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:dcterms="http://purl.org/dc/terms/" >
<body about="http://example.org/example_document">
<h1>My Text</h1>
<p>Late Roman pottery is very visible in Aegean landscapes (<a rel="dcterms:references" href="http://hdl.handle.net/10.2972/hesp.76.4.743">Pettegrew 2007</a></p>
<h1>References</h1>
<p about="http://hdl.handle.net/10.2972/hesp.76.4.743" property="dcterms:bibliographicCitation">Pettegrew, D. (2007). "The Busy Countryside of Late Roman Corinth: Interpreting Ceramic Data Produced by Regional Archaeological Surveys" In <i>Hesperia</i> 76.4: 743-784.</p>
</body>
</html>


Pointing an RDFa extractor at that html gives:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.w3.org/1999/xhtml> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://example.org/example_document>
   dcterms:references <http://hdl.handle.net/10.2972/hesp.76.4.743> .

<http://hdl.handle.net/10.2972/hesp.76.4.743>
   dcterms:bibliographicCitation "Pettegrew, D. (2007). \"The Busy Countryside of Late Roman Corinth: Interpreting Ceramic Data Produced by Regional Archaeological Surveys\" In <i xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:dcterms=\"http://purl.org/dc/terms/\">Hesperia</i> 76.4: 743-784."^^rdf:XMLLiteral .


The shorter version of which is: example.org/example_document references Pettegrew 2007 and even knows something about it. There are lots of third-party tools that can find this information when it is encoded in this way. And I could enrich the 'bibliographicCitation' to include parsable information on author, title, date, etc. That's for another time.

I want to stress that I don't think this determines a particular citation style. Use footnotes if that's preferable. As long as the RDFa produces triples similar to the above, your information is useful. And some degree of run-time transformation is also possible, depending on the granularity of the markup.

Wednesday, May 19, 2010

RDFa Document Metadata: Authors in PLOS One

Brief follow up to yesterday's post.

Here's the HTML that indicates authorship from an example PLOS One article.
<p xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:aml="http://topazproject.org/aml/" class="authors" xpathlocation="noSelect">
<span rel="dc:creator"><span property="foaf:name">Harold C. Sox</span></span><sup><a href="#aff1">1</a></sup>, <span rel="dc:creator"><span property="foaf:name">Mark Helfand</span></span><sup><a href="#aff2">2</a></sup><sup><a href="#cor1" class="fnoteref">*</a></sup>,
<span rel="dc:creator"><span property="foaf:name">Jeremy Grimshaw</span></span><sup><a href="#aff3">3</a></sup>,
<span rel="dc:creator"><span property="foaf:name">Kay Dickersin</span></span><sup><a href="#aff4">4</a></sup>, <span class="capture-id">the <i>PLoS Medicine</i> Editors</span>,
<span rel="dc:creator"><span property="foaf:name">David Tovey</span></span><sup><a href="#aff5">5</a></sup>, <span rel="dc:creator"><span property="foaf:name">J. André Knottnerus</span></span><sup><a href="#aff6">6</a></sup>,
<span rel="dc:creator"><span property="foaf:name">Peter Tugwell</span></span><sup><a href="#aff7">7</a></sup>
</p>
<p xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:aml="http://topazproject.org/aml/" class="affiliations" xpathlocation="noSelect">
<a name="aff1" id="aff1"></a><strong>1</strong> Dartmouth Institute, Dartmouth Medical School, Hanover, New Hampshire, United States of America,
<a name="aff2" id="aff2"></a><strong>2</strong> Portland VA Medical Center and Department of Medicine, Oregon Health &amp; Science University, Portland, Oregon, United States of America,
<a name="aff3" id="aff3"></a><strong>3</strong> Clinical Epidemiology Program, Ottawa Hospital Research Institute, Ottawa, Ontario, Canada,
<a name="aff4" id="aff4"></a><strong>4</strong> Department of Epidemiology, Johns Hopkins Bloomberg School of Public Health, Baltimore, Maryland, United States of America,
<a name="aff5" id="aff5"></a><strong>5</strong> The Cochrane Library, London, United Kingdom, <a name="aff6" id="aff6"></a>
<strong>6</strong> Department of General Practice, University of Maastricht, Maastricht, The Netherlands,
<a name="aff7" id="aff7"></a><strong>7</strong> Departments of Medicine, and Epidemiology and Community Medicine, University of Ottawa, Ottawa, Ontario, Canada
</p>


The basic structure is two 'p' elements, one with a 'class="authors"', the second with 'class="affiliations"'. I am trying to avoid using @class to indicate document structure and metadata, so yesterday I adopted the 'bibo:authorList' convention. But it is useful to see another instance of the nested 'rel="dc:creator"'->'property="foaf:*"' pattern. Is that beginning to look like a trend?

The relationship between author and affiliation is a little broken. The reference from each author to his/her affiliation is actually to an 'a' element with no content. An automatic agent might return an empty string as the affiliation unless it had ad hoc code to pull the text as far as the next '<a>' or '</p>' tag. That's not particularly helpful.

It is important to be clear that this HTML is rendered from XML encoded in the National Institutes of Health's Journal Publishing Tag Set Version 2.0. That's my way of acknowledging that the markup delivered to your browser doesn't bear the full weight of being a well-structured archival version.

Tuesday, May 18, 2010

Towards a metadata header for XHTML5+RDFa1.1 Digital Publications

XHTML5 defines elements such as 'header' and 'summary' that improve the constructs for indicating document metadata. But it is not a finished solution for embedding these concepts in a born-digital scholarly publication. In this post I take an initial crack at a decent way of doing this.

To cut to the chase, here's a sample document:
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:bibo="http://purl.org/ontology/bibo/"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:dctypes="http://purl.org/dc/dcmitype/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:owl="http ://www.w3.org/2002/07/owl#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
about="http://example.org/digpub"
typeof="dctypes:Text"
>


<head>
<title property="dc:title">Guidelines for Using XHTML5 to encode Digital Publications</title>
<base href="http://example.org/digpub"/>
</head>
<body>
<header>
<div rel="bibo:authorList">
<ul rel="rdf:Seq">
<li rel="rdf:li">
By <span rel="dc:creator">
<span rel="foaf:Person">
<span property="foaf:name" rel="owl:sameAs" resource="http://en.wikipedia.org/wiki/Albert_Gallatin">Albert Gallatin</span>
</span>
</span>
</li>

<li rel="rdf:li">
and <span rel="dc:creator">
<span rel="foaf:Person">
<span property="foaf:name" rel="owl:sameAs" resource="http://en.wikipedia.org/wiki/William_Alexander_Hammond">William Alexander Hammond</span>
</span>
</span>
</li>
</ul>
</div>
<summary property="dc:description" xml:lang="en">An abstract in English.</summary>
<summary property="dc:description" xml:lang="fr">Un résumé en Française.</summary>
</header>
<section>
<h1>Section 1</h1>
<p>Your text here.</p>
</section>
</body>
</html>
And here's the turtle representation of the embedded RDF:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.w3.org/1999/xhtml> .
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix dctypes: <http://purl.org/dc/dcmitype/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http ://www.w3.org/2002/07/owl#> .

<http://example.org/digpub>
dc:description "An abstract in English."@en, "Un résumé en Française."@fr ;
dc:title "Guidelines for Using XHTML5 to encode Digital Publications" ;
bibo:authorList [
rdf:Seq _:bnode1
] ;
a dctypes:Text .

_:bnode1
rdf:li [
dc:creator [
foaf:Person [
owl:sameAs <http://en.wikipedia.org/wiki/Albert_Gallatin> ;
foaf:name "Albert Gallatin"
]
]
], [
dc:creator [
foaf:Person [
owl:sameAs <http://en.wikipedia.org/wiki/William_Alexander_Hammond> ;
foaf:name "William Alexander Hammond"
]
]
] .


Even if you don't read turtle that might make some sense.

  • <http://example.org/digpub> after the prefixes means we're defining attributes of a document at that URI.
  • The last line of this indented section just says that the document is 'a dctypes:Text' resource.
  • dc:description "...." means the RDF extractor has found the Dublin Core description (more or less used as 'abstract'). The abstract is available in two languages as indicated by the 'xml:lang' attribute in the document.
  • Same for dc:title. Note that I don't put the title in the 'body' element because html-family encoding schemes want it up in the 'head'. Perhaps the title should be repeated in the 'body/header'. I'm inclined to think that can be done on delivery to a browser when a document is published via a web-server. The archival version should not have such repetition.
  • We then come to a 'bibo:authorList', the contents of which are specified following the line beginning '_:bnode1'. The "Bibliographic Ontology" (here 'bibo') uses this construct for multi-authored works. I'm not sure I like it. Especially since it imposes the extra nesting of rdf:Seq and rdf:li. But if 'bibo' is widely adopted (which it sort of is) then it's not my place to complain. Conform to the standard and move on. The contents of each rdf:li in a bibo:authorList are not well defined in the spec. I looked through the bibo examples, adopted its use of dc:creator and foaf:Person, and then added an owl:sameAs for good measure.
My point in doing all this is to make use of existing standards that allow a corpus of born-digital scholarship to represent metadata in a machine-recognizable fashion that also allows the "text parts" to be human readable. I'm just at the beginning of this project so I welcome suggestions of where I can look for good models.

Tuesday, May 11, 2010

Document and Concept: '#this' and how DBpedia does it

I'm following up on yesterday's post in which I looked at the distinction between 'concept' and 'document' as well as its implications for scholarly practice. To be honest, I'm not sure I've really addressed the scholarly practice aspect of this thread but that's where I'm heading. I'll give a preview at the very end of this post.

Yesterday I asked, "Is there an unambiguous and widely-accepted convention for indicating the concept lying behind a document?". Gabriel Bodard left a comment noting the convention of appending '#this' to indicate that a URI is a reference to the real-world concept rather than the document describing that concept. This is definitely worth considering.

As an aside, Gabby (if I may) is correct that it's hard to look for documentation of the convention since 'this' is understandably ignored by search engines. There's the W3 document 'Cool URIs for the Semantic Web', which does discuss '#this'. I'm not sure if that's the original citation but that title is definitely on the suggested reading list for this topic. As is 'Linked Data Tutorial - NG: Publishing and consuming linked data with RDFa', which I was reminded to look at anew by Sean Gillies.

I have reservations about '#this'. Some of them are aesthetic but that's not a strong leg to stand on. Practically, I don't like having to inspect the internal characters of a URI to figure out its semantics. I also wonder if the convention hasn't really taken off. The 'Linked Data Tutorial' was published after 'Cool URIs' so it may be indicative that it doesn't discuss '#this'. I'm also not sure it's good to devote the '#' mechanism (aka fragment identifiers) to represent metadata rather than maintaining its original purpose of specifying internal portions of a document. But if '#this' comes to rule the world, I'll happily use it.

The 'Linked Data Tutorial' does use DBpedia in its examples so I want to look more closely at how that site handles the 'Document/Concept' distinction. In truth, I didn't find an explicit discussion of the topic on the DBpedia site itself. Maybe I just didn't come across it so I'd welcome a link. I did find the following on the the OpenLink site: "the URI prefixes http://dbpedia.org/resource/..., http/dbpedia.org/page/... and http://dbpedia.org/data/... distinguish between a resource and its HTML or RDF description documents". OpenLink is the creator of Virtuoso, the software that powers DBpedia's SPARQL-endpoint, so I'll take that statement as definitive until I find something more authoritative.

Time to get into details... http://dbpedia.org/resource/Antioch is the URI for the concept 'Antioch: the ancient city'. Clicking on that URI will cause your browser to be redirected to the document http://dbpedia.org/page/Antioch . That's great. We have a clean separation between concept and document.

Looking at the source of 'page/Antioch' (I'll use that shorthand going forward) shows that this document uses RDFa to embed semantic information in human-readable html. We could switch that around. RDFa allows human-readable text to be embedded in machine-parsable data. I'm not sure it matters, which is the main point.

DBpedia even references the RDFa 1.0 DTD: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">. That's very cool and very correct. When RDFa 1.1 is published, I'm counting on DBpedia to be at the forefront of adoption.

The 'resource/Antioch' URL appears three times in the 'page/Antioch' document. The following link elements are in the header:
  • <link rel="foaf:primarytopic" href="http://dbpedia.org/resource/Antioch"/>
  • <link rev="describedby" href="http://dbpedia.org/resource/Antioch"/>

The body start tag looks like this:
  • <body onload="init();" about="http://dbpedia.org/resource/Antioch">
Ignore the @onload, it's the @about that's interesting. It's just RDFa to say that all the parsable information in the document describes the resource http://dbpedia.org/resource/Antioch .

But far more interesting to me is the 'rev="describedby"' in the quoted link element of the document's head. Note that it's 'rev', not 'rel'. The meaning of the whole element is "The current document describes the resource at http://dbpedia.org/resource/Antioch". Yes, that's similar to the @about of the body. I really like the distinctiveness of using @rev . It's easily accessible by javascript or by an RDFa extractor. And I like that I can point to a major player in the Linked Data world as a precedent. That gives it a sense of de facto standard. And a little googling of 'describedby' found instances on the W3 site. It seems it's not quite an officially accepted standard but, again, it's nice to see a major player possibly getting behind 'describedby'.

So it's worth asking if this is a convention that others might be willing to adopt. Any takers or comments? Is @rev too obscure? Other objections?

I also want to briefly point out that the DBPedia 'page/...' documents make some effort to be clear to human readers that they are describing resources. The link at the top of 'page/Antioch' is to 'resource/Antioch'. This could be clearer but is a start.

And as for scholarly practice, I'll just briefly say that this discussion is in part inspired by the observation that Concepts should be permanent, Documents may be temporary. Looking back to the Geonames discussion of yesterday, I will not hold it against geonames.org if it stops responding to the URL http://www.geonames.org/3020251/embrun.html . Maybe html will fall out of use someday. It will be annoying if the string of characters http://sws.geonames.org/3020251/ , ceases to mean anything. Actually, I wish they'd remove the 'sws' cruft from that URL but that's their choice. Scholarship likes permanence and to the extent that the distinction between document and concept is clearly maintained, scholarly practice will be well served.

Tuesday, March 23, 2010

SPARQL Based Navigation of RDFa Encoded Named Entities

This is a quick heads up on a new feature at Nomisma.org, the ANS-hosted project assigning stable URIs to numismatic concepts.

At http://nomisma.org/id/lyttus you'll find a very brief representation of the ancient site of Lyttus in Crete. It links to the relevant Wikipedia article and Barrington Atlas ID so it should be unambiguous which site we mean and it should be easy to find out further information. As a convenience, and to make it easy to put a dot on the map, the page also has latlong info.

This post is about the list of URIs prefaced by the text "The following Nomisma IDs refer to this ID:". If you click on http://nomisma.org/id/igch0151, you'll get a description of a hoard of coins as published in Inventory of Greek Coin Hoards.

Nomisma.org uses RDFa so the markup of the hoard includes the snippet: <span rel="nm:mint" resource="lyttus">Lyttus: 1 dr.</span> . You can click on "Show Markup in Page" to see this.

All the descriptions of numismatic concepts are collected in a single RDFa file at http://nomisma.org/nomisma.org.xml and as RDF-XML at http://nomisma.org/nomisma.org.rdf. That one snippet from igch0151 will produce the triple:
<http://nomisma.org/id/ich0151>
 <http://nomisma.org/id/mint>
 <http://nomisma.org/id/lyttus>

So... visiting http://nomisma.org/id/lyttus queries http://nomisma.org.rdf with a SPARQL statement of the form ' SELECT ?id WHERE { ?id ?refersto <http://nomisma.org/id/lyttus> }'. This just binds "?id" to a list of the ids that refer to Lyttus.

Bottom line: Simple markup achieves meaningful results using pre-existing standards. I wrote none of the tools to make this work. It will be fun when I get around to turning that list of IDs into a map, which will be simple using the Google Maps API. Then we will have a geographic front-end to "SPARQL-based Navigation of RDFa Encoded Named Entities".

Note: all of the RDFa patterns are in the process of being defined and the entries are in the process of being markedup. I.e., this is all in alpha stage.

Friday, February 26, 2010

Coming to terms with HTML 5

I haven't heard much talk among digital humanists about HTML 5. If I've missed something please let me know.

I will admit that for a long time I sort of ignored it. I was interested in xhtml 2 but that's dead. And when the html 5 discussions began, xhtml seemed like a barely tolerated intruder. That's clearly less so currently. Then there was the dismissive attitude of the "5" folk towards RDFa. Everybody seems to be talking now and that's good.

So it looks like there will be an XHTML5 that directly supports RDFa. I'm assuming that means in the DOM as it's made available to Javascript. (Somebody tell if I'm wrong about that).

With this in mind, I spent the day catching up with developments in the html 5 community. Sometimes focusing on integration with RDFa but also just catching up.

This series of articles by "boblet" was well-written and useful. On the RDFa front, I read Mark Birbeck's discussion about tokenizing RDFa. Likewise interesting. And see the RDFa section of the Microformats.org HTML5 page.

I like that html 5 supports structures along the lines of:
<html>
<head>
<title></title>
</head>
<body>
<section>
<summary></summary>
</section>

<section>
<h1>Introduction</h1>
<p></p>
...
</section>
<section>
<h1>Next section</h1>
<p></p>
...
</section>
</body>
</html>
Add in more xhtml 1.0 bits and you can really think about doing a nice job of publishing prose works digitally with the html5 vocabulary. And don't forget the '<article>' element. That looks interesting as well.

Not all is perfect. I've always been bummed that the title element goes in the head of an (x)html document. That means that if you want it to show up in the document part of a browser window, you have to repeat it. There's some silliness there. Why can't a title element go anywhere? And would it it really be a problem if a document had more than one title in it? I can think of use-cases where that works: more than one article in a single html file, or a list of objects that have titles.

And there's still no preferred way of doing footnotes. The section in the spec 4.6.26 is sort of a punt. The boblet articles suggest <aside> for footnotes but that isn't encouraged in the spec. I see that there's a "note" value for the rel attribute on the WHATWG RelExtensions page. That list is an official part of the html 5 spec (see "Other Link Types"). But the spec is totally vague on how a proposed rel moves to actual approval.

And anybody using xhtml is still going to have lots of decisions about what goes in class attributes and how to specify lots of basic things like 'author'. That smacks of being proprietary. How much can Dublin Core help with this?

So... it was a day of mostly reading. I added a little bit of xhtml 5 to the git repository under an xhtml5 branch but only just a hint of what I should do to really "commit" to such a big change.

Tuesday, February 23, 2010

OpenCyc + Wiki/DB-Pedia and Ancient World References

This is another post in the Ancient World RDFa series.

I'm writing now because I have two questions in mind, one fairly general and one very specific:
  • Is there a pre-existing ontology that I can use to identify concepts found in Ancient World scholarship?
  • How can I indicate the office of "strategos" that was held by the sophist Polemon.
The topic comes up because I'm faced with the sentence fragment:
Polemon also appears as strategos on coins of Hadrian...
Again, how to mark the text "strategos" so that it is identified as the ancient office. Here's what I have so far:
<span
id="id8296"
about="#id8296"
typeof="skos:Concept opencyc:PublicOffice"
rel="owl:sameAs"
resource="[dbpedia:Strategos]"
property="rdfs:label"
>strategos</span>
That give the following RDF/Turtle
<http://example.org/ajn2006-smyrna.html#id8296>
a opencyc:PublicOffice, skos:Concept ;
owl:sameAs dbpedia:Strategos ;
rdfs:label "strategos"@en .
In short, this says that there's an instance of a public office and that office is "strategos".

The "opencyc" namespace maps to "http://sw.opencyc.org/". You can read about OpenCyc at http://www.opencyc.org, where you'll be told that OpenCyc is an "ontology containing hundreds of thousands of terms, along with millions of assertions relating the terms to each other, forming an ontology whose domain is all of human consensus reality." Even accounting for "commericial-speak", this could be useful. And yes, it's based on a commercial product, but CC-Licensed versions of the whole thing can be downloaded from http://www.opencyc.org/downloads.

The landing place for PublicOffice is http://sw.opencyc.org/2009/04/07/concept/en/PublicOffice. "Mayor" and "Ambassador" are example instances of PublicOffice so I'm comfortable using it as the type for Strategos. But "Strategos" iteself is not in OpenCyc. I think this will be a common situation: knowledge bases intended for the modern world will have many useful analogs for concepts that appear in Ancient World scholarhip, but the specific vocabulary will be missing.

OpenCyc has entries forYou can replace many narrowly scoped namespaces with these and other concepts that appear in OpenCyc.

But again, no "Strategos". This is where Wikpedia (via DBPedia) comes in. Here's the Wikipedia article. I map that into the Semantic Web via DBPedia.

So here's a basic principle: OpenCyc is the default ontology, DBPedia is the default vocabulary. I think that plays to the strengths of each resource.

Neither is complete for the Ancient World. That's probably more of a problem for the use of OpenCyc. DBPedia doesn't have a page for the ceramic type "Eastern Sigillata A". If I write one for Wikipedia, that will eventually migrate to DBPedia. OpenCyc doesn't have an easy route for community-based editing. Will the concepts "Excavation Unit" or "Survey Collection Unit" be necessary? Probably. That means coming up with or finding an ontology for those.

Thursday, February 4, 2010

Ancient World Digital Publishing Test Suite

This post is just a brief notice that I have begun a test suite of xhtml+rdfa and related documents to facilitate my work on digital publication for ancient world scholarship. It's very much "pre-release" at this point so I'm putting the suite out there for the sake of sharing, not because it's useful in its current state.

Right now, there are a few files in a git repository at http://github.com/sfsheath/awdp-test/. To download, try http://github.com/sfsheath/awdp-test/archives/master.

As the files become more useful, I'll talk more about what I'm trying to achieve with this project.

Tuesday, January 26, 2010

RDFa Patterns for Ancient World References

I am continuing to experiment with semantic links within digital publications relevant to the Ancient World. Here's a snippet from the same article I drew from in the last post.
In 124, Polemon had spoken before Hadrian and persuaded him to make a gift of money and grant a series of honors to Smyrna, not least of which was a second temple to the imperial cult (IvS 697; Burrell 2004: 42-48).
The "things" I want to identify are:
  • The year 124 as an event.
  • The sophist Polemon
  • The emperor Hadrian
  • The imperial cult
  • And the two citations
And I want to do this in a standards-based way that is automatically recognizable by third-parties (or at least their software agents).

As before, I'm using RDFa. In a future post, I'll explain this choice and talk about what RDFa and RDF are, but for now I'm diving right in.

The relevant namespaces that I'm using are:
  • xmlns:dbpedia="http://dbpedia.org/resource/"
  • xmlns:cito="http://purl.org/net/cito/"
  • xmlns:ev="http://purl.org/rss/1.0/modules/event/"
  • xmlns:ex="http://example.org/"
  • xmlns:foaf="http://xmlns.com/foaf/0.1/"
  • xmlns:frbr="http://purl.org/vocab/frbr/core#"
  • xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
  • xmlns:owl="http ://www.w3.org/2002/07/owl#"
  • xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
  • xmlns:skos="http://www.w3.org/2008/05/skos#"
  • xmlns:xsd="http://www.w3.org/2001/XMLSchema"
All the markup that follows is experimental and comments are welcome, of course.

Polemon
The reference to Polemon now looks like:
<span id="id2209"
about="#id2209"
typeof="skos:Concept foaf:Person"
resource="[dbpedia:Polemon_of_Laodicea]"
rel="owl:sameAs cite"
property="rdfs:label">Polemon</span>


With the '<head>' of the document including '<base href="http://example.org/ajn2006-smyrna.html"/>', that RDFa gives the following RDF/turtle:

<http://example.org/ajn2006-smyrna.html#id2209>
owl:sameAs dbpedia:Polemon_of_Laodicea ;
a skos:Concept, foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> dbpedia:Polemon_of_Laodicea ;
rdfs:label "Polemon"@en .
Some observations:
The pairing of 'id' and 'about' attributes means that I can identify a span of text and then say things about it.

I then give that span a type. Here I say that it's a skos:Concept and a foaf:Person. Which concept and which person? http://dbpedia.org/resource/Polemon_of_Laodicea. 'skos:Concept' will be used on all named-entities, and their nature will be further qualified when it's useful.

Why "owl:sameAs'. Here I follow the usage of dbpedia.org. If you look at the Polemon page, you'll see the same construct used to make the link to freebase. 'owl:sameAs' also underlies sameas.org (see the n3 for Hadrian).

The metaphor here is that I am instantiating Poleman as a concept and person present in the text. That should be recognizable and actionable. There is some redundancy in how I go about doing it, but that is in the spirit of convenience for future processors of this data.

"In 124"
This looks like:
<span id="id3724"
about="#id3724"
typeof="frbr:Event"
rel="owl:sameAs"
resource="dbpedia:124"
property="ev:startdate"
datatype="xsd:year"
content="124">In 124</span>
Same basic process. I isolate some text as individually addressable. I say what is, in this case a FRBR Event. Here I also embed a machine-readable property, the start date, into the document , but retain the inline text as the label.

But I am probably on less-firm ground here. I use FRBR because it's an LOC approved standard. I annotate the event with an RSS Event property and that's a little weak. And it might seem odd to equate the event with the dbpedia representation of the year 124. If you follow through to the wikipedia version, that does refer to Hadrian's trip east, which is the setting for Polemon's speech. In the case of a better known event, I think I'd prefer to link to a representation of that, for example http://dbpedia.org/page/Sack_of_Rome_(455). The 'owl:sameAs' on that page will eventually redirect you to the right Wiki page.

Here's the RDF/Turtle produced by the above RDFa:
<http://example.org/ajn2006-smyrna.html#id3724>
owl:sameAs <dbpedia:124> ;
ev:startdate "124"^^xsd:year ;
a frbr:Event, skos:Concept .
As above, the goal is for this to be usable in a number of contexts.

References
There are two inline references at the end of the sentence. The first is to a primary source, an inscription at Smyrna as published in Petzl, G. (1982). Die Inschriften von Smyrna. Bonn: Habelt. The second is to Barbara Burrell's Burrell, B. (2004). Neokoroi: Greek cities and Roman emperors. Cincinnati classical studies, new ser., v. 9. Leiden: Brill.

Here's the RDFa for the second:
<span id="id4616"
about="#id4616"
typeof="ex:Citation"
rel="cito:citesAsAuthority cite"
resource="http://www.worldcat.org/oclc/53013513"
property="rdfs:label">Burrell 2004: 42-48</span>
This is similar markup as previously, except I'm not instantiating it as a 'skos:Concept'. I am using the CITO ontology to indicate the relationship between the works, but note that I'm currently making up the type 'ex:Citation'. Perhaps I could use 'cito:Document' but that doesn't seem quite right. I really want to mark this span of text as being a citation but haven't found just the right RDF vocabulary. I looked at BIBO but, like CITO, it doesn't have the exact class I want. BIBO is linked with Zotero so I'd like to use it. For now, CITO has a more detailed set of relationships between citing and cited documents so I'm going with that. Worldcat also isn't great because there's confusion about the 'terms of use' but it will do for this experimental phase.

Here's the RDF/Turtle:
<http://example.org/ajn2006-smyrna.html#id4616>
cito:citesAsAuthority <http://www.worldcat.org/oclc/53013513> ;
a ex:Citation ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://www.worldcat.org/oclc/53013513> ;
rdfs:label "Burrell 2004: 42-48"@en .

The RDFa for the epigraphic reference looks like:
<span id="id9773"
about="#id9773"
typeof="ex:Citation"
rel="cito:citesAsAuthority ex:citesAsPrimarySource"
resource="http://www.worldcat.org/oclc/8935414"
property="rdfs:label"><i>IvS</i> 697</span>
The main difference here is that I'm also making up the 'ex:citesAsPrimarySource' value for the rel attribute. The concept of "Primary Source" and references thereto is important for the Humanities and we need a way of indicating its usage.

It's also important that I'm referring to the publication of the inscription, not the inscription itself. When a digital surrogate becomes available, I can point to that. In the meantime, a way of standardizing references to parts of a work would be useful. But I don't think you can just tag on a fragment identifier, as in http://www.worldcat.org/oclc/8935414#no.%20697, since the implication there is that such an ID actually exists. And it might be rude to put the same after a '?'. Something to ponder...


Instead of continuing on with each named entitiy, here's the whole sentence with RDFa visible:
<span id="id3724" about="#id3724" typeof="skos:Concept frbr:Event" rel="owl:sameAs" resource="dbpedia:124" property="ev:startdate" datatype="xsd:year" content="124">In 124</span>, <span id="id2209" about="#id2209" typeof="skos:Concept foaf:Person" resource="[dbpedia:Polemon_of_Laodicea]" rel="owl:sameAs cite" property="rdfs:label">Polemon</span> had spoken before <span id="id5130" about="#id5130" typeof="skos:Concept foaf:Person" rel="owl:sameAs cite" resource="[dbpedia:Hadrian]" property="rdfs:label">Hadrian</span> and persuaded him to make a gift of money and grant a series of honors to <span id="id39156" about="#id39156" typeof="skos:Concept geo:SpatialThing" rel="owl:sameAs cite" resource="http://pleiades.stoa.org/places/550771" property="rdfs:label">Smyrna</span>, not least of which was a second temple to the <span id="id4168" about="#4168" typeof="skos:Concept dbpedia:Religion" rel="owl:sameAs cite" resource="dbpedia:Imperial_cult_(ancient_Rome)]" property="rdfs:label">imperial cult</span> (<span id="id9773" about="#id9773" typeof="ex:Citation" rel="cito:citesAsAuthority ex:citesAsPrimarySource" resource="http://www.worldcat.org/oclc/8935414" property="rdfs:label"><i>IvS</i> 697</span>; <span id="id4616" about="#id4616" typeof="ex:Citation" rel="cito:citesAsAuthority cite" resource="http://www.worldcat.org/oclc/53013513" property="rdfs:label">Burrell 2004: 42-48</span>).
And here's the RDF/Turtle:

<http://example.org/ajn2006-smyrna.html#id3724>
owl:sameAs <dbpedia:124> ;
ev:startdate "124"^^xsd:year ;
a frbr:Event, skos:Concept .

<http://example.org/ajn2006-smyrna.html#id2209>
owl:sameAs dbpedia:Polemon_of_Laodicea ;
a skos:Concept, foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> dbpedia:Polemon_of_Laodicea ;
rdfs:label "Polemon"@en .

<http://example.org/ajn2006-smyrna.html#id5130>
owl:sameAs dbpedia:Hadrian ;
a skos:Concept, foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> dbpedia:Hadrian ;
rdfs:label "Hadrian"@en .

<http://example.org/ajn2006-smyrna.html#id39156>
owl:sameAs <http://pleiades.stoa.org/places/550771> ;
a geo:SpatialThing, skos:Concept ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://pleiades.stoa.org/places/550771> ;
rdfs:label "Smyrna"@en .

<http://example.org/ajn2006-smyrna.html#4168>
owl:sameAs <dbpedia:Imperial_cult_(ancient_Rome)]> ;
a dbpedia:Religion, skos:Concept ;
<http://www.w3.org/1999/xhtml/vocab#cite> <dbpedia:Imperial_cult_(ancient_Rome)]> ;
rdfs:label "imperial cult"@en .

<http://example.org/ajn2006-smyrna.html#id9773>
ex:citesAsPrimarySource <http://www.worldcat.org/oclc/8935414> ;
cito:citesAsAuthority <http://www.worldcat.org/oclc/8935414> ;
a ex:Citation ;
rdfs:label "<i>IvS</i> 697"^^rdf:XMLLiteral .

<http://example.org/ajn2006-smyrna.html#id4616>
cito:citesAsAuthority <http://www.worldcat.org/oclc/53013513> ;
a ex:Citation ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://www.worldcat.org/oclc/53013513> ;
rdfs:label "Burrell 2004: 42-48"@en .


Some of these constructs deserve more comment but this post is getting long. The only thing to add is that fairly soon I will publish a javascript toolset that starts making use of these patterns.

Friday, January 22, 2010

Referring to People and Places

Another title for this post could be "How can I achieve something by doing nothing?"

Back in 2006 I published the article 'A Box Mirror Made from Two Antinous Medallions of Smyrna.' American Journal of Numismatics Second Series 18 (2006), 63-74. It contains the following sentences:
The reverse type on this piece is one of four images — showing either the female panther on this piece, a bull, a sheep, or a ship’s prow — that appear on a series of medallions struck at Smyrna in honor of Antinous and naming Polemon as issuer. These two individuals are both historical figures and their biographical information provides the framework for dating the issue. Antinous was the companion of the emperor Hadrian who drowned in the Nile in late AD 130.
I am currently thinking about how to represent links from the "named entities" embedded within texts such as this to well-known identifiers for those concepts. That's what I want to achieve. The "doing nothing" part of my alternate title is an off-hand way of indicating that I want to make as few choices as possible. To again rephrase, the bottom line is that I'm hoping to use pre-existing standards.

BTW, pictures of the mirror are at http://numismatics.org/collection/2005.19.1.

In terms of well-known identifiers, here's the "low hanging fruit" that I see in the sample text:We could get into dates and abstract concepts such as "emperor" but I'll save that for later.

You'll note that I'm using the English Wikipedia for most of my identifiers and Pleiades for Smyrna. There is a Wikipedia article for that ancient site, but I do want to situate myself within the discipline of ancient geography. I think using the Pleiades reference meets that goal. On a slightly different topic, I was tempted to use dbpedia references – as in http://dbpedia.org/resource/Polemon_of_Laodicea – but think it's probably better practice to give the Wiki URI and let harvestors, etc. derive the dbpedia URI if they want to. Is it a disadvantage to tie the URI to a particular language?

Moving along... how to embed these references in the text? That does require an initial choice: RDFa embedded in xhtml. Here's a possible snippet that links an implicit identity with the relevant unambiguous identifier:
<span id="id7474" about="#id7474" typeof="foaf:Person" rel="owl:sameAs" resource="http://dbpedia.org/page/Polemon_of_Laodicea">Polemon</span>
With this markup I am trying to say, "the characters 'Polemon' refer to a person and that person is the same as the person represented by the URI 'http://dbpedia.org/page/Polemon_of_Laodicea'."

Why do I think I've achieved that? If I point an RDF parser – I use rapper – at this text, I get the following triples:
<http:/example.org/AJN2006-Heath.html#id7474>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://xmlns.com/foaf/0.1/Person> .

<http:/example.org/AJN2006-Heath.html#id7474>
<http://www.w3.org/1999/xhtml/vocab#cite>
<http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .

<http:/example.org/AJN2006-Heath.html#id7474>
<http ://www.w3.org/2002/07/owl#sameAs>
<http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .


I think this represents progress towards using a well-known standard that allows a third-party tool to extract the semantic meaning in my text. Expanding the markup I'm using, here's the whole sample text with embedded RDF:
The reverse type on this piece is one of four images — showing either the female panther on this piece, a bull, a sheep, or a ship’s prow — that appear on a series of medallions struck at <span id="id128979" about="#id128979" typeof="geonames:Feature nm:mint" rel="skos:sameAs cite" resource="http://pleiades.stoa.org/places/550771">Smyrna</span> in honor of <span id="id49178" about="#id49178" typeof="foaf:Person" rel="skos:sameAs cite" resource="http://en.wikipedia.org/wiki/Antinous">Antinous</span> and naming <span id="id7474" about="#id7474" typeof="foaf:Person" rel="cite skos:sameAs" resource="http://en.wikipedia.org/wiki/Polemon_of_Laodicea">Polemon</span> as issuer. These two individuals are both historical figures and their biographical information provides the framework for dating the issue. Antinous was the companion of the emperor <span id="id876873" about="#id876873" typeof="foaf:Person" rel="skos:sameAs cite" resource="http://en.wikipedia.org/en/Hadrian">Hadrian</span> who drowned in the <span id="id5726" about="#id5726" typeof="geoname:Feature" rel="skos:sameAs cite" resource="http://en.wikipedia.org/wiki/Nile">Nile</span> in late AD 130.


Which produces the following RDF:
<http:/example.org/AJN2006-Heath.html#id128979>
a nm:mint, geonames:Feature ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://pleiades.stoa.org/places/550771> ;
skos:sameAs <http://pleiades.stoa.org/places/550771> .

<http:/example.org/AJN2006-Heath.html#id49178>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Antinous> ;
skos:sameAs <http://en.wikipedia.org/wiki/Antinous> .

<http:/example.org/AJN2006-Heath.html#id7474>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Polemon_of_Laodicea> ;
skos:sameAs <http://en.wikipedia.org/wiki/Polemon_of_Laodicea> .

<http:/example.org/AJN2006-Heath.html#id876873>
a foaf:Person ;
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/en/Hadrian> ;
skos:sameAs <http://en.wikipedia.org/en/Hadrian> .

<http:/example.org/AJN2006-Heath.html#id5726>
<http://www.w3.org/1999/xhtml/vocab#cite> <http://en.wikipedia.org/wiki/Nile> ;
skos:sameAs <http://en.wikipedia.org/wiki/Nile> .


By way of a few observations, note that I type "Smyrna" – here id128979 - as a mint using the URI http://nomisma.org/id/mint, which is a reference to an incipient numismatic vocabulary. I don't type Hadrian as a Roman emperor. 'Smyrna' can be used in many ways so I want to be clear that I'm referring to it as a mint (in the broad numismatic sense). Hadrian's role as emperor is explicitly stated in the Wiki article and in its dbpedia equivalent. I don't think I need to repeat that here.

I'm also adding 'cite' to the rel attributes. 'cite' is one of the W3 sponsored relationships and I like how generic it is but also want to use the more specific 'skos:sameAs'.

This post is not a finished product and I don't mean to suggest that the above is the best way to achieve my goal. I welcome comments along the lines of "You should be using pre-existing standard http://...." or "What you suggest is sort of (barely?) OK but here's an improvement...". Is there a better RDFa pattern?