I have the following xml:
<?xml version="1.0" encoding="utf-8" ?>
<root>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:skosxl="http://www.w3.org/2008/05/skos-xl#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xmlns:dc="http://purl.org/dc/terms/"
xmlns:ns0="http://art.uniroma2.it/ontologies/vocbench#"
xmlns:void="http://rdfs.org/ns/void#">
<skos:Concept rdf:about="http://aims.fao.org/aos/agrovoc/c_26321">
<skos:prefLabel xml:lang="fa">آبیس ماریزیای</skos:prefLabel>
....
<skos:prefLabel xml:lang="en">Abies mariesii</skos:prefLabel>
....
<skos:broader rdf:resource="http://aims.fao.org/aos/agrovoc/c_10"/>
</skos:Concept>
<skos:Concept rdf:about="http://aims.fao.org/skosmos/agrovoc/en/page/c_1591">
<skos:prefLabel xml:lang="ar">أشجار عيد الميلاد</skos:prefLabel>
....
<skos:prefLabel xml:lang="en">christmas trees</skos:prefLabel>
....
</skos:Concept>
....
<skos:Concept>
<ns0:isUsedAs rdf:resource="http://aims.fao.org/skosmos/agrovoc/en/page/c_7776"/>
<ns0:isUsedAs rdf:resource="http://aims.fao.org/skosmos/agrovoc/en/page/c_1591"/>
</skos:Concept>
</rdf:RDF>
</root>
I want to get the value "christmas tree" which is skos:prefLabel xml:lang="en" based on ns0:issuedAs which I'm not sure is a sibling, and also get the rdf:resource for such (e.g. http://aims.fao.org/skosmos/agrovoc/en/page/c_1591).
Or to rephrase what I wanted to do:
Select skos:Concept/skos:prefLabel where attribute language is en based on the value of skos:Concept rdf:about (in this case http://aims.fao.org/skosmos/agrovoc/en/page/c_1591) and this particular concept (still the "christmas tree" concept) has a node element ns0:isUsedAs (in this case again http://aims.fao.org/skosmos/agrovoc/en/page/c_1591).
1) We start with skos:prefLabel, the one with the xml:lang attribute of "en", in this case it's christmas trees 2) This concept has a parent node Skos:Concept with attribute rdf:about equals to "http://aims.fao.org/skosmos/agrovoc/en/page/c_1591" 3) This attribute is attributed in another tree, in ns0:isUsedAs rdf:resource. 4) So this christmas tree is identified through all of this.
So I can get the following text:
=304 \\$aisUsedas$bchristmas tree$chttp://aims.fao.org/skosmos/agrovoc/en/page/c_1591
Thanks in advance!