Fetching data islands in RDFa too zealous
Hi,
I have RDFa markup that has <script> tags that have a type that is Parsable but they have src attributes so there's nothing in the bodies. The following code thus blows up:
https://github.com/linkeddata/rdflib.js/blob/85a72c83072f37ce2b31a2545d3d70c51aa18d89/reference/fetcher-classes.js#L117
Would it be possible to add an option to Fetcher.load to turn this behaviour off? Or otherwise skip over it if there's an src attribute, or otherwise have it no-op or wrap in a try block or something?
That makes sense. The code should do something like textContent.trim().length == 0 before committing to parse.
Dorian, if your script src is referring to JavaScript, you can omit the type attribute ( https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type ) - perhaps that's of some help for the time being.
https://github.com/linkeddata/rdflib.js/pull/693
nah it's my lazy bastard transclusion mechanism. The thing that's spitting that out though (or rather its neighbours; warning: SLOW) has content negotiation with a JSON-LD variant so just added another variant to the one that was tripping up.