Line numbers are not reported correctly in XHTML documents.
See failing expectations in:
Created attachment 59378 [details]
Layout Test for XHTML script line numbers
Please consider this bug available.
I ran into this problem while working on: https://bugs.webkit.org/show_bug.cgi?id=40649
I spent a little bit of time looking into a fix, but eventually gave up as libxml2 doesn't seem to be behaving the way we expect.
All of the following methods returned the total number of lines in the document, not the line at the current point:
I also tried setting context->linenumbers = 1 and lineNumbersDefault(1) during initialization, but to no avail.
So I'm just uploading my test case in the hopes that it might be helpful to someone who knows more about libxml2.
It's possible Qt may already pass this test since they have their own XML impl.
See also: bug 5206, bug 19800, bug 35451, bug 18855, bug 34078. Actually, bug 19800 has an XML test case.
The attached test case seems to work fine in Safari 5.1 (Web Inspector says that the exception was on line 25). Is there still something to investigate here?
The bugs I mentioned above are all still open, but I haven't attempted to reproduced them now.
Nothing left to do. Closing.