Debian Codegraph @

GO/xsl/oboxml_to_summary_table.xsl

raw symbols SCIP
1 <?xml version = "1.0"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3
4 <!-- transforms OBO XML format to a simple tabular summary
5
6 cjm 2004
7
8 -->
9
10 <xsl:output indent="yes" method="text"/>
11
12 <xsl:template match="/">
13 <xsl:text>#ID&#9;NAME&#9;NAMESPACE&#9;OBS&#9;IS_A&#9;REL&#9;DEF&#9;SYNS&#9;ALT-IDS&#9;XREFS&#10;</xsl:text>
14 <xsl:apply-templates select="*/term"/>
15 </xsl:template>
16
17 <xsl:template match="term">
18 <xsl:value-of select="id"/>
19 <xsl:text>&#9;</xsl:text>
20 <xsl:value-of select="name"/>
21 <xsl:text>&#9;</xsl:text>
22 <xsl:value-of select="namespace"/>
23 <xsl:text>&#9;</xsl:text>
24 <xsl:choose>
25 <xsl:when test="is_obsolete">
26 <xsl:text>OBSOLETE</xsl:text>
27 </xsl:when>
28 <xsl:otherwise>
29 <xsl:text>CURRENT</xsl:text>
30 </xsl:otherwise>
31 </xsl:choose>
32 <xsl:text>&#9;</xsl:text>
33 <xsl:apply-templates select="is_a"/>
34 <xsl:text>&#9;</xsl:text>
35 <xsl:apply-templates select="relationship"/>
36 <xsl:text>&#9;</xsl:text>
37 <xsl:apply-templates select="def"/>
38 <xsl:text>&#9;</xsl:text>
39 <xsl:apply-templates select="synonym"/>
40 <xsl:text>&#9;</xsl:text>
41 <xsl:apply-templates select="alt_id"/>
42 <xsl:text>&#9;</xsl:text>
43 <xsl:apply-templates select="xref_analog"/>
44 <xsl:text>&#10;</xsl:text>
45 </xsl:template>
46
47 <xsl:template match="is_a|alt_id">
48 <xsl:value-of select="."/>
49 <xsl:text>;</xsl:text>
50 </xsl:template>
51
52 <xsl:template match="relationship">
53 <xsl:value-of select="type"/>
54 <xsl:text>=</xsl:text>
55 <xsl:value-of select="to"/>
56 <xsl:text>;</xsl:text>
57 </xsl:template>
58
59 <xsl:template match="synonym">
60 <xsl:value-of select="synonym_text"/>
61 </xsl:template>
62
63 <xsl:template match="def">
64 <xsl:value-of select="defstr"/>
65 </xsl:template>
66
67 <xsl:template match="xref_analog">
68 <xsl:value-of select="dbname"/>
69 <xsl:text>:</xsl:text>
70 <xsl:value-of select="acc"/>
71 <xsl:text>;</xsl:text>
72 </xsl:template>
73
74 <xsl:template match="text()|@*">
75 </xsl:template>
76
77
78 </xsl:stylesheet>
79
80
81