Subject: [xsl] Change xml:lang of a skos:prefLabel [ skos, rdf, xml:lang ] From: Jürgen Jakobitsch <jakobitschj@xxxxxxxx> Date: Wed, 14 Oct 2009 21:24:48 +0100 (GMT+01:00) |
aloha! please excuse me for only realizing now (in the year 2009) how much i could need xsl in connection with rdf. in my project i'm dealing with skos thesauri (like this one http://isegserv.itd.rl.ac.uk/skos/apais/apais200404.rdf (599kb). the problem is, that the application i'm working on requires an xml:lang attribute for labels like skos:altLabel or skos:prefLabel. currently i'm importing such a thesaurus to my triple store, sparql for every label that has no such xml:lang attribute, delete it, add an xml:lang attribute with a default language and add it again (there's no such way to update something like this in a triple store, and i can't do anything about that). since this approach is very timeconsuming here's my question : is there a way (for a complete xsl newbie) to add such an xml:lang attribute to labels that don't have one and leave the rest of the thesaurus as it is with xsl? example : i want to get from here : <skos:Concept rdf:nodeID="R0386"> <skos:altLabel>Economic recession</skos:altLabel> <skos:altLabel>Depression, Economic</skos:altLabel> <skos:related rdf:nodeID="R0392" /> <skos:related rdf:nodeID="R0174" /> <skos:inScheme rdf:nodeID="apais" /> <skos:related rdf:nodeID="R1419" /> <skos:altLabel>Recession, Economic</skos:altLabel> <skos:prefLabel>Economic depression</skos:prefLabel> <skos:subjectIndicator rdf:resource="http://www.nla.gov.au/apais/thesaurus/html/R0386.html" /> </skos:Concept> to here (with language "en"): <skos:Concept rdf:nodeID="R0386"> <skos:altLabel xml:lang="en">Economic recession</skos:altLabel> <skos:altLabel xml:lang="en">Depression, Economic</skos:altLabel> <skos:related rdf:nodeID="R0392" /> <skos:related rdf:nodeID="R0174" /> <skos:inScheme rdf:nodeID="apais" /> <skos:related rdf:nodeID="R1419" /> <skos:altLabel xml:lang="en">Recession, Economic</skos:altLabel> <skos:prefLabel xml:lang="en">Economic depression</skos:prefLabel> <skos:subjectIndicator rdf:resource="http://www.nla.gov.au/apais/thesaurus/html/R0386.html" /> </skos:Concept> any help and pointer where i could start my investigation greatly appreciated wkr www.turnguard.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[no subject], Unknown | Thread | Re: [xsl] Change xml:lang of a skos, G. Ken Holman |
Re: [xsl] XML to both ODF and OOXML, Ben Mendis | Date | [xsl] De Normalize XML using XSLT, Senthilukvelaan |
Month |