worldcat identities

5 views
Skip to first unread message

Bruce D'Arcus

unread,
Sep 25, 2007, 3:06:28 PM9/25/07
to Bibliographic Ontology Specification Group
Hmm .. just realized the new Worldcat identities service does something cool:

curl http://orlabs.oclc.org/Identities/find?fullName=berners-lee%2C+tim+
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="NameFinderResults.xsl"?>
<nameAuthorities query="berners-lee, tim" maxList="10" hitCount="53">
<match type="ExactMatches" usage="6314" score="1951">
<establishedForm>Berners-Lee, Tim.</establishedForm>
<uri>http://orlabs.oclc.org/Identities/key/lccn-no99-10609</uri>
<lccn>no99-10609</lccn>
<citation>Weaving the Web : the original design and ultimate
destiny of the World Wide Web by its inventor</citation>
<subjectHeading>Computer programmers--Great Britain</subjectHeading>
<pubDates>1993-2006</pubDates>
<nameType>personal</nameType>
</match>
<match type="ExactMatches" usage="18" score="1951">
<establishedForm>Berners-Lee, Tim 1955-</establishedForm>
<uri>http://orlabs.oclc.org/Identities/key/viaf-DNB|121649091</uri>
<citation>De wereld van het World Wide Web : het oorspronkelijke
ontwerp en de uiteindelijke bestemming van het World Wide Web,
beschreven door zijn uitvinder</citation>
<dates>1955-</dates>
<pubDates>2000</pubDates>
<nameType>personal</nameType>
</match>
...

Bruce

Frederick Giasson

unread,
Sep 26, 2007, 8:22:35 AM9/26/07
to bibliographic-ontolog...@googlegroups.com
Hi Bruce!

Wow! really nice find! :)


This has to keep in mind. This is a wonderful source of information
about authors of many things. In fact, I will look to create linking
(sameAs) from worldcat to the Music Ontology (musicbrainz, etc)


This is one thing among many others!


Take care


Fred

ed.su...@gmail.com

unread,
Sep 26, 2007, 8:30:11 AM9/26/07
to Bibliographic Ontology Specification Group
Nice find Bruce! It's nice that the URI references are also
retrievable in the same way:

curl http://orlabs.oclc.org/Identities/key/lccn-no99-10609 | xmllint
--format - | less

//Ed

Bruce D'Arcus

unread,
Sep 26, 2007, 9:15:41 AM9/26/07
to bibliographic-ontolog...@googlegroups.com
e...@pobox.com wrote:
> Nice find Bruce! It's nice that the URI references are also
> retrievable in the same way:

Cool.

It's struck me that Ian's worry about blank nodes is partly a function
of note being able to easily assign pre-exising URIs to strings. Perhaps
services like this can help?

Bruce

Bruce D'Arcus

unread,
Sep 26, 2007, 9:55:57 AM9/26/07
to bibliographic-ontolog...@googlegroups.com
e...@pobox.com wrote:

I wonder if we get them to set up the output for GRDDL?

I wrote this little XSLT that converts the output to a simple FOAF file,
complete with URI:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:srw="http://www.loc.gov/zing/srw/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
version="1.0">

<xsl:template match="/srw:searchRetrieveResponse">
<rdf:RDF>
<xsl:apply-templates select="srw:records"/>
</rdf:RDF>
</xsl:template>

<xsl:template match="srw:records">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="srw:record">
<xsl:apply-templates select="srw:recordData"/>
</xsl:template>

<xsl:template match="srw:recordData">
<rdf:Description
rdf:about="http://orlabs.oclc.org/Identities/key/{*/pnkey}">
<xsl:apply-templates select="Identity"/>
</rdf:Description>
</xsl:template>

<xsl:template match="Identity">
<xsl:variable name="type">
<xsl:choose>
<xsl:when test="@type='personal'">
<xsl:text>http://xmlns.com/foaf/0.1/Person</xsl:text>
</xsl:when>
<xsl:when test="@type='corporate'">
<xsl:text>http://xmlns.com/foaf/0.1/Organization</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>http://xmlns.com/foaf/0.1/Agent</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<rdf:type rdf:resource="{$type}"/>
<xsl:apply-templates select="authorityInfo"/>
</xsl:template>

<xsl:template match="authorityInfo">
<xsl:apply-templates select="standardForm"/>
</xsl:template>

<xsl:template match="standardForm">
<foaf:name>
<xsl:value-of select="suba"/>
</foaf:name>
</xsl:template>

</xsl:stylesheet>

Output:

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:srw="http://www.loc.gov/zing/srw/"
xmlns:foaf="http://xmlns.com/foaf/0.1/">

<rdf:Description
rdf:about="http://orlabs.oclc.org/Identities/key/lccn-no99-10609">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<foaf:name>Berners-Lee, Tim</foaf:name>
</rdf:Description>

</rdf:RDF>

Reminds me, we really ought to have a separate property (from foaf:name)
for the sort form of the name.

Bruce

Bruce D'Arcus

unread,
Sep 26, 2007, 10:20:04 AM9/26/07
to bibliographic-ontolog...@googlegroups.com
Hah, rough two:

<xsl:apply-templates select="by"/>
</xsl:template>

<xsl:template match="authorityInfo">
<xsl:apply-templates select="standardForm"/>
</xsl:template>

<xsl:template match="standardForm">
<foaf:name>
<xsl:value-of select="suba"/>
</foaf:name>
</xsl:template>

<xsl:template match="by">
<xsl:apply-templates select="citation">
<xsl:with-param name="ctype" select="'By'"/>
</xsl:apply-templates>
</xsl:template>

<xsl:template match="citation">
<xsl:param name="ctype"/>
<xsl:variable name="oclc-stripped" select="substring-after(oclcnum,
'ocn')"/>
<xsl:choose>
<xsl:when test="$ctype='By'">
<foaf:made
rdf:resource="http://worldcat.org/oclc/{$oclc-stripped}"/>
</xsl:when>
</xsl:choose>

</xsl:template>

</xsl:stylesheet>


Outputs:

<rdf:Description
rdf:about="http://orlabs.oclc.org/Identities/key/lccn-no99-10609">
<rdf:type rdf:resource="http://xmlns.com/foaf/0.1/Person"/>
<foaf:name>Berners-Lee, Tim</foaf:name>

<foaf:made rdf:resource="http://worldcat.org/oclc/041238513"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/048753874"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/040278766"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/044933478"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/045065386"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/044281610"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/075964549"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/044721973"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/036040597"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/040938943"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/051662536"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/122918124"/>
<foaf:made rdf:resource="http://worldcat.org/oclc/034829358"/>
</rdf:Description>

</rdf:RDF>

Bruce

ed.su...@gmail.com

unread,
Sep 26, 2007, 10:52:14 AM9/26/07
to Bibliographic Ontology Specification Group
umm wow:

xsltproc http://inkdroid.org/data/identity-foaf.xsl
http://orlabs.oclc.org/Identities/key/lccn-no99-10609 | xmllint --
format -

the GRDDL idea is awesome btw...

//Ed

Frederick Giasson

unread,
Sep 27, 2007, 8:23:55 AM9/27/07
to bibliographic-ontolog...@googlegroups.com
Hi

Certainly, with a good tool or service making the bridege (Zotero?)

Fred

Reply all
Reply to author
Forward
0 new messages