/usr/share/perl5/GO/xsl/oboxml_to_racer.xsl is in libgo-perl 0.15-5.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | <?xml version = "1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="text"/>
<xsl:key name="terms" match="term" use="id"/>
<xsl:template mode="id" match="*">
<xsl:value-of select="translate(.,':','_')"/>
</xsl:template>
<xsl:template match="/">
<!-- ******** -->
<!-- ONTOLOGY -->
<!-- ******** -->
<xsl:text>(in-knowledge-base test x-test) </xsl:text>
<xsl:text>(signature :atomic-concepts (</xsl:text>
<xsl:for-each select="obo/term">
<xsl:text> </xsl:text>
<xsl:apply-templates mode="id" select="id"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text>) :roles (</xsl:text>
<xsl:for-each select="obo/typedef">
<xsl:text> (</xsl:text>
<xsl:apply-templates mode="id" select="id"/>
<xsl:text>) </xsl:text>
</xsl:for-each>
<xsl:text>)) </xsl:text>
<xsl:apply-templates select="obo/term"/>
<!-- ******* -->
<!-- QUERIES -->
<!-- ******* -->
<!-- check existing predictions -->
<xsl:for-each select="obo/term/is_a[@novel_inferred='true']">
<xsl:text>(concept-subsumes? </xsl:text>
<xsl:apply-templates mode="id" select="."/>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="id" select="../id"/>
<xsl:text>) </xsl:text>
</xsl:for-each>
<!-- check for new subsumptions -->
<xsl:for-each select="obo/term">
<xsl:text>(concept-ancestors </xsl:text>
<xsl:apply-templates mode="id" select="id"/>
<xsl:text>) </xsl:text>
</xsl:for-each>
</xsl:template>
<xsl:template match="term">
<xsl:apply-templates select="is_a"/>
<xsl:apply-templates select="relationship"/>
<xsl:if test="count(intersection_of)>0">
<xsl:text>(equivalent </xsl:text>
<xsl:apply-templates mode="id" select="id"/>
<xsl:text> (and </xsl:text>
<xsl:apply-templates select="intersection_of"/>
<xsl:text>)) </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="is_a">
<xsl:if test="not(@novel_inferred) and not(@problematic_inferred)">
<xsl:text>(implies </xsl:text>
<xsl:apply-templates mode="id" select="../id"/>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="id" select="."/>
<xsl:text>) </xsl:text>
</xsl:if>
</xsl:template>
<xsl:template match="relationship">
<xsl:text>(implies </xsl:text>
<xsl:apply-templates mode="id" select="../id"/>
<xsl:text> (some </xsl:text>
<xsl:value-of select="type"/>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="id" select="to"/>
<xsl:text>)) </xsl:text>
</xsl:template>
<xsl:template match="intersection_of">
<xsl:text> </xsl:text>
<xsl:choose>
<xsl:when test="type='is_a'">
<xsl:apply-templates mode="id" select="to"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>(some </xsl:text>
<xsl:value-of select="type"/>
<xsl:text> </xsl:text>
<xsl:apply-templates mode="id" select="to"/>
<xsl:text>)</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="text()|@*">
</xsl:template>
</xsl:stylesheet>
|