Closed Bug 310582 Opened 19 years ago Closed 19 years ago

XHTML strict as XML should ignore invalid elements (center, font, etc)

Categories

(Core :: XML, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: aguertin+bugzilla, Unassigned)

References

()

Details

XHTML 1.0 strict and 1.1, when served as XML, should ignore elements and
attributes that only exist in transitional, just like unknown elements.
Not an HTML: Parser bug.
Assignee: mrbkap → xml
Component: HTML: Parser → XML
QA Contact: parser → ashshbhatt
What does "ignore" mean?  We're not a validating parser (so we don't error out due to the document not being valid per the doctype), and XML has no provisions for randomly "ignoring" elements -- they're just placed into the DOM when you parse it.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → INVALID
I meant that, e.g., <center> and <font>, which don't exist in XHTML 1.0 Strict or XHTML 1.1, should be treated as unknown elements and not center or fontify their contents.

This wouldn't require us to be a validating parser, and they'd still be added to the DOM.

Having thought about it more, though, they are technically part of the xhtml namespace, so I'm not sure if the bug is valid. 
Exactly.  The effect is just tied to the namespace+localname combination; once they're in the DOM they act like that no matter whether the document is XHTML Strict, XHTML Transitional, XUL, or whatever.
You need to log in before you can comment on or make changes to this bug.