PASS DOM.evaluate("last()", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 1
PASS DOM.evaluate("position()", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 1
PASS DOM.evaluate("count(/ROOT | /ROOT/CHILD1)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 2
FAIL id(1) incorrect length (expected 1, actual 0)
FAIL id('1 1') incorrect length (expected 1, actual 0)
PASS id('0')
FAIL id('0 1') incorrect length (expected 1, actual 0)
FAIL id('0 1 1') incorrect length (expected 1, actual 0)
FAIL id('0 0 1 1') incorrect length (expected 1, actual 0)
PASS DOM.evaluate("local-name(/empty)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("local-name(//f:CHILD3)", CHILD1, nsResolver, XPathResult.ANY_TYPE, null).stringValue is "CHILD3"
PASS DOM.evaluate("namespace-uri(/empty)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("namespace-uri(//f:CHILD3)", CHILD1, nsResolver, XPathResult.ANY_TYPE, null).stringValue is "http://foo.com"
PASS DOM.evaluate("name(//f:CHILD3)", CHILD1, nsResolver, XPathResult.ANY_TYPE, null).stringValue is "foo:CHILD3"
PASS DOM.evaluate("string(//CHILD1)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is strNodeset3
PASS DOM.evaluate("concat(//CHILD1, '3.14', 'Hi')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is strNodeset3 + "3.14Hi"
PASS DOM.evaluate("starts-with(//CHILD1, '3.14')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("starts-with(//CHILD1, //CHILD1)", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("starts-with(//CHILD1, '')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("contains(//CHILD1, '3.14')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("contains(//CHILD1, //CHILD1)", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("contains(//CHILD1, '')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("substring-before('3.14Hi', 'Hi')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "3.14"
PASS DOM.evaluate("substring-before('3.14Hi', '')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("substring-after('3.14Hi', '3.14')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "Hi"
PASS DOM.evaluate("substring-after('3.14Hi', '')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "3.14Hi"
PASS DOM.evaluate("substring('3.14Hi', '3.14')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "14Hi"
PASS DOM.evaluate("substring('3.14Hi', '3.14', 1)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "1"
PASS DOM.evaluate("substring('12345', 2, 3)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "234"
PASS DOM.evaluate("substring('12345', 2)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "2345"
PASS DOM.evaluate("substring('12345', 1.5, 2.6)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "234"
PASS DOM.evaluate("substring('12345', 0, 3)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "12"
PASS DOM.evaluate("substring('12345', number('NaN'), 3)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("substring('12345', 1, number('NaN'))", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("substring('12345', -42, 1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "12345"
PASS DOM.evaluate("substring('12345', -1 div 0, 1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is ""
PASS DOM.evaluate("string-length('3.14Hi')", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 6
PASS DOM.evaluate("normalize-space('Ht    	 There	   Mike')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "Ht There Mike"
PASS DOM.evaluate("translate('Ht    	 There	   Mike', 'abcdefg', 'ABCDEFG')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "Ht    	 ThErE	   MikE"
PASS DOM.evaluate("translate('hello world', 'e', 'a')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "hallo world"
PASS DOM.evaluate("translate('hello world', 'e', 'abc')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "hallo world"
PASS DOM.evaluate("translate('hello world', 'el', 'a')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "hao word"
PASS DOM.evaluate("translate('hello world', 'abcdefgabc', 'ABCDEFG123')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "hEllo worlD"
PASS DOM.evaluate("translate('hello world', 'abcdefghhe', 'ABCDEFGH')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "HEllo worlD"
PASS DOM.evaluate("translate('hello world', 'abcdefgh', '')", CHILD1, null, XPathResult.ANY_TYPE, null).stringValue is "llo worl"
PASS DOM.evaluate("boolean('3.14')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("not('3.14Hi')", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("true()", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("false()", CHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("number('NaN')", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is NaN
PASS DOM.evaluate("floor(3.14)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 3
PASS DOM.evaluate("floor(number())", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is NaN
PASS DOM.evaluate("floor(1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is Infinity
PASS DOM.evaluate("floor(-1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is -Infinity
PASS DOM.evaluate("floor(0.5)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 0
PASS DOM.evaluate("floor(-0.5)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is -1
PASS DOM.evaluate("ceiling(3.14)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 4
PASS DOM.evaluate("ceiling(number('NaN'))", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is NaN
PASS DOM.evaluate("ceiling(1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is Infinity
PASS DOM.evaluate("ceiling(0.5)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 1
PASS DOM.evaluate("ceiling(-0.5)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is -0
PASS DOM.evaluate("round(3.14)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 3
PASS DOM.evaluate("round(-4.5)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is -4
PASS DOM.evaluate("round(number('NaN'))", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is NaN
PASS DOM.evaluate("round(1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is Infinity
PASS DOM.evaluate("round(-1 div 0)", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is -Infinity
PASS DOM.evaluate("round('12345')", CHILD1, null, XPathResult.ANY_TYPE, null).numberValue is 12345
PASS DOM.evaluate("lang('en')", LCHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("lang('en')", LCHILD2, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("lang('')", LCHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is true
PASS DOM.evaluate("lang('')", LCHILD2, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("lang('foo')", LCHILD1, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS DOM.evaluate("lang('foo')", LCHILD2, null, XPathResult.ANY_TYPE, null).booleanValue is false
PASS successfullyParsed is true

TEST COMPLETE

