Debian Codegraph @

GO/xsl/ipr_to_oboxml.xsl

raw symbols SCIP
1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version="1.0">
5
6 <xsl:strip-space elements="*"/>
7 <xsl:output method="xml" indent="yes"/>
8
9 <xsl:template match="/">
10 <obo>
11 <xsl:apply-templates select="//interpro"/>
12 </obo>
13 </xsl:template>
14 <xsl:template match="interpro">
15 <term>
16 <id>
17 <xsl:text>InterPro:</xsl:text><xsl:value-of select="@id"/>
18 </id>
19 <name>
20 <xsl:value-of select="name"/>
21 </name>
22 <!-- abstract is mixed attribute xml; need to convert. how?
23 -->
24 <xsl:apply-templates select="parent_list"/>
25 <xsl:apply-templates select="member_list"/>
26 <xsl:apply-templates select="structure_db_links"/>
27 <xsl:apply-templates select="taxonomy_distribution"/>
28 </term>
29 </xsl:template>
30
31 <xsl:template match="parent_list">
32 <xsl:for-each select="rel_ref">
33 <is_a>
34 <xsl:text>InterPro:</xsl:text><xsl:value-of select="@ipr_ref"/>
35 </is_a>
36 </xsl:for-each>
37 </xsl:template>
38
39 <xsl:template match="member_list|structure_db_links">
40 <xsl:for-each select="db_xref">
41 <xref_analog>
42 <acc>
43 <xsl:value-of select="@dbkey"/>
44 </acc>
45 <dbname>
46 <xsl:value-of select="@db"/>
47 </dbname>
48 </xref_analog>
49 </xsl:for-each>
50 </xsl:template>
51
52 <xsl:template match="taxonomy_distribution">
53 <xsl:for-each select="taxon_data">
54 <restriction>
55 <type>
56 <xsl:text>ipr:can_occur_in</xsl:text>
57 </type>
58 <to>
59 <xsl:text>taxon_name:</xsl:text><xsl:value-of select="@name"/>
60 </to>
61 </restriction>
62 </xsl:for-each>
63 </xsl:template>
64
65 </xsl:stylesheet>