added merlin-c14n-two.tar.gz tests for
 c14n/exc-c14n and slightly modified test script to handle
 these test cases
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-09.xml b/test/c14n/exc-without-comments/merlin-c14n-two-09.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-09.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath
new file mode 100644
index 0000000..717b66a
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-09.xpath
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- everything -->
+              ancestor-or-self::bar:Something
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-10.xml b/test/c14n/exc-without-comments/merlin-c14n-two-10.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-10.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath
new file mode 100644
index 0000000..8ea2795
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-10.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              ((name() != "bar") or parent::bar:Something)  and
+              ((name() != "foo") or parent::foo:Something)  and
+              ((name() != "baz") or parent::baz:Something)  and
+              ((name() != "") or self::text())
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-11.xml b/test/c14n/exc-without-comments/merlin-c14n-two-11.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-11.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath
new file mode 100644
index 0000000..37d65e0
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-11.xpath
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-12.xml b/test/c14n/exc-without-comments/merlin-c14n-two-12.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-12.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath
new file mode 100644
index 0000000..ed8ae68
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-12.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements, or directly-used namespace nodes but not foo:Something -->
+              ancestor-or-self::bar:Something  and
+              not (self::foo:Something)  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-13.xml b/test/c14n/exc-without-comments/merlin-c14n-two-13.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-13.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath
new file mode 100644
index 0000000..7d0170b
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-13.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am not in my parent's namespace axis -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  !=
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-14.xml b/test/c14n/exc-without-comments/merlin-c14n-two-14.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-14.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath
new file mode 100644
index 0000000..2732894
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-14.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am text or have nonempty namespace URI -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != ""))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-15.xml b/test/c14n/exc-without-comments/merlin-c14n-two-15.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-15.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath
new file mode 100644
index 0000000..ae6589e
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-15.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  =
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-16.xml b/test/c14n/exc-without-comments/merlin-c14n-two-16.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-16.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath
new file mode 100644
index 0000000..bdca528
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-16.xpath
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (string(self::node()) = namespace-uri(parent::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-17.xml b/test/c14n/exc-without-comments/merlin-c14n-two-17.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-17.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath
new file mode 100644
index 0000000..24fdd3f
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-17.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes but the default on alternate elements -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               ((name() = "")  and
+                ((count(ancestor-or-self::node()) mod 2) = 1)))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-18.ns b/test/c14n/exc-without-comments/merlin-c14n-two-18.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-18.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-18.xml b/test/c14n/exc-without-comments/merlin-c14n-two-18.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-18.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath
new file mode 100644
index 0000000..717b66a
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-18.xpath
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- everything -->
+              ancestor-or-self::bar:Something
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-19.ns b/test/c14n/exc-without-comments/merlin-c14n-two-19.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-19.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-19.xml b/test/c14n/exc-without-comments/merlin-c14n-two-19.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-19.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath
new file mode 100644
index 0000000..8ea2795
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-19.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              ((name() != "bar") or parent::bar:Something)  and
+              ((name() != "foo") or parent::foo:Something)  and
+              ((name() != "baz") or parent::baz:Something)  and
+              ((name() != "") or self::text())
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-20.ns b/test/c14n/exc-without-comments/merlin-c14n-two-20.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-20.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-20.xml b/test/c14n/exc-without-comments/merlin-c14n-two-20.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-20.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath
new file mode 100644
index 0000000..37d65e0
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-20.xpath
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-21.ns b/test/c14n/exc-without-comments/merlin-c14n-two-21.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-21.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-21.xml b/test/c14n/exc-without-comments/merlin-c14n-two-21.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-21.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath
new file mode 100644
index 0000000..ed8ae68
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-21.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements, or directly-used namespace nodes but not foo:Something -->
+              ancestor-or-self::bar:Something  and
+              not (self::foo:Something)  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-22.ns b/test/c14n/exc-without-comments/merlin-c14n-two-22.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-22.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-22.xml b/test/c14n/exc-without-comments/merlin-c14n-two-22.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-22.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath
new file mode 100644
index 0000000..7d0170b
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-22.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am not in my parent's namespace axis -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  !=
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-23.ns b/test/c14n/exc-without-comments/merlin-c14n-two-23.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-23.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-23.xml b/test/c14n/exc-without-comments/merlin-c14n-two-23.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-23.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath
new file mode 100644
index 0000000..2732894
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-23.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am text or have nonempty namespace URI -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != ""))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-24.ns b/test/c14n/exc-without-comments/merlin-c14n-two-24.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-24.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-24.xml b/test/c14n/exc-without-comments/merlin-c14n-two-24.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-24.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath
new file mode 100644
index 0000000..ae6589e
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-24.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  =
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-25.ns b/test/c14n/exc-without-comments/merlin-c14n-two-25.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-25.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-25.xml b/test/c14n/exc-without-comments/merlin-c14n-two-25.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-25.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath
new file mode 100644
index 0000000..bdca528
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-25.xpath
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (string(self::node()) = namespace-uri(parent::node()))
+    ]
+</XPath>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-26.ns b/test/c14n/exc-without-comments/merlin-c14n-two-26.ns
new file mode 100644
index 0000000..3886aed
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-26.ns
@@ -0,0 +1 @@
+#default
\ No newline at end of file
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-26.xml b/test/c14n/exc-without-comments/merlin-c14n-two-26.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-26.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath b/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath
new file mode 100644
index 0000000..24fdd3f
--- /dev/null
+++ b/test/c14n/exc-without-comments/merlin-c14n-two-26.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes but the default on alternate elements -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               ((name() = "")  and
+                ((count(ancestor-or-self::node()) mod 2) = 1)))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-00.xml b/test/c14n/without-comments/merlin-c14n-two-00.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-00.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-00.xpath b/test/c14n/without-comments/merlin-c14n-two-00.xpath
new file mode 100644
index 0000000..717b66a
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-00.xpath
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- everything -->
+              ancestor-or-self::bar:Something
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-01.xml b/test/c14n/without-comments/merlin-c14n-two-01.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-01.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-01.xpath b/test/c14n/without-comments/merlin-c14n-two-01.xpath
new file mode 100644
index 0000000..8ea2795
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-01.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              ((name() != "bar") or parent::bar:Something)  and
+              ((name() != "foo") or parent::foo:Something)  and
+              ((name() != "baz") or parent::baz:Something)  and
+              ((name() != "") or self::text())
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-02.xml b/test/c14n/without-comments/merlin-c14n-two-02.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-02.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-02.xpath b/test/c14n/without-comments/merlin-c14n-two-02.xpath
new file mode 100644
index 0000000..37d65e0
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-02.xpath
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements or directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-03.xml b/test/c14n/without-comments/merlin-c14n-two-03.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-03.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-03.xpath b/test/c14n/without-comments/merlin-c14n-two-03.xpath
new file mode 100644
index 0000000..ed8ae68
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-03.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only text, elements, or directly-used namespace nodes but not foo:Something -->
+              ancestor-or-self::bar:Something  and
+              not (self::foo:Something)  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               (string(self::node()) = namespace-uri(parent::node())))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-04.xml b/test/c14n/without-comments/merlin-c14n-two-04.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-04.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-04.xpath b/test/c14n/without-comments/merlin-c14n-two-04.xpath
new file mode 100644
index 0000000..7d0170b
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-04.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am not in my parent's namespace axis -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  !=
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-05.xml b/test/c14n/without-comments/merlin-c14n-two-05.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-05.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-05.xpath b/test/c14n/without-comments/merlin-c14n-two-05.xpath
new file mode 100644
index 0000000..2732894
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-05.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes; I am text or have nonempty namespace URI -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != ""))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-06.xml b/test/c14n/without-comments/merlin-c14n-two-06.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-06.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-06.xpath b/test/c14n/without-comments/merlin-c14n-two-06.xpath
new file mode 100644
index 0000000..ae6589e
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-06.xpath
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (count(parent::node()/namespace::*)  =
+               count(parent::node()/namespace::* | self::node()))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-07.xml b/test/c14n/without-comments/merlin-c14n-two-07.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-07.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-07.xpath b/test/c14n/without-comments/merlin-c14n-two-07.xpath
new file mode 100644
index 0000000..bdca528
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-07.xpath
@@ -0,0 +1,9 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- only directly-used namespace nodes -->
+              ancestor-or-self::bar:Something  and
+              (string(self::node()) = namespace-uri(parent::node()))
+    ]
+</XPath>
diff --git a/test/c14n/without-comments/merlin-c14n-two-08.xml b/test/c14n/without-comments/merlin-c14n-two-08.xml
new file mode 100644
index 0000000..714c9d1
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-08.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<foo:Root xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xmlns="http://example.org/" xml:lang="en-ie">
+  <bar:Something>
+     <foo:Something>
+        <bar:Something>
+           <foo:Something>
+             <baz:Something />
+           </foo:Something>
+        </bar:Something>
+     </foo:Something>
+  </bar:Something>
+</foo:Root>
diff --git a/test/c14n/without-comments/merlin-c14n-two-08.xpath b/test/c14n/without-comments/merlin-c14n-two-08.xpath
new file mode 100644
index 0000000..24fdd3f
--- /dev/null
+++ b/test/c14n/without-comments/merlin-c14n-two-08.xpath
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<XPath xmlns:bar="http://example.org/bar" xmlns:baz="http://example.org/baz" xmlns:foo="http://example.org/foo" xml:lang="en-ie">
+    (//. | //@* | //namespace::*) 
+    [ 
+              <!-- no namespace nodes but the default on alternate elements -->
+              ancestor-or-self::bar:Something  and
+              (self::text()  or
+               (namespace-uri() != "")  or
+               ((name() = "")  and
+                ((count(ancestor-or-self::node()) mod 2) = 1)))
+    ]
+</XPath>