aboutsummaryrefslogtreecommitdiffstats
path: root/scratch/netex-nl-cxx/merge-enums-into-basic.xslt
diff options
context:
space:
mode:
Diffstat (limited to 'scratch/netex-nl-cxx/merge-enums-into-basic.xslt')
-rw-r--r--scratch/netex-nl-cxx/merge-enums-into-basic.xslt23
1 files changed, 23 insertions, 0 deletions
diff --git a/scratch/netex-nl-cxx/merge-enums-into-basic.xslt b/scratch/netex-nl-cxx/merge-enums-into-basic.xslt
new file mode 100644
index 0000000..6e3fdad
--- /dev/null
+++ b/scratch/netex-nl-cxx/merge-enums-into-basic.xslt
@@ -0,0 +1,23 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
3 <!-- Replace includes of netex-nl-enums.xsd with the (almost) literal
4 contents of the xsd:schema definition in netex-nl-enums.xsd -->
5 <xsl:template match="xsd:include[@schemaLocation='netex-nl-enums.xsd']">
6 <xsl:apply-templates select="document('netex-nl-enums.xsd', /)/xsd:schema/node()"/>
7 </xsl:template>
8
9 <!-- Remove the big 'AFHANKELIJKHEDEN' (dependencies) comment, which
10 otherwise looks out of place in the output -->
11 <xsl:template match="comment()[following-sibling::*[1]/self::xsd:include[@schemaLocation='netex-nl-basic.xsd']]"/>
12
13 <!-- Remove includes of netex-nl-basic.xsd (coming from netex-nl-enums.xsd),
14 because we basically inline netex-nl-enums.xsd into netex-nl-basic.xsd -->
15 <xsl:template match="xsd:include[@schemaLocation='netex-nl-basic.xsd']"/>
16
17 <!-- Apply the transformation on the entire tree -->
18 <xsl:template match="@*|node()">
19 <xsl:copy>
20 <xsl:apply-templates select="@*|node()"/>
21 </xsl:copy>
22 </xsl:template>
23</xsl:transform>