summaryrefslogtreecommitdiff
path: root/tests/test_xpath_paths_w3c.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_xpath_paths_w3c.cpp')
-rw-r--r--tests/test_xpath_paths_w3c.cpp212
1 files changed, 106 insertions, 106 deletions
diff --git a/tests/test_xpath_paths_w3c.cpp b/tests/test_xpath_paths_w3c.cpp
index fb5bf6b..75b9637 100644
--- a/tests/test_xpath_paths_w3c.cpp
+++ b/tests/test_xpath_paths_w3c.cpp
@@ -7,10 +7,10 @@ TEST_XML(xpath_paths_w3c_1, "<node><para/><foo/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para");
- CHECK_XPATH_NODESET(n, "child::para") % 3 % 5;
+ CHECK_XPATH_NODESET(c, STR("child::para"));
+ CHECK_XPATH_NODESET(n, STR("child::para")) % 3 % 5;
}
TEST_XML(xpath_paths_w3c_2, "<node><para/><foo/><para/></node>")
@@ -18,10 +18,10 @@ TEST_XML(xpath_paths_w3c_2, "<node><para/><foo/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::*");
- CHECK_XPATH_NODESET(n, "child::*") % 3 % 4 % 5;
+ CHECK_XPATH_NODESET(c, STR("child::*"));
+ CHECK_XPATH_NODESET(n, STR("child::*")) % 3 % 4 % 5;
}
TEST_XML(xpath_paths_w3c_3, "<node>pcdata<child/><![CDATA[cdata]]></node>")
@@ -29,10 +29,10 @@ TEST_XML(xpath_paths_w3c_3, "<node>pcdata<child/><![CDATA[cdata]]></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::text()");
- CHECK_XPATH_NODESET(n, "child::text()") % 3 % 5;
+ CHECK_XPATH_NODESET(c, STR("child::text()"));
+ CHECK_XPATH_NODESET(n, STR("child::text()")) % 3 % 5;
}
TEST_XML(xpath_paths_w3c_4, "<node>pcdata<child/><![CDATA[cdata]]></node>")
@@ -40,10 +40,10 @@ TEST_XML(xpath_paths_w3c_4, "<node>pcdata<child/><![CDATA[cdata]]></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::node()");
- CHECK_XPATH_NODESET(n, "child::node()") % 3 % 4 % 5;
+ CHECK_XPATH_NODESET(c, STR("child::node()"));
+ CHECK_XPATH_NODESET(n, STR("child::node()")) % 3 % 4 % 5;
}
TEST_XML(xpath_paths_w3c_5, "<node name='value' foo='bar' />")
@@ -51,10 +51,10 @@ TEST_XML(xpath_paths_w3c_5, "<node name='value' foo='bar' />")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "attribute::name");
- CHECK_XPATH_NODESET(n, "attribute::name") % 3;
+ CHECK_XPATH_NODESET(c, STR("attribute::name"));
+ CHECK_XPATH_NODESET(n, STR("attribute::name")) % 3;
}
TEST_XML(xpath_paths_w3c_6, "<node name='value' foo='bar' />")
@@ -62,10 +62,10 @@ TEST_XML(xpath_paths_w3c_6, "<node name='value' foo='bar' />")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "attribute::*");
- CHECK_XPATH_NODESET(n, "attribute::*") % 3 % 4;
+ CHECK_XPATH_NODESET(c, STR("attribute::*"));
+ CHECK_XPATH_NODESET(n, STR("attribute::*")) % 3 % 4;
}
TEST_XML(xpath_paths_w3c_7, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -73,11 +73,11 @@ TEST_XML(xpath_paths_w3c_7, "<node><para><para/><para/><foo><para/></foo></para>
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "descendant::para");
- CHECK_XPATH_NODESET(n, "descendant::para") % 3 % 4 % 5 % 7 % 9;
- CHECK_XPATH_NODESET(n.child("para"), "descendant::para") % 4 % 5 % 7;
+ CHECK_XPATH_NODESET(c, STR("descendant::para"));
+ CHECK_XPATH_NODESET(n, STR("descendant::para")) % 3 % 4 % 5 % 7 % 9;
+ CHECK_XPATH_NODESET(n.child(STR("para")), STR("descendant::para")) % 4 % 5 % 7;
}
TEST_XML(xpath_paths_w3c_8, "<node><div><font><div><div/></div></font></div></node>")
@@ -85,10 +85,10 @@ TEST_XML(xpath_paths_w3c_8, "<node><div><font><div><div/></div></font></div></no
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "ancestor::div");
- CHECK_XPATH_NODESET(n.child("div").child("font").child("div").child("div"), "ancestor::div") % 5 % 3;
+ CHECK_XPATH_NODESET(c, STR("ancestor::div"));
+ CHECK_XPATH_NODESET(n.child(STR("div")).child(STR("font")).child(STR("div")).child(STR("div")), STR("ancestor::div")) % 5 % 3;
}
TEST_XML(xpath_paths_w3c_9, "<node><div><font><div><div/></div></font></div></node>")
@@ -96,10 +96,10 @@ TEST_XML(xpath_paths_w3c_9, "<node><div><font><div><div/></div></font></div></no
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "ancestor-or-self::div");
- CHECK_XPATH_NODESET(n.child("div").child("font").child("div").child("div"), "ancestor-or-self::div") % 6 % 5 % 3;
+ CHECK_XPATH_NODESET(c, STR("ancestor-or-self::div"));
+ CHECK_XPATH_NODESET(n.child(STR("div")).child(STR("font")).child(STR("div")).child(STR("div")), STR("ancestor-or-self::div")) % 6 % 5 % 3;
}
TEST_XML(xpath_paths_w3c_10, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -107,11 +107,11 @@ TEST_XML(xpath_paths_w3c_10, "<node><para><para/><para/><foo><para/></foo></para
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "descendant-or-self::para");
- CHECK_XPATH_NODESET(n, "descendant-or-self::para") % 3 % 4 % 5 % 7 % 9;
- CHECK_XPATH_NODESET(n.child("para"), "descendant-or-self::para") % 3 % 4 % 5 % 7;
+ CHECK_XPATH_NODESET(c, STR("descendant-or-self::para"));
+ CHECK_XPATH_NODESET(n, STR("descendant-or-self::para")) % 3 % 4 % 5 % 7 % 9;
+ CHECK_XPATH_NODESET(n.child(STR("para")), STR("descendant-or-self::para")) % 3 % 4 % 5 % 7;
}
TEST_XML(xpath_paths_w3c_11, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -119,11 +119,11 @@ TEST_XML(xpath_paths_w3c_11, "<node><para><para/><para/><foo><para/></foo></para
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "self::para");
- CHECK_XPATH_NODESET(n, "self::para");
- CHECK_XPATH_NODESET(n.child("para"), "self::para") % 3;
+ CHECK_XPATH_NODESET(c, STR("self::para"));
+ CHECK_XPATH_NODESET(n, STR("self::para"));
+ CHECK_XPATH_NODESET(n.child(STR("para")), STR("self::para")) % 3;
}
TEST_XML(xpath_paths_w3c_12, "<chapter><para><para/><para/><foo><para/></foo></para><foo/><para/></chapter>")
@@ -132,8 +132,8 @@ TEST_XML(xpath_paths_w3c_12, "<chapter><para><para/><para/><foo><para/></foo></p
xml_node c;
- CHECK_XPATH_NODESET(c, "child::chapter/descendant::para");
- CHECK_XPATH_NODESET(doc, "child::chapter/descendant::para") % 3 % 4 % 5 % 7 % 9;
+ CHECK_XPATH_NODESET(c, STR("child::chapter/descendant::para"));
+ CHECK_XPATH_NODESET(doc, STR("child::chapter/descendant::para")) % 3 % 4 % 5 % 7 % 9;
}
TEST_XML(xpath_paths_w3c_13, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -142,8 +142,8 @@ TEST_XML(xpath_paths_w3c_13, "<node><para><para/><para/><foo><para/></foo></para
xml_node c;
- CHECK_XPATH_NODESET(c, "child::*/child::para");
- CHECK_XPATH_NODESET(doc, "child::*/child::para") % 3 % 9;
+ CHECK_XPATH_NODESET(c, STR("child::*/child::para"));
+ CHECK_XPATH_NODESET(doc, STR("child::*/child::para")) % 3 % 9;
}
TEST_XML(xpath_paths_w3c_14, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -151,13 +151,13 @@ TEST_XML(xpath_paths_w3c_14, "<node><para><para/><para/><foo><para/></foo></para
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "/");
+ CHECK_XPATH_NODESET(c, STR("/"));
- CHECK_XPATH_NODESET(doc, "/") % 1;
- CHECK_XPATH_NODESET(n, "/") % 1;
- CHECK_XPATH_NODESET(n.child("para"), "/") % 1;
+ CHECK_XPATH_NODESET(doc, STR("/")) % 1;
+ CHECK_XPATH_NODESET(n, STR("/")) % 1;
+ CHECK_XPATH_NODESET(n.child(STR("para")), STR("/")) % 1;
}
TEST_XML(xpath_paths_w3c_15, "<node><para><para/><para/><foo><para/></foo></para><foo/><para/></node>")
@@ -165,11 +165,11 @@ TEST_XML(xpath_paths_w3c_15, "<node><para><para/><para/><foo><para/></foo></para
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "/descendant::para");
- CHECK_XPATH_NODESET(n, "/descendant::para") % 3 % 4 % 5 % 7 % 9;
- CHECK_XPATH_NODESET(n.child("para"), "/descendant::para") % 3 % 4 % 5 % 7 % 9;
+ CHECK_XPATH_NODESET(c, STR("/descendant::para"));
+ CHECK_XPATH_NODESET(n, STR("/descendant::para")) % 3 % 4 % 5 % 7 % 9;
+ CHECK_XPATH_NODESET(n.child(STR("para")), STR("/descendant::para")) % 3 % 4 % 5 % 7 % 9;
}
TEST_XML(xpath_paths_w3c_16, "<node><olist><item/></olist><item/><olist><olist><item/><item/></olist></olist></node>")
@@ -177,11 +177,11 @@ TEST_XML(xpath_paths_w3c_16, "<node><olist><item/></olist><item/><olist><olist><
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "/descendant::olist/child::item");
- CHECK_XPATH_NODESET(n, "/descendant::olist/child::item") % 4 % 8 % 9;
- CHECK_XPATH_NODESET(n.child("olist"), "/descendant::olist/child::item") % 4 % 8 % 9;
+ CHECK_XPATH_NODESET(c, STR("/descendant::olist/child::item"));
+ CHECK_XPATH_NODESET(n, STR("/descendant::olist/child::item")) % 4 % 8 % 9;
+ CHECK_XPATH_NODESET(n.child(STR("olist")), STR("/descendant::olist/child::item")) % 4 % 8 % 9;
}
TEST_XML(xpath_paths_w3c_17, "<node><para/><para/><para/><para/></node>")
@@ -189,10 +189,10 @@ TEST_XML(xpath_paths_w3c_17, "<node><para/><para/><para/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()=1]");
- CHECK_XPATH_NODESET(n, "child::para[position()=1]") % 3;
+ CHECK_XPATH_NODESET(c, STR("child::para[position()=1]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()=1]")) % 3;
}
TEST_XML(xpath_paths_w3c_18, "<node><para/><para/><para/><para/></node>")
@@ -200,10 +200,10 @@ TEST_XML(xpath_paths_w3c_18, "<node><para/><para/><para/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()=last()]");
- CHECK_XPATH_NODESET(n, "child::para[position()=last()]") % 6;
+ CHECK_XPATH_NODESET(c, STR("child::para[position()=last()]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()=last()]")) % 6;
}
TEST_XML(xpath_paths_w3c_19, "<node><para/><para/><para/><para/></node>")
@@ -211,10 +211,10 @@ TEST_XML(xpath_paths_w3c_19, "<node><para/><para/><para/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()=last()-1]");
- CHECK_XPATH_NODESET(n, "child::para[position()=last()-1]") % 5;
+ CHECK_XPATH_NODESET(c, STR("child::para[position()=last()-1]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()=last()-1]")) % 5;
}
TEST_XML(xpath_paths_w3c_20, "<node><para/><para/><para/><para/></node>")
@@ -222,10 +222,10 @@ TEST_XML(xpath_paths_w3c_20, "<node><para/><para/><para/><para/></node>")
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()>1]");
- CHECK_XPATH_NODESET(n, "child::para[position()>1]") % 4 % 5 % 6;
+ CHECK_XPATH_NODESET(c, STR("child::para[position()>1]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()>1]")) % 4 % 5 % 6;
}
TEST_XML(xpath_paths_w3c_21, "<node><chapter/><chapter/><chapter/><chapter/><chapter/></node>")
@@ -233,10 +233,10 @@ TEST_XML(xpath_paths_w3c_21, "<node><chapter/><chapter/><chapter/><chapter/><cha
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node").child("chapter").next_sibling().next_sibling();
+ xml_node n = doc.child(STR("node")).child(STR("chapter")).next_sibling().next_sibling();
- CHECK_XPATH_NODESET(c, "following-sibling::chapter[position()=1]");
- CHECK_XPATH_NODESET(n, "following-sibling::chapter[position()=1]") % 6;
+ CHECK_XPATH_NODESET(c, STR("following-sibling::chapter[position()=1]"));
+ CHECK_XPATH_NODESET(n, STR("following-sibling::chapter[position()=1]")) % 6;
}
TEST_XML(xpath_paths_w3c_22, "<node><chapter/><chapter/><chapter/><chapter/><chapter/></node>")
@@ -244,10 +244,10 @@ TEST_XML(xpath_paths_w3c_22, "<node><chapter/><chapter/><chapter/><chapter/><cha
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node").child("chapter").next_sibling().next_sibling();
+ xml_node n = doc.child(STR("node")).child(STR("chapter")).next_sibling().next_sibling();
- CHECK_XPATH_NODESET(c, "preceding-sibling::chapter[position()=1]");
- CHECK_XPATH_NODESET(n, "preceding-sibling::chapter[position()=1]") % 4;
+ CHECK_XPATH_NODESET(c, STR("preceding-sibling::chapter[position()=1]"));
+ CHECK_XPATH_NODESET(n, STR("preceding-sibling::chapter[position()=1]")) % 4;
}
TEST_XML(xpath_paths_w3c_23, "<node><figure><figure/><figure/><foo><figure/></foo></figure><foo/><figure/></node>")
@@ -255,11 +255,11 @@ TEST_XML(xpath_paths_w3c_23, "<node><figure><figure/><figure/><foo><figure/></fo
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "/descendant::figure[position()=4]");
- CHECK_XPATH_NODESET(n, "/descendant::figure[position()=4]") % 7;
- CHECK_XPATH_NODESET(n.child("figure"), "/descendant::figure[position()=4]") % 7;
+ CHECK_XPATH_NODESET(c, STR("/descendant::figure[position()=4]"));
+ CHECK_XPATH_NODESET(n, STR("/descendant::figure[position()=4]")) % 7;
+ CHECK_XPATH_NODESET(n.child(STR("figure")), STR("/descendant::figure[position()=4]")) % 7;
}
TEST_XML(xpath_paths_w3c_24, "<doc><chapter/><chapter/><chapter/><chapter/><chapter><section/><section/><section/></chapter><chapter/></doc>")
@@ -267,11 +267,11 @@ TEST_XML(xpath_paths_w3c_24, "<doc><chapter/><chapter/><chapter/><chapter/><chap
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("doc").child("chapter");
+ xml_node n = doc.child(STR("doc")).child(STR("chapter"));
- CHECK_XPATH_NODESET(c, "/child::doc/child::chapter[position()=5]/child::section[position()=2]");
- CHECK_XPATH_NODESET(n, "/child::doc/child::chapter[position()=5]/child::section[position()=2]") % 9;
- CHECK_XPATH_NODESET(doc, "/child::doc/child::chapter[position()=5]/child::section[position()=2]") % 9;
+ CHECK_XPATH_NODESET(c, STR("/child::doc/child::chapter[position()=5]/child::section[position()=2]"));
+ CHECK_XPATH_NODESET(n, STR("/child::doc/child::chapter[position()=5]/child::section[position()=2]")) % 9;
+ CHECK_XPATH_NODESET(doc, STR("/child::doc/child::chapter[position()=5]/child::section[position()=2]")) % 9;
}
TEST_XML(xpath_paths_w3c_25, "<node><para/><para type='warning'/><para type='warning'/><para/><para type='error'/><para type='warning'/><para type='warning'/><para type='warning'/></node>")
@@ -279,10 +279,10 @@ TEST_XML(xpath_paths_w3c_25, "<node><para/><para type='warning'/><para type='war
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[attribute::type=\"warning\"]");
- CHECK_XPATH_NODESET(n, "child::para[attribute::type=\"warning\"]") % 4 % 6 % 11 % 13 % 15;
+ CHECK_XPATH_NODESET(c, STR("child::para[attribute::type=\"warning\"]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[attribute::type=\"warning\"]")) % 4 % 6 % 11 % 13 % 15;
}
TEST_XML(xpath_paths_w3c_26, "<node><para/><para type='warning'/><para type='warning'/><para/><para type='error'/><para type='warning'/><para type='warning'/><para type='warning'/></node>")
@@ -290,10 +290,10 @@ TEST_XML(xpath_paths_w3c_26, "<node><para/><para type='warning'/><para type='war
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[attribute::type=\"warning\"][position()=5]");
- CHECK_XPATH_NODESET(n, "child::para[attribute::type=\"warning\"][position()=5]") % 15;
+ CHECK_XPATH_NODESET(c, STR("child::para[attribute::type=\"warning\"][position()=5]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[attribute::type=\"warning\"][position()=5]")) % 15;
}
TEST_XML(xpath_paths_w3c_27a, "<node><para/><para type='warning'/><para type='warning'/><para/><para type='error'/><para type='warning'/><para type='warning'/><para type='warning'/></node>")
@@ -301,10 +301,10 @@ TEST_XML(xpath_paths_w3c_27a, "<node><para/><para type='warning'/><para type='wa
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()=5][attribute::type=\"warning\"]");
- CHECK_XPATH_NODESET(n, "child::para[position()=5][attribute::type=\"warning\"]");
+ CHECK_XPATH_NODESET(c, STR("child::para[position()=5][attribute::type=\"warning\"]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()=5][attribute::type=\"warning\"]"));
}
TEST_XML(xpath_paths_w3c_27b, "<node><para/><para type='warning'/><para type='warning'/><para/><para type='warning'/><para type='warning'/><para type='warning'/></node>")
@@ -312,10 +312,10 @@ TEST_XML(xpath_paths_w3c_27b, "<node><para/><para type='warning'/><para type='wa
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::para[position()=5][attribute::type=\"warning\"]");
- CHECK_XPATH_NODESET(n, "child::para[position()=5][attribute::type=\"warning\"]") % 9;
+ CHECK_XPATH_NODESET(c, STR("child::para[position()=5][attribute::type=\"warning\"]"));
+ CHECK_XPATH_NODESET(n, STR("child::para[position()=5][attribute::type=\"warning\"]")) % 9;
}
TEST_XML(xpath_paths_w3c_28, "<node><chapter><title>foo</title></chapter><chapter><title>Introduction</title></chapter><chapter><title>introduction</title></chapter><chapter/><chapter><title>Introduction</title><title>foo</title></chapter></node>")
@@ -323,10 +323,10 @@ TEST_XML(xpath_paths_w3c_28, "<node><chapter><title>foo</title></chapter><chapte
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::chapter[child::title='Introduction']");
- CHECK_XPATH_NODESET(n, "child::chapter[child::title='Introduction']") % 6 % 13;
+ CHECK_XPATH_NODESET(c, STR("child::chapter[child::title='Introduction']"));
+ CHECK_XPATH_NODESET(n, STR("child::chapter[child::title='Introduction']")) % 6 % 13;
}
TEST_XML(xpath_paths_w3c_29, "<node><chapter><title>foo</title></chapter><chapter><title>Introduction</title></chapter><chapter><title>introduction</title></chapter><chapter/><chapter><title>Introduction</title><title>foo</title></chapter></node>")
@@ -334,10 +334,10 @@ TEST_XML(xpath_paths_w3c_29, "<node><chapter><title>foo</title></chapter><chapte
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::chapter[child::title]");
- CHECK_XPATH_NODESET(n, "child::chapter[child::title]") % 3 % 6 % 9 % 13;
+ CHECK_XPATH_NODESET(c, STR("child::chapter[child::title]"));
+ CHECK_XPATH_NODESET(n, STR("child::chapter[child::title]")) % 3 % 6 % 9 % 13;
}
TEST_XML(xpath_paths_w3c_30, "<node><abstract/><chapter/><chapter/><references/><appendix/></node>")
@@ -345,10 +345,10 @@ TEST_XML(xpath_paths_w3c_30, "<node><abstract/><chapter/><chapter/><references/>
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::*[self::chapter or self::appendix]");
- CHECK_XPATH_NODESET(n, "child::*[self::chapter or self::appendix]") % 4 % 5 % 7;
+ CHECK_XPATH_NODESET(c, STR("child::*[self::chapter or self::appendix]"));
+ CHECK_XPATH_NODESET(n, STR("child::*[self::chapter or self::appendix]")) % 4 % 5 % 7;
}
TEST_XML(xpath_paths_w3c_31a, "<node><abstract/><chapter/><chapter/><references/><appendix/></node>")
@@ -356,10 +356,10 @@ TEST_XML(xpath_paths_w3c_31a, "<node><abstract/><chapter/><chapter/><references/
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::*[self::chapter or self::appendix][position()=last()]");
- CHECK_XPATH_NODESET(n, "child::*[self::chapter or self::appendix][position()=last()]") % 7;
+ CHECK_XPATH_NODESET(c, STR("child::*[self::chapter or self::appendix][position()=last()]"));
+ CHECK_XPATH_NODESET(n, STR("child::*[self::chapter or self::appendix][position()=last()]")) % 7;
}
TEST_XML(xpath_paths_w3c_31b, "<node><abstract/><chapter/><chapter/><references/><appendix/><chapter/></node>")
@@ -367,10 +367,10 @@ TEST_XML(xpath_paths_w3c_31b, "<node><abstract/><chapter/><chapter/><references/
doc.precompute_document_order();
xml_node c;
- xml_node n = doc.child("node");
+ xml_node n = doc.child(STR("node"));
- CHECK_XPATH_NODESET(c, "child::*[self::chapter or self::appendix][position()=last()]");
- CHECK_XPATH_NODESET(n, "child::*[self::chapter or self::appendix][position()=last()]") % 8;
+ CHECK_XPATH_NODESET(c, STR("child::*[self::chapter or self::appendix][position()=last()]"));
+ CHECK_XPATH_NODESET(n, STR("child::*[self::chapter or self::appendix][position()=last()]")) % 8;
}
#endif