You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
meiqinyan opened this issue
Feb 13, 2025
· 1 comment
Assignees
Labels
BugSomething that doesn't work in the current specificationEditorialMinor typos, wording clarifications, example fixes, etc.XQFOAn issue related to Functions and Operators
There is an apparent ambiguity in the XPath Functions specification as to whether fn:parse-html raises dynamic error err:FODC0011 when html-version is set to one of the HTML5 versions and the content of $html is not well-formed, given the general expectation that HTML5 parsers can always parse an input string regardless of syntactic validity.
The HTML5 standard, for its part, has actually always allowed the parser to be aborted upon encountering a parse error (though no browser does this), so the function definition would seem to require that parse-html("<p>Hello</p>", { "method": "html", "html-version": 5 }) invariably raises an error, given that the input is invalid (missing opening <html> tag, etc.).
I don't think this is the intended behavior; my suggestion is to either have it be explicitly implementation-defined as to which parse errors cause err:FODC0011 to be raised, or require that it is never raised for HTML5.
The text was updated successfully, but these errors were encountered:
There is also the question of invalid (but parseable) HTML5 constructs that are incoherent with XML, such as the use of < and : in tag and attribute names.
ChristianGruen
added
Bug
Something that doesn't work in the current specification
XQFO
An issue related to Functions and Operators
Editorial
Minor typos, wording clarifications, example fixes, etc.
labels
Feb 22, 2025
BugSomething that doesn't work in the current specificationEditorialMinor typos, wording clarifications, example fixes, etc.XQFOAn issue related to Functions and Operators
There is an apparent ambiguity in the XPath Functions specification as to whether
fn:parse-html
raises dynamic error err:FODC0011 whenhtml-version
is set to one of the HTML5 versions and the content of$html
is not well-formed, given the general expectation that HTML5 parsers can always parse an input string regardless of syntactic validity.The HTML5 standard, for its part, has actually always allowed the parser to be aborted upon encountering a parse error (though no browser does this), so the function definition would seem to require that
parse-html("<p>Hello</p>", { "method": "html", "html-version": 5 })
invariably raises an error, given that the input is invalid (missing opening<html>
tag, etc.).I don't think this is the intended behavior; my suggestion is to either have it be explicitly implementation-defined as to which parse errors cause err:FODC0011 to be raised, or require that it is never raised for HTML5.
The text was updated successfully, but these errors were encountered: