Re: Managing candidate/proposed amendments

I implemented something like this for PCI-SIG documents.

When making changes, you add an attribute data-errata=”mumble” to some HTML tag that contains the change (as close to the change as possible). (also, data-erratum and data-ecn that work similar).

For show-changes documents that include ins/del tags, this causes work to happen. The ins/del tags are somewhere inside the HTML tag that has the data-errata attribute.

The attached code searches for ins/del, then works up the tree to locate a data-errata attribute (it there is one). It then decorates the first ins/del tag in that data-errata with the contents of the data-errata and links them together (so you can click on something to move through the changes related to that erratum).

It poorly handles content that is changed by more than one errata (the labels are correct but the linking gets messed up).

This ends up looking like the following. The first snip is the manually created errata table entry. The second snip is some text that is changed by Errata A20.

[cid:image002.png@01D95012.52486590]
…
[cid:image001.png@01D95012.2E7763F0]

Steve Glaser
sglaser@nvidia.com<mailto:sglaser@nvidia.com>


From: Dominique Hazael-Massieux <dom@w3.org>
Date: Monday, March 6, 2023 at 5:23 AM
To: fantasai <fantasai.lists@inkedblade.net>, spec-prod@w3.org <spec-prod@w3.org>
Subject: Re: Managing candidate/proposed amendments
External email: Use caution opening links or attachments


Le 03/03/2023 à 22:09, fantasai a écrit :
> A few comments:
> 1. Use <ins> and <del> to mark up what is inserted or removed. <section>
> with id/class markup might be easy enough for the JS to understand, but
> it's not really the right markup representation.

Yes, that's in my todo list; I had been hoping to use
role="insertion|deletion" instead, but I now understand that won't work
well [1]

1 .
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fvalidator%2Fvalidator%2Fissues%2F1558%23issuecomment-1450754591&data=05%7C01%7Csglaser%40nvidia.com%7Ce120fa51b4954b9a766f08db1e45ec2e%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638137057904082976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bEVFqAtdqtbXrDBGLDQmekM5VYlECX0cAHXD2eo%2FGg4%3D&reserved=0

> 2. Would be helpful to more clearly associate the diffs with the
> corrections they represent. There was examples of that in
>    https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.w3.org%2FStyleSheets%2FTR%2F2021%2FREADME%23amendment&data=05%7C01%7Csglaser%40nvidia.com%7Ce120fa51b4954b9a766f08db1e45ec2e%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638137057904082976%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=IyEQjsUMjA9dWEl2FUKr9pWJNQfUoi62Wlj%2B1YGhoag%3D&reserved=0
> but they seem to be broken because fixup.js is returning a 404. :( :( :(

Each diff is already preceded by the description of the correction it
represents - I'm not sure what modification to that set up you're
suggesting.

Thanks for the review!

Dom

Received on Monday, 6 March 2023 19:22:19 UTC