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

"origin" missing from HTML spec #807

Closed
jyasskin opened this issue Nov 29, 2022 · 3 comments
Closed

"origin" missing from HTML spec #807

jyasskin opened this issue Nov 29, 2022 · 3 comments

Comments

@jyasskin
Copy link
Member

7bfd13c#diff-f329e3f05c7626cf44bf8ed92ba9f20df3c6a2bd7ef3f3f966f6583afa3508d2L55045 removed the "origin" term from HTML even though it's still defined at the same URL. This was the first run with reffy 10.3.0, and w3c/reffy#1120 looks maybe-related.

@tidoust
Copy link
Member

tidoust commented Nov 29, 2022

Interesting. This is rather linked to w3c/reffy#1110, which introduced logic to eliminate duplicate definitions (feature released in the same version 10.3.0).

The term "origin" has more than one generic (i.e. not namespaced to any other construct) definition in HTML:

Our code just keeps the former one, and more or less silently discards the latter one (it outputs a warning in the logs but that's typically something we fail to look at).

Our assumption was that specs would never define the exact same term twice. There are a number (about 145) of such occurrences in HTML though ("origin", "ltr", "rtl", "geo", "captions", "descriptions", etc.). Looking at these terms, I see that all of them have only one exported definition, all other definitions being internal to the spec. That seems good.

So the valid assumption should rather be that there is always only one exported definition of a given term. If there are multiple internal definitions of the same term, that does not seem fantastic to me, but that's the spec's problem, and more importantly it won't crash ReSpec since it only considers exported terms. I'll update the logic in Reffy accordingly.

FWIW, there is actually one term that is exported twice in HTML: the span IDL attribute for HTMLTableColElement:
https://html.spec.whatwg.org/multipage/tables.html#dom-colgroup-span
https://html.spec.whatwg.org/multipage/tables.html#dom-col-span
... but I suspect the latter is a leftover from a copy and paste, and needs to be removed.

tidoust added a commit to w3c/reffy that referenced this issue Nov 29, 2022
See w3c/webref#807 for context.

Reffy assumed that specs would define a term only once. The HTML spec has many
internal re-definitions of the same term. That's probably not fantastic, but not
fully wrong either, and references link to the right definition each time.

This adjusts the assumption to "specs export a term only once". Private
definitions are left intact (and these duplicates will re-appear in the
extracts).
tidoust added a commit to w3c/reffy that referenced this issue Nov 30, 2022
See w3c/webref#807 for context.

Reffy assumed that specs would define a term only once. The HTML spec has many
internal re-definitions of the same term. That's probably not fantastic, but not
fully wrong either, and references link to the right definition each time.

This adjusts the assumption to "specs export a term only once". Private
definitions are left intact (and these duplicates will re-appear in the
extracts).
@johannhof
Copy link
Member

Thank you both, this looks fixed to me now!

@tidoust
Copy link
Member

tidoust commented Nov 30, 2022

Yes, fixed in Reffy and definition is now back in Webref and ReSpec's xref database. I also reported the duplicate exported span IDL attribute in HTML. Thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants