summaryrefslogtreecommitdiffstats
path: root/test/xml-mapped/content-namespace
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/content-namespace
parentInitial commit. (diff)
downloadliborcus-upstream.tar.xz
liborcus-upstream.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/content-namespace-2/check-nomap.txt12
-rw-r--r--test/xml-mapped/content-namespace-2/check.txt12
-rw-r--r--test/xml-mapped/content-namespace-2/input.xml22
-rw-r--r--test/xml-mapped/content-namespace-2/map.xml13
-rw-r--r--test/xml-mapped/content-namespace-3/check-nomap.txt12
-rw-r--r--test/xml-mapped/content-namespace-3/check.txt13
-rw-r--r--test/xml-mapped/content-namespace-3/input.xml26
-rw-r--r--test/xml-mapped/content-namespace-3/map.xml12
-rw-r--r--test/xml-mapped/content-namespace/check-nomap.txt12
-rw-r--r--test/xml-mapped/content-namespace/check.txt13
-rw-r--r--test/xml-mapped/content-namespace/input.xml26
-rw-r--r--test/xml-mapped/content-namespace/map.xml12
12 files changed, 185 insertions, 0 deletions
diff --git a/test/xml-mapped/content-namespace-2/check-nomap.txt b/test/xml-mapped/content-namespace-2/check-nomap.txt
new file mode 100644
index 0000000..d7c6de8
--- /dev/null
+++ b/test/xml-mapped/content-namespace-2/check-nomap.txt
@@ -0,0 +1,12 @@
+range-0/0/0:string:"ns2:date"
+range-0/0/1:string:"ns2:category"
+range-0/0/2:string:"ns2:amount"
+range-0/1/0:string:"2011-01-02"
+range-0/1/1:string:"Lunch"
+range-0/1/2:numeric:6.32
+range-0/2/0:string:"2011-01-03"
+range-0/2/1:string:"Lunch"
+range-0/2/2:numeric:7.45
+range-0/3/0:string:"2011-01-04"
+range-0/3/1:string:"Gas"
+range-0/3/2:numeric:44.35
diff --git a/test/xml-mapped/content-namespace-2/check.txt b/test/xml-mapped/content-namespace-2/check.txt
new file mode 100644
index 0000000..a4c7237
--- /dev/null
+++ b/test/xml-mapped/content-namespace-2/check.txt
@@ -0,0 +1,12 @@
+data/2/0:string:"ns2:date"
+data/2/1:string:"ns2:category"
+data/2/2:string:"ns2:amount"
+data/3/0:string:"2011-01-02"
+data/3/1:string:"Lunch"
+data/3/2:numeric:6.32
+data/4/0:string:"2011-01-03"
+data/4/1:string:"Lunch"
+data/4/2:numeric:7.45
+data/5/0:string:"2011-01-04"
+data/5/1:string:"Gas"
+data/5/2:numeric:44.35
diff --git a/test/xml-mapped/content-namespace-2/input.xml b/test/xml-mapped/content-namespace-2/input.xml
new file mode 100644
index 0000000..435dfce
--- /dev/null
+++ b/test/xml-mapped/content-namespace-2/input.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<a:data xmlns:a="http://namespace-1">
+ <b:monthly xmlns:b="http://namespace-2" xmlns:c="http://namespace-3">
+ <b:entries>
+ <b:entry>
+ <c:date>2011-01-02</c:date>
+ <c:category>Lunch</c:category>
+ <c:amount>6.32</c:amount>
+ </b:entry>
+ <b:entry>
+ <c:date>2011-01-03</c:date>
+ <c:category>Lunch</c:category>
+ <c:amount>7.45</c:amount>
+ </b:entry>
+ <b:entry>
+ <c:date>2011-01-04</c:date>
+ <c:category>Gas</c:category>
+ <c:amount>44.35</c:amount>
+ </b:entry>
+ </b:entries>
+ </b:monthly>
+</a:data>
diff --git a/test/xml-mapped/content-namespace-2/map.xml b/test/xml-mapped/content-namespace-2/map.xml
new file mode 100644
index 0000000..172de50
--- /dev/null
+++ b/test/xml-mapped/content-namespace-2/map.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<map xmlns="http://gitorious.org/orcus/xml-map">
+ <ns alias="x" uri="http://namespace-1"/>
+ <ns alias="y" uri="http://namespace-2"/>
+ <ns alias="z" uri="http://namespace-3"/>
+ <sheet name="data"/>
+ <range row="2" column="0" sheet="data">
+ <field path="/x:data/y:monthly/y:entries/y:entry/z:date"/>
+ <field path="/x:data/y:monthly/y:entries/y:entry/z:category"/>
+ <field path="/x:data/y:monthly/y:entries/y:entry/z:amount"/>
+ <row-group path="/x:data/y:monthly/y:entries/y:entry"/>
+ </range>
+</map>
diff --git a/test/xml-mapped/content-namespace-3/check-nomap.txt b/test/xml-mapped/content-namespace-3/check-nomap.txt
new file mode 100644
index 0000000..dce2781
--- /dev/null
+++ b/test/xml-mapped/content-namespace-3/check-nomap.txt
@@ -0,0 +1,12 @@
+range-0/0/0:string:"ns0:city"
+range-0/0/1:string:"ns0:population"
+range-0/0/2:string:"ns0:year"
+range-0/1/0:string:"Tokyo"
+range-0/1/1:numeric:13189000
+range-0/1/2:numeric:2011
+range-0/2/0:string:"New York City"
+range-0/2/1:numeric:8244910
+range-0/2/2:numeric:2011
+range-0/3/0:string:"London"
+range-0/3/1:numeric:8174100
+range-0/3/2:numeric:2011
diff --git a/test/xml-mapped/content-namespace-3/check.txt b/test/xml-mapped/content-namespace-3/check.txt
new file mode 100644
index 0000000..98d2013
--- /dev/null
+++ b/test/xml-mapped/content-namespace-3/check.txt
@@ -0,0 +1,13 @@
+data/0/0:string:"Sample data"
+data/2/0:string:"ns0:city"
+data/2/1:string:"ns0:population"
+data/2/2:string:"ns0:year"
+data/3/0:string:"Tokyo"
+data/3/1:numeric:13189000
+data/3/2:numeric:2011
+data/4/0:string:"New York City"
+data/4/1:numeric:8244910
+data/4/2:numeric:2011
+data/5/0:string:"London"
+data/5/1:numeric:8174100
+data/5/2:numeric:2011
diff --git a/test/xml-mapped/content-namespace-3/input.xml b/test/xml-mapped/content-namespace-3/input.xml
new file mode 100644
index 0000000..6e3c8b8
--- /dev/null
+++ b/test/xml-mapped/content-namespace-3/input.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<b:table xmlns:b="http://some-namespace" xmlns:skip="http://namespace-to-skip">
+ <b:title>Sample data</b:title>
+ <b:rows>
+ <b:row>
+ <b:city>Tokyo</b:city>
+ <b:population>13189000</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <b:row>
+ <b:city>New York City</b:city>
+ <b:population>8244910</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <b:row>
+ <b:city>London</b:city>
+ <b:population>8174100</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <skip:row>
+ <b:city>Beijing</b:city>
+ <b:population>20180000</b:population>
+ <b:year>2011</b:year>
+ </skip:row>
+ </b:rows>
+</b:table>
diff --git a/test/xml-mapped/content-namespace-3/map.xml b/test/xml-mapped/content-namespace-3/map.xml
new file mode 100644
index 0000000..419bf0c
--- /dev/null
+++ b/test/xml-mapped/content-namespace-3/map.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<map xmlns="http://gitorious.org/orcus/xml-map">
+ <ns alias="a" uri="http://some-namespace" default="true"/>
+ <sheet name="data"/>
+ <cell path="/a:table/title" row="0" column="0" sheet="data"/>
+ <range row="2" column="0" sheet="data">
+ <field path="/a:table/rows/a:row/city"/>
+ <field path="/a:table/rows/a:row/population"/>
+ <field path="/a:table/rows/a:row/year"/>
+ <row-group path="/table/rows/row"/>
+ </range>
+</map>
diff --git a/test/xml-mapped/content-namespace/check-nomap.txt b/test/xml-mapped/content-namespace/check-nomap.txt
new file mode 100644
index 0000000..dce2781
--- /dev/null
+++ b/test/xml-mapped/content-namespace/check-nomap.txt
@@ -0,0 +1,12 @@
+range-0/0/0:string:"ns0:city"
+range-0/0/1:string:"ns0:population"
+range-0/0/2:string:"ns0:year"
+range-0/1/0:string:"Tokyo"
+range-0/1/1:numeric:13189000
+range-0/1/2:numeric:2011
+range-0/2/0:string:"New York City"
+range-0/2/1:numeric:8244910
+range-0/2/2:numeric:2011
+range-0/3/0:string:"London"
+range-0/3/1:numeric:8174100
+range-0/3/2:numeric:2011
diff --git a/test/xml-mapped/content-namespace/check.txt b/test/xml-mapped/content-namespace/check.txt
new file mode 100644
index 0000000..98d2013
--- /dev/null
+++ b/test/xml-mapped/content-namespace/check.txt
@@ -0,0 +1,13 @@
+data/0/0:string:"Sample data"
+data/2/0:string:"ns0:city"
+data/2/1:string:"ns0:population"
+data/2/2:string:"ns0:year"
+data/3/0:string:"Tokyo"
+data/3/1:numeric:13189000
+data/3/2:numeric:2011
+data/4/0:string:"New York City"
+data/4/1:numeric:8244910
+data/4/2:numeric:2011
+data/5/0:string:"London"
+data/5/1:numeric:8174100
+data/5/2:numeric:2011
diff --git a/test/xml-mapped/content-namespace/input.xml b/test/xml-mapped/content-namespace/input.xml
new file mode 100644
index 0000000..6e3c8b8
--- /dev/null
+++ b/test/xml-mapped/content-namespace/input.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<b:table xmlns:b="http://some-namespace" xmlns:skip="http://namespace-to-skip">
+ <b:title>Sample data</b:title>
+ <b:rows>
+ <b:row>
+ <b:city>Tokyo</b:city>
+ <b:population>13189000</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <b:row>
+ <b:city>New York City</b:city>
+ <b:population>8244910</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <b:row>
+ <b:city>London</b:city>
+ <b:population>8174100</b:population>
+ <b:year>2011</b:year>
+ </b:row>
+ <skip:row>
+ <b:city>Beijing</b:city>
+ <b:population>20180000</b:population>
+ <b:year>2011</b:year>
+ </skip:row>
+ </b:rows>
+</b:table>
diff --git a/test/xml-mapped/content-namespace/map.xml b/test/xml-mapped/content-namespace/map.xml
new file mode 100644
index 0000000..9cd4bed
--- /dev/null
+++ b/test/xml-mapped/content-namespace/map.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<map xmlns="http://gitorious.org/orcus/xml-map">
+ <ns alias="a" uri="http://some-namespace"/>
+ <sheet name="data"/>
+ <cell path="/a:table/a:title" row="0" column="0" sheet="data"/>
+ <range row="2" column="0" sheet="data">
+ <field path="/a:table/a:rows/a:row/a:city"/>
+ <field path="/a:table/a:rows/a:row/a:population"/>
+ <field path="/a:table/a:rows/a:row/a:year"/>
+ <row-group path="/a:table/a:rows/a:row"/>
+ </range>
+</map>