-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathICD-10-Chapter-CSV.xsl
43 lines (37 loc) · 1.08 KB
/
ICD-10-Chapter-CSV.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" indent="no"/>
<!--
GAIN
ICD-10-Chapter-CSV.xsl
Template to Read WHO ICD-10-CM File
Experimental Phase.
Data delimited by |
Creates the Table
Chapter
-->
<!--
Includes
-->
<xsl:include href="includes/csv_export.xsl"/>
<xsl:variable name="delimiter" select="'|'"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/">
<xsl:copy>
<!--
Header
-->
<xsl:apply-templates select="//chapter[1]/name | //chapter[1]/desc" mode="csv-delimited-header">
<xsl:with-param name="key-column">version</xsl:with-param>
<xsl:with-param name="lastcol">desc</xsl:with-param>
</xsl:apply-templates>
<!--
Data
-->
<xsl:apply-templates select="//chapter/name | //chapter/desc" mode="csv-delimited">
<xsl:with-param name="key-value"><xsl:value-of select="//version"/></xsl:with-param>
<xsl:with-param name="lastcol">desc</xsl:with-param>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>