This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5385 - Calculation of line position in XHTML doc
Summary: Calculation of line position in XHTML doc
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Sean Owen
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-17 08:18 UTC by Dominique Hazael-Massieux
Modified: 2008-03-21 12:01 UTC (History)
0 users

See Also:


Attachments

Description Dominique Hazael-Massieux 2008-01-17 08:18:35 UTC
The library doesn't take into account the lines that appears before the <html> element to calculate the line position of an error, when the calculation is done on the tidied document.

Before the HTML element can appear:
* the XML declaration (on one or more lines)
* the doctype (on one or more lines)
* any number of white lines

This appears e.g. in MeasuresTest/2 where the lines are off by 1, and can be made off by X number of lines by adding an arbitrary number of lines between the XML declaration and the doctype.

To fence off this problem, we should record in <docContent> the line number at which the <html> element appears in the original document, if that's possible.
Comment 1 Sean Owen 2008-03-21 12:01:12 UTC
Fixed; <docContent> in moki now has a "rootElementLine" attribute which is then used to correctly calculate line numbers.