aboutsummaryrefslogtreecommitdiffstats
path: root/scratch/netex-nl-cxx/process.sh
diff options
context:
space:
mode:
authorLibravatar Rutger Broekhoff2024-05-04 16:33:53 +0200
committerLibravatar Rutger Broekhoff2024-05-04 16:33:53 +0200
commit279f790f078325582aa62e562a766204034766e4 (patch)
tree6aea4ebf68194afee9bbd4d5a8339355ec6753a7 /scratch/netex-nl-cxx/process.sh
parent4f5cb257dc47dcff1b1306e4ae702669dfa93197 (diff)
downloadoeuf-279f790f078325582aa62e562a766204034766e4.tar.gz
oeuf-279f790f078325582aa62e562a766204034766e4.zip
Try generating C++ code from NeTEx XSDs using CodeSynthesis XSD
Diffstat (limited to 'scratch/netex-nl-cxx/process.sh')
-rwxr-xr-xscratch/netex-nl-cxx/process.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/scratch/netex-nl-cxx/process.sh b/scratch/netex-nl-cxx/process.sh
new file mode 100755
index 0000000..8ab7a94
--- /dev/null
+++ b/scratch/netex-nl-cxx/process.sh
@@ -0,0 +1,29 @@
1#!/usr/bin/env bash
2
3set -eu
4set -o pipefail
5
6XSD_TAG="v9.3.0-draft1"
7
8rm -rf ./gen ./vendor/src
9mkdir -p gen vendor/src
10
11curl -L "https://github.com/BISONNL/NeTEx-NL/archive/refs/tags/$XSD_TAG.tar.gz" -o ./vendor/netex-nl.tar.gz
12tar -xzf ./vendor/netex-nl.tar.gz --strip-components 1 -C ./vendor/src/
13
14xsltproc -o ./vendor/src/xsd/netex-nl-basic-new.xsd ./merge-enums-into-basic.xslt ./vendor/src/xsd/netex-nl-basic.xsd
15xsltproc -o ./vendor/src/xsd/netex-nl-data-new.xsd ./remove-enums-include.xslt ./vendor/src/xsd/netex-nl-data.xsd
16xsltproc -o ./vendor/src/xsd/netex-nl-new.xsd ./remove-enums-include.xslt ./vendor/src/xsd/netex-nl.xsd
17rm ./vendor/src/xsd/netex-nl-enums.xsd
18mv ./vendor/src/xsd/netex-nl-basic-new.xsd ./vendor/src/xsd/netex-nl-basic.xsd
19mv ./vendor/src/xsd/netex-nl-data-new.xsd ./vendor/src/xsd/netex-nl-data.xsd
20mv ./vendor/src/xsd/netex-nl-new.xsd ./vendor/src/xsd/netex-nl.xsd
21
22process () {
23 xsdcxx cxx-tree --output-dir ./gen --namespace-map http://www.opengis.net/gml/3.2=gml "vendor/src/xsd/$1.xsd"
24}
25
26process gml-bison
27process netex-nl-basic
28process netex-nl-data
29process netex-nl