Open Bug 940243 Opened 11 years ago Updated 2 years ago

XML View Source flags doctype after an XML declaration as an error

Categories

(Core :: DOM: HTML Parser, defect, P3)

defect

Tracking

()

People

(Reporter: hsivonen, Unassigned)

References

()

Details

From http://stackoverflow.com/questions/19849648/stray-doctype-error-in-firefox-source-code-viewer

View Source marks the doctype as an error. It shouldn't.
Hi,

The same issue occurs for an XML document using an XSL to produce HTML.
First the DOCTYPE is flagged as "stray doctype" in the source viewer.
I commented it out, and then I got a console error for the XSL line:
> InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable

A second problem (maybe a consequence) is that relative links don't work correctly for XML+XSL producing HTML output.

Example: http://www.growthcharts.info/support/helpfiles/growthcharts.xml#faq
When the page is loaded, the link doesn't work. 
Then, if you click on the link address bar and hit Enter again, it goes straight to the right place.

Thanks,
Marius
Assignee: hsivonen → nobody
Priority: -- → P3

The same issue occurs if BOM (the byte order mark) of UTF-8 is set at the HTML start twice. Which can be produced by server scripts including (line include or require statements in PHP).

(In reply to arcadius from comment #2)

The same issue occurs if BOM (the byte order mark) of UTF-8 is set at the HTML start twice. Which can be produced by server scripts including (line include or require statements in PHP).

That's an actual error and should be flagged as such.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.