-
Notifications
You must be signed in to change notification settings - Fork 3
/
transformxml.xsl
29 lines (26 loc) · 1023 Bytes
/
transformxml.xsl
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
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output version="1.0" encoding="UTF-8" indent="yes" />
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<root>
<xsl:apply-templates select="*"/>
</root>
</xsl:template>
<xsl:template match="record">
<xsl:copy>
<xsl:copy-of select="record_id"/>
<xsl:copy-of select="bin_uri"/>
<xsl:copy-of select="taxonomy/phylum"/>
<xsl:copy-of select="taxonomy/class"/>
<xsl:copy-of select="taxonomy/order"/>
<xsl:copy-of select="taxonomy/family"/>
<xsl:copy-of select="taxonomy/subfamily"/>
<xsl:copy-of select="taxonomy/genus"/>
<xsl:copy-of select="taxonomy/species"/>
<xsl:copy-of select="collection_event/coordinates/lat"/>
<xsl:copy-of select="collection_event/coordinates/lon"/>
<xsl:copy-of select="collection_event/region"/>
<xsl:copy-of select="sequences/sequence/nucleotides"/>
</xsl:copy>
</xsl:template>
</xsl:transform>