You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to parse an HTML document as RDFa that contains the following script tag (as well as some valid JSON-LD):
<script type="text/plain" cookie-consent="tracking">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
...
</script>
the text/plain content type causes ruby-rdf to load the NTriples reader, which fails with the exception: RDF::ReaderError: Expected subject (found: "window.dataLayer = window.dataLayer || [];")
Is there a way that the RDFa reader could tolerate (and log) bad RDF in a script tag and continue reading the rest of the document?
Or, is there a good way to not load the NTriples reader for text/plain content?
Thanks!
The text was updated successfully, but these errors were encountered:
I'm trying to parse an HTML document as RDFa that contains the following script tag (as well as some valid JSON-LD):
the
text/plain
content type causes ruby-rdf to load the NTriples reader, which fails with the exception:RDF::ReaderError: Expected subject (found: "window.dataLayer = window.dataLayer || [];")
Is there a way that the RDFa reader could tolerate (and log) bad RDF in a script tag and continue reading the rest of the document?
Or, is there a good way to not load the NTriples reader for
text/plain
content?Thanks!
The text was updated successfully, but these errors were encountered: