-
Notifications
You must be signed in to change notification settings - Fork 0
Split out RDFa code from jsonld.js. #1
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
base: master
Are you sure you want to change the base?
Conversation
|
If this package includes an HTML parser (or at least a reasonable XML parser), perhaps it's the package for testing the HTML bits of JSON-LD? Otherwise, I was considering some form of dependency injection so that jsonld.js can be compatible with HTML script extraction if a suitable HTML/XML library is present or otherwise injected. |
|
I hadn't been thinking of how to do the HTML script code. This patch was partially to remove the xmldom dependency from jsonld.js itself. Maybe that will need to stay around somehow at least for testing. Should consider how that HTML script support works before this is split out in case there's a better overall design. |
|
Yeah, I’ll work on that next. It’s entirely limited to the document loader |
dlongley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks! I suggest using a more generic BSD-3 style license instead of copying the one from jsonld.js.
We should put the HTML stuff in a separate package so if it isn't needed, it doesn't have to be pulled in. Something like Perhaps we could install that package as a dev dependency for jsonld.js so we can test in one place if it helps. |
|
I figured that's where we could go. We could either condition the built-in documentLoader on if xmldom (or similar) is loaded, or do a special-purpose documentLoader within that package. |
No description provided.