Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTML fragment parser creates a token which is only used for <annotation-xml encoding> #9428

Open
zcorpan opened this issue Jun 15, 2023 · 1 comment · May be fixed by #9430
Open

HTML fragment parser creates a token which is only used for <annotation-xml encoding> #9428

zcorpan opened this issue Jun 15, 2023 · 1 comment · May be fixed by #9430
Labels
clarification Standard could be clearer topic: parser

Comments

@zcorpan
Copy link
Member

zcorpan commented Jun 15, 2023

https://html.spec.whatwg.org/multipage/parsing.html#html-fragment-parsing-algorithm step 9 says

Create a start tag token whose name is the local name of context and whose attributes are the attributes of context.

Let this start tag token be the start tag token of the context node, e.g. for the purposes of determining if it is an HTML integration point.

I tried to find if the fake token here is used anywhere else, but I didn't find anything and so conclude that the HTML integration point check is the only place, which will only check the encoding attribute value if the context node is a MathML annotation-xml element.

I think the "e.g." phrasing suggests that there might be other consumers of the fake token, so at least making the remark say that the HTML integration point check is the only consumer would be good.

@zcorpan zcorpan added clarification Standard could be clearer topic: parser labels Jun 15, 2023
@annevk
Copy link
Member

annevk commented Jun 15, 2023

I'd like something like:

If the context node is the MathML annotation-xml element, then set its start tag token to a start tag token whose name is annotation-xml and attributes are the context node's attributes.

@zcorpan zcorpan linked a pull request Jun 15, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: parser
Development

Successfully merging a pull request may close this issue.

2 participants