I am trying to parse the owl file called "CLO_v2.0.27.owl" available at the bottom of this webpage http://bioportal.bioontology.org/ontologies/45376.
I want to extract name of cell lines that are subClassOf CLO_0000019 and that are embedded in this kind of element:
<owl:Class rdf:about="&obo;CLO_0008089">
<rdfs:label>NCI-H460</rdfs:label>
<rdfs:subClassOf rdf:resource="&obo;CLO_0000019"/>
<rdfs:seeAlso>ATCC: HTB-177</rdfs:seeAlso>
</owl:Class>
In order to do that I have this XSLT :
<xsl:stylesheet version="1.0" xmlns:xsl="<a href=" http:="" www.w3.org="" 1999="" XSL="" Transform"="" rel="nofollow">http://www.w3.org/1999/XSL/Transform"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:apply-templates select="//owl:Class[rdfs:subClassOf[@rdf:resource = '*CLO_0000019']]"/>
</xsl:template>
<xsl:template match="owl:Class">
<xsl:value-of select="./rdfs:label"/>
<xsl:if test="not(position()=last())">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
But unfortunatelly my textfile is empty. And if I change a single line (see below) I get a text file filled out but with items I am not interested in.
<xsl:apply-templates select="//owl:Class[rdfs:subClassOf[@rdf:resource]]" />
So if there is XSLT masters that could correct my newbie mistake, I would appreciate very much.
I am using the evaluation version the software XMLspy
BTW: the scope of rdfs:seeAlso is a resource, not a literal. So (I know that's not your fault) but the statement 'rdfs:seeAlso' in your example seems wrong to me.
Submitted ticket at https://sourceforge.net/tracker/?func=detail&aid=3347040&group_id=339905&atid=1423294
Thanks Mélanie !