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

parse HTML data island ? #596

Open
bourgeoa opened this issue Jan 26, 2023 · 1 comment
Open

parse HTML data island ? #596

bourgeoa opened this issue Jan 26, 2023 · 1 comment

Comments

@bourgeoa
Copy link
Contributor

Is it an issue for rdflib or solid server ?

html can be part of content negociation on a server with an Accept Header for GET and PATCH.
PUT/POST/DELETE are meant on an entire document

The same can be done in rdflib

  • the result is RDF content that is used in rdflib store
  • can a serialized RDF content be inserted in an html document as a replacement to an existing data island or creating a new one ?
    How to resolve the need for 2 contentType's : text/html and an RDF one for the data Island ?
@TallTed
Copy link
Contributor

TallTed commented Jan 26, 2023

  • can a serialized RDF content be inserted in an html document as a replacement to an existing data island or creating a new one ?

This is a relatively easy thing to do. Data islands are simply <script type="..."> ... </script> elements, so are easily replaced within an HTML document. Some care must be taken with escaping reserved characters within the data islands, among other potential gotchas, but most if not all of these can be handled with automation.

  • How to resolve the need for 2 contentType's : text/html and an RDF one for the data Island ?

There's no "need for 2 contentTypes". The HTML document is text/html (or other HTML media type), and the <script type="..."> attribute is set as appropriate to the island, e.g., type="application/ld+json" or type="text/turtle".

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

No branches or pull requests

2 participants