Showing posts with label xpath. Show all posts
Showing posts with label xpath. Show all posts

Monday, October 8, 2007

XPath Functional Test

I wrote XPath Functional Test for HTML.

XPath Functional Test

Now, I found some bugs in XPath Engine of Browsers.

Try it.

Friday, October 5, 2007

Bug in XPath Engine of Safari 3.0

The pipe "|" operator after Predicate is ignored.

Example:

// 2
alert(
  document.evaluate(
    '//body | //head', document, null, 7, null).snapshotLength
);

// expected 2 but actually 1
alert(
  document.evaluate(
    '//body[.] | //head', document, null, 7, null).snapshotLength
);

The "string-after" function gets wrong string.

Example:

// expected "d" actually "cd"
alert(
  document.evaluate(
    'substring-after("abcd","bc")', document, null, 2, null).stringValue
);