Print

Print


Quoting Jonathan Rochkind <[log in to unmask]>:


>
> 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

>



-- 
Karen Coyle
[log in to unmask] http://kcoyle.net
ph: 1-510-540-7596
m: 1-510-435-8234
skype: kcoylenet