spec-prod
spec-prod copied to clipboard
Validation checks source, not output
The documentation on validation says spec-prod builds the doc, then validates the result. However, in some test runs with validation included we see on line 400 that the file that is built to index.html.built.html, but on line 542 it validates index.html, the original source. The validation therefore fails since there are custom features in the source that are transformed to valid HTML during the build.
Either the tool should work as documented, or if the intent is to validate the source, update the documentation. I don't know which was the intended design choice.
It's still validating the built file, just it has been renamed to index.html ^1
Relevant code: https://github.com/w3c/spec-prod/blob/952786e0cf6d30139e585e05701ce7997758795b/src/build.ts#L143
The validation therefore fails since there are custom features in the source that are transformed to valid HTML during the build.
Looking at live/processed ReSpec document, it appears the custom ReSpec plugins aren't removing the <pref> element at index.html#L293, causing the HTML validation error.
NB: The built output can be accessed at https://github.com/w3c/core-aam/actions/runs/1467562510 (download the "spec-prod-result" in the Artifacts section).