summaryrefslogtreecommitdiffstats
path: root/test/xml-mapped/custom-labels
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:48:59 +0000
commitc484829272cd13a738e35412498e12f2c9a194ac (patch)
treea1f5ec09629ee895bd3963fa8820b45f2f4c574b /test/xml-mapped/custom-labels
parentInitial commit. (diff)
downloadliborcus-upstream/0.19.2.tar.xz
liborcus-upstream/0.19.2.zip
Adding upstream version 0.19.2.upstream/0.19.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--test/xml-mapped/custom-labels-2/check.txt12
-rw-r--r--test/xml-mapped/custom-labels-2/input.xml8
-rw-r--r--test/xml-mapped/custom-labels-2/map.xml12
-rw-r--r--test/xml-mapped/custom-labels/check.txt27
-rw-r--r--test/xml-mapped/custom-labels/input.xml27
-rw-r--r--test/xml-mapped/custom-labels/map.xml14
6 files changed, 100 insertions, 0 deletions
diff --git a/test/xml-mapped/custom-labels-2/check.txt b/test/xml-mapped/custom-labels-2/check.txt
new file mode 100644
index 0000000..829dc2e
--- /dev/null
+++ b/test/xml-mapped/custom-labels-2/check.txt
@@ -0,0 +1,12 @@
+data/1/1:string:"Date Received"
+data/1/2:string:"Date Processed"
+data/1/3:string:"Received by"
+data/2/1:string:"2011-01-01"
+data/2/2:string:"2011-01-03"
+data/2/3:string:"JKB"
+data/3/1:string:"2011-01-01"
+data/3/2:string:"2011-01-04"
+data/3/3:string:"CJ"
+data/4/1:string:"2011-12-23"
+data/4/2:string:"2012-01-01"
+data/4/3:string:"KY"
diff --git a/test/xml-mapped/custom-labels-2/input.xml b/test/xml-mapped/custom-labels-2/input.xml
new file mode 100644
index 0000000..4a29806
--- /dev/null
+++ b/test/xml-mapped/custom-labels-2/input.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<a:data xmlns:a="http://ns-1" xmlns:b="http://ns-2">
+ <b:entries>
+ <b:entry b:date-received="2011-01-01" b:date-processed="2011-01-03" b:received-by="JKB"/>
+ <b:entry b:date-received="2011-01-01" b:date-processed="2011-01-04" b:received-by="CJ"/>
+ <b:entry b:date-received="2011-12-23" b:date-processed="2012-01-01" b:received-by="KY"/>
+ </b:entries>
+</a:data>
diff --git a/test/xml-mapped/custom-labels-2/map.xml b/test/xml-mapped/custom-labels-2/map.xml
new file mode 100644
index 0000000..3dcdf47
--- /dev/null
+++ b/test/xml-mapped/custom-labels-2/map.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<map xmlns="http://gitorious.org/orcus/xml-map">
+ <ns alias="x" uri="http://ns-1"/>
+ <ns alias="y" uri="http://ns-2" default="true"/>
+ <sheet name="data"/>
+ <range row="1" column="1" sheet="data">
+ <field path="/x:data/entries/entry/@date-received" label="Date Received"/>
+ <field path="/x:data/entries/entry/@date-processed" label="Date Processed"/>
+ <field path="/x:data/entries/entry/@received-by" label="Received by"/>
+ <row-group path="/x:data/entries/entry"/>
+ </range>
+</map>
diff --git a/test/xml-mapped/custom-labels/check.txt b/test/xml-mapped/custom-labels/check.txt
new file mode 100644
index 0000000..d1ebce5
--- /dev/null
+++ b/test/xml-mapped/custom-labels/check.txt
@@ -0,0 +1,27 @@
+data/0/0:string:"TOP SECRET"
+data/1/0:string:"Simple Data File"
+data/1/2:string:"2012-08-12"
+data/3/0:string:"ID"
+data/3/1:string:"First Name"
+data/3/2:string:"Last Name"
+data/3/3:string:"Test Score"
+data/4/0:numeric:1
+data/4/1:string:"Bill"
+data/4/2:string:"Clinton"
+data/4/3:numeric:456
+data/5/0:numeric:2
+data/5/1:string:"David"
+data/5/2:string:"Cameron"
+data/5/3:numeric:323
+data/6/0:numeric:3
+data/6/1:string:"Barak"
+data/6/2:string:"Obama"
+data/6/3:numeric:234
+data/7/0:numeric:4
+data/7/1:string:"Yoshihiko"
+data/7/2:string:"Noda"
+data/7/3:numeric:192
+data/8/0:numeric:5
+data/8/1:string:"Angela"
+data/8/2:string:"Merkel"
+data/8/3:numeric:210
diff --git a/test/xml-mapped/custom-labels/input.xml b/test/xml-mapped/custom-labels/input.xml
new file mode 100644
index 0000000..f6d4abc
--- /dev/null
+++ b/test/xml-mapped/custom-labels/input.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0"?>
+<data>
+ <label>TOP SECRET</label>
+ <header>
+ <title>Simple Data File</title>
+ </header>
+ <entries>
+ <entry>
+ <id>1</id><name><first>Bill</first><last>Clinton</last></name><score>456</score>
+ </entry>
+ <entry>
+ <id>2</id><name><first>David</first><last>Cameron</last></name><score>323</score>
+ </entry>
+ <entry>
+ <id>3</id><name><first>Barak</first><last>Obama</last></name><score>234</score>
+ </entry>
+ <entry>
+ <id>4</id><name><first>Yoshihiko</first><last>Noda</last></name><score>192</score>
+ </entry>
+ <entry>
+ <id>5</id><name><first>Angela</first><last>Merkel</last></name><score>210</score>
+ </entry>
+ </entries>
+ <footer>
+ <date>2012-08-12</date>
+ </footer>
+</data>
diff --git a/test/xml-mapped/custom-labels/map.xml b/test/xml-mapped/custom-labels/map.xml
new file mode 100644
index 0000000..0a7b64e
--- /dev/null
+++ b/test/xml-mapped/custom-labels/map.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0"?>
+<map xmlns="https://gitlab.com/orcus/orcus">
+ <sheet name="data"/>
+ <cell path="/data/label" row="0" column="0" sheet="data"/>
+ <cell path="/data/header/title" row="1" column="0" sheet="data"/>
+ <cell path="/data/footer/date" row="1" column="2" sheet="data"/>
+ <range row="3" column="0" sheet="data">
+ <field path="/data/entries/entry/id" label="ID"/>
+ <field path="/data/entries/entry/name/first" label="First Name"/>
+ <field path="/data/entries/entry/name/last" label="Last Name"/>
+ <field path="/data/entries/entry/score" label="Test Score"/>
+ <row-group path="/data/entries/entry"/>
+ </range>
+</map>