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

GET/PATCH for HTML data island in NSS #1715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

GET/PATCH for HTML data island in NSS #1715

wants to merge 2 commits into from

Conversation

bourgeoa
Copy link
Member

@bourgeoa bourgeoa commented Jan 20, 2023

This implements the discovery and creation/modification of HTML data island : a script HTML block containing RDF data.
See #1714

@bourgeoa bourgeoa self-assigned this Jan 20, 2023
@bourgeoa bourgeoa linked an issue Jan 20, 2023 that may be closed by this pull request
@bourgeoa bourgeoa changed the title GET/PATCH HTML data island GET/PATCH for HTML data island in NSS Jan 22, 2023
@@ -128,6 +128,9 @@ async function handler (req, res, next) {
res.send(data)
return next()
} catch (err) {
if (err.message === '404') {
return next(error(404, 'HTML do not contain data island'))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return next(error(404, 'HTML do not contain data island'))
return next(error(404, 'HTML does not contain any data islands'))

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plural in islands seems to allow multiples. Actually my PR only allows one.
Not sure that more than one could be expected. The id="data" cannot be used more than once in an html document.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be multiple islands in a single HTML doc, tho perhaps not (yet) in your environment. My error text is equivalent to saying, "I found no data island in this HTML," among other phrasings.

Another phrasing suggestion might be, HTML does not contain a data island.

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

Successfully merging this pull request may close these issues.

test RDF in a data island in the HTML
2 participants