w3c / reffy

Reffy is a Web spec crawler and analyzer tool. It is notably used to update Webref
MIT License
68 stars 23 forks source link

Consider associating extract items with the section that contains them #1611

Open tidoust opened 2 months ago

tidoust commented 2 months ago

To improve reporting of potential anomalies, and to be able to locate things more easily in a spec, it might be useful to provide some means to associate individual items that appear in extracts with the section that defines them.

That could be done in individual extracts, but that approach might be too verbose. Since we added href properties where ever we could, the mapping between these href properties and sections could perhaps rather be done only once in the IDs extracts.

Regardless of the solution considered, the create-outline module already creates that mapping as a by-product of the outline creation.

Note that the links and refs extracts do not have href properties but we may also want to link back to sections (e.g., to know which sections reference a given spec).

tidoust commented 2 months ago

Forgot to mention that we already do that mapping for dfns. What's to consider is whether that would make sense for other extracts as well.