diff options
Diffstat (limited to 'test/xml-mapped/attribute-basic')
-rw-r--r-- | test/xml-mapped/attribute-basic/check-nomap.txt | 30 | ||||
-rw-r--r-- | test/xml-mapped/attribute-basic/check.txt | 34 | ||||
-rw-r--r-- | test/xml-mapped/attribute-basic/input.xml | 14 | ||||
-rw-r--r-- | test/xml-mapped/attribute-basic/map.xml | 16 |
4 files changed, 94 insertions, 0 deletions
diff --git a/test/xml-mapped/attribute-basic/check-nomap.txt b/test/xml-mapped/attribute-basic/check-nomap.txt new file mode 100644 index 0000000..d1bb6ef --- /dev/null +++ b/test/xml-mapped/attribute-basic/check-nomap.txt @@ -0,0 +1,30 @@ +range-0/0/0:string:"id" +range-0/0/1:string:"first-name" +range-0/0/2:string:"last-name" +range-0/0/3:string:"score" +range-0/0/4:string:"entry" +range-0/1/0:numeric:1 +range-0/1/1:string:"Bill" +range-0/1/2:string:"Clinton" +range-0/1/3:numeric:456 +range-0/1/4:string:"in" +range-0/2/0:numeric:2 +range-0/2/1:string:"David" +range-0/2/2:string:"Cameron" +range-0/2/3:numeric:323 +range-0/2/4:string:"out" +range-0/3/0:numeric:3 +range-0/3/1:string:"Barak" +range-0/3/2:string:"Obama" +range-0/3/3:numeric:234 +range-0/3/4:string:"unknown" +range-0/4/0:numeric:4 +range-0/4/1:string:"Yoshihiko" +range-0/4/2:string:"Noda" +range-0/4/3:numeric:192 +range-0/4/4:string:"in" +range-0/5/0:numeric:5 +range-0/5/1:string:"Angela" +range-0/5/2:string:"Merkel" +range-0/5/3:numeric:210 +range-0/5/4:string:"ask later" diff --git a/test/xml-mapped/attribute-basic/check.txt b/test/xml-mapped/attribute-basic/check.txt new file mode 100644 index 0000000..31fc805 --- /dev/null +++ b/test/xml-mapped/attribute-basic/check.txt @@ -0,0 +1,34 @@ +data/0/0:string:"TOP SECRET" +data/0/2:numeric:1.1 +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:"score" +data/3/4:string:"entry" +data/4/0:numeric:1 +data/4/1:string:"Bill" +data/4/2:string:"Clinton" +data/4/3:numeric:456 +data/4/4:string:"in" +data/5/0:numeric:2 +data/5/1:string:"David" +data/5/2:string:"Cameron" +data/5/3:numeric:323 +data/5/4:string:"out" +data/6/0:numeric:3 +data/6/1:string:"Barak" +data/6/2:string:"Obama" +data/6/3:numeric:234 +data/6/4:string:"unknown" +data/7/0:numeric:4 +data/7/1:string:"Yoshihiko" +data/7/2:string:"Noda" +data/7/3:numeric:192 +data/7/4:string:"in" +data/8/0:numeric:5 +data/8/1:string:"Angela" +data/8/2:string:"Merkel" +data/8/3:numeric:210 +data/8/4:string:"ask later" diff --git a/test/xml-mapped/attribute-basic/input.xml b/test/xml-mapped/attribute-basic/input.xml new file mode 100644 index 0000000..f19bc3f --- /dev/null +++ b/test/xml-mapped/attribute-basic/input.xml @@ -0,0 +1,14 @@ +<?xml version="1.0"?> +<data version="1.1"> + <header label="TOP SECRET">Simple Data File</header> + <entries> + <entry id="1" first-name="Bill" last-name="Clinton" score="456">in</entry> + <entry id="2" first-name="David" last-name="Cameron" score="323">out</entry> + <entry id="3" first-name="Barak" last-name="Obama" score="234">unknown</entry> + <entry id="4" first-name="Yoshihiko" last-name="Noda" score="192">in</entry> + <entry id="5" first-name="Angela" last-name="Merkel" score="210">ask later</entry> + </entries> + <footer date="2012-08-12"> + <extra>Not for distribution</extra> + </footer> +</data> diff --git a/test/xml-mapped/attribute-basic/map.xml b/test/xml-mapped/attribute-basic/map.xml new file mode 100644 index 0000000..97172f2 --- /dev/null +++ b/test/xml-mapped/attribute-basic/map.xml @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<map xmlns="http://gitorious.org/orcus/xml-map"> + <sheet name="data"/> + <cell path="/data/header/@label" row="0" column="0" sheet="data"/> + <cell path="/data/header" row="1" column="0" sheet="data"/> + <cell path="/data/footer/@date" row="1" column="2" sheet="data"/> + <cell path="/data/@version" row="0" column="2" sheet="data"/> + <range row="3" column="0" sheet="data"> + <field path="/data/entries/entry/@id"/> + <field path="/data/entries/entry/@first-name"/> + <field path="/data/entries/entry/@last-name"/> + <field path="/data/entries/entry/@score"/> + <field path="/data/entries/entry"/> + <row-group path="/data/entries/entry"/> + </range> +</map> |