Huh, that does look like it's got what I need, although it's a bit confusing. I wasn't able to find a URL to a file with the format Karen cites below. I'm probably dense. Can anyone give me the URL that returns a list of all terms with each term having the XML Karen quotes below?

It looks like I'd still have to "drill down" into what should be an opaque identifier to get the actual MARC code. Extract "fq" from "http://id.loc.gov/vocabulary/geographicAreas/fq";, hard-coding in that those URLs will always be of that form, with the last term being the actual MARC code. But that's _probably_ a safe assumption. (Although it wouldn't hurt if they added a data element "marcCode" or somethign with the actual literal "fq" i it.)

On 6/22/2011 10:35 PM, Karen Coyle wrote:
Quoting Jonathan Rochkind <[email protected]>:



Right, so like I keep saying, as far as I can tell, those files are lists of URLs, one for each code. (Or technically lists of RDF-triples, but where two parts of each triple is identical in every triple just saying "this URL is part of the marc geographic vocabulary", and then each triple has a unique URL representing a code).

And I'd need to do a seperate HTTP request for each code ( a couple hundred?) to actually get the label(s).

I'm not sure why you see it as separate requests, unless the downloaded file doesn't work for you -- but maybe I don't understand what you are trying to do. The downloaded full file has the display data and the codes:

<rdf:Description rdf:about="http://id.loc.gov/vocabulary/geographicAreas/fq";>
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
<rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource"/>
<owl:sameAs rdf:resource="info:lc/vocabulary/gacs/fq"/>
<skos:prefLabel xml:lang="en">Africa, French-speaking Equatorial</skos:prefLabel> <skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>fq</skos:notation> <skos:inScheme rdf:resource="http://id.loc.gov/vocabulary/geographicAreas"/>
<skos:altLabel xml:lang="en">Africa, Equatorial</skos:altLabel>
<skos:narrower>
<skos:Concept>
<skos:prefLabel xml:lang="en">Chad, Lake</skos:prefLabel>
<skos:broader rdf:resource="http://id.loc.gov/vocabulary/geographicAreas/fq"/>
</skos:Concept>
</skos:narrower>
<skos:altLabel xml:lang="en">French Equatorial Africa</skos:altLabel>
<skos:altLabel xml:lang="en">French-speaking Equatorial Africa</skos:altLabel> <skos:exactMatch rdf:resource="http://id.loc.gov/authorities/sh85001608#concept"/> <skos:broader rdf:resource="http://id.loc.gov/vocabulary/geographicAreas/f"/>
<vs:term_status>stable</vs:term_status>
<skos:changeNote rdf:nodeID="fq"/>

so if ypu pick out the value in prefLabel and the value in notation you have what you need, no? (admittedly, this is NOT the same as a simple, comma delimited list!)

<skos:prefLabel xml:lang="en">Chad, Lake</skos:prefLabel>
<skos:notation rdf:datatype="http://www.w3.org/2001/XMLSchema#string";>fq</skos:notation>


Am I missing something? That's not a very convenient way to get the data for the very common use case of wanting to construct a mapping from code to label, right? Or that's just me?

What would be nice would be a simple XSLT transform that turns out a CSV on the fly, always getting the latest values.

No?

kc





Reply via email to