我有以下 skosxl 文件:
<skos:Concept rdf:about="http://aims.fao.org/aos/agrovoc/c_0e0e555b">
<ns0:hasStatus>Published</ns0:hasStatus>
<skos:prefLabel xml:lang="es">baldíos</skos:prefLabel>
<skos:prefLabel xml:lang="en">unclaimed lands</skos:prefLabel>
<skos:prefLabel xml:lang="fr">terres vacantes</skos:prefLabel>
<dc:created rdf:datatype="xsd:http://www.w3.org/2001/XMLSchema#dateTime">2015-03-09T14:50:41Z</dc:created>
<skos:definition>
<rdf:Description rdf:about="http://aims.fao.org/aos/agrovoc/def_9343e456">
<rdf:value xml:lang="en">Unclaimed land is land for which there is no owner or claimant.</rdf:value>
</rdf:Description>
</skos:definition>
.....
<rdf:RDF>
我想获得 rdf:about of skos:Concept 的值,它基于子节点 ns0:hasStatus,以下我似乎无法使其工作:
<xsl:template match="root">
<xsl:for-each select="rdf:RDF">
<xsl:text>STARTHERE</xsl:text>
<xsl:text> </xsl:text>
<xsl:text>=LDR 00000nam 2200000Ia 4500</xsl:text>
<xsl:text> </xsl:text>
<xsl:apply-templates select="rdf:Description/skos:narrowMatch" />
<xsl:text> </xsl:text>
<xsl:apply-templates select="rdf:Description/skos:exactMatch" />
<xsl:text> </xsl:text>
<xsl:apply-templates select="skos:Concept/skos:narrower" />
<xsl:text> </xsl:text>
<xsl:apply-templates select="skos:Concept" />
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
....
<xsl:template match="skos:Concept">
<xsl:if test="child::ns0:hasStatus">
<xsl:text>=300 \\$a</xsl:text><xsl:value-of select="@rdf:about" />
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="skos:Concept">
<xsl:if test="skos:broader">
<xsl:for-each select="skos:prefLabel" />
<xsl:text>=301 \\$a</xsl:text><xsl:value-of select="skos:prefLabel[@xml:lang='en']" />
<xsl:text> </xsl:text>
</xsl:if>
</xsl:template>
提前致谢!