w3c / json-ld-syntax

JSON-LD 1.1 Specification
https://w3c.github.io/json-ld-syntax/
Other
111 stars 22 forks source link

FYI: anchors aren't in .html thus cannot be easily validated #343

Closed yarikoptic closed 4 years ago

yarikoptic commented 4 years ago

JS-powered https://w3c.github.io/json-ld-syntax is really nice, but we encountered difficulty with linkchecker to verify that URLs we use are still correct. The reason is that it seems that the anchors are populated and/or handled by JS, so anything which just downloads the page without running JS would fail to find those id's.

E.g. in our case it is https://w3c.github.io/json-ld-syntax/#named-graphs link, for which there is no "named-graphs" id in the actual source .html:

$> wget -q -O- 'https://w3c.github.io/json-ld-syntax/#named-graphs' | grep 'named-graphs' | grep -v 'href="#named-graphs"'
$> 

I am not sure if there is an easy workaround at any level, or may be some alternative link which would lead to an .html version with those anchors?

PS Please pardon my ignorance if it is something really simple ;)

gkellogg commented 4 years ago

You should use the published version at https://www.w3.org/TR/json-ld11/, which is the result of processing the editors draft and resolving all such links.

The editors draft is in a "raw" format, and makes use of ReSpec. It does provide some features that the published version doesn't (unfortunately), such as highlighted variables within algorithms. ReSpec is widely used for W3C specifications.

There is a processes used in our continuous integration to create a fully resolved version from the source in .travis-ci.yaml, if you really want to work off of the editor's draft:

https://github.com/w3c/json-ld-syntax/blob/a65dd9acf04bce870392afd2c074c44bf86f9607/.travis.yml#L21-L33

gkellogg commented 4 years ago

Resolved to close, as the final form will have anchors in the html.

yarikoptic commented 4 years ago

Thank you @gkellogg !