-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support for rdf:HTML as a type of literal #292
Comments
I've forked srdf and made a start on supporting rdf:HTML. This is the branch I have in my fork: https://github.com/ralphtq/srdf/tree/rh-master-rdfhtml Need now to understand how to do the PR process and make snapshots. Ralph |
Thanks for the suggestion and the code...in principle it seems it works. I also added support for I keep the isse open by now until you confirm it is working as expected and we can close the issue. |
Further work was needed to overcome this error: New branch is https://github.com/ralphtq/srdf/tree/rh-master-rdfhtml-inc2 This is the change:
Ralph |
Changes also needed in shacl-s.See weso/shacl-s#203 |
On recent testing the support for rdf:HTML is failing in the JenaMapper. I have this test:
With these results: ts: Set(_:b0 http://example.org#p " Test HTML markup "^^rdf:HTML)model1: <ModelCom {b0 @http://example.org#p " Test HTML markup "} | [b0, http://example.org#p, "Test HTML markup "]>[info] - Should compare one triple with a rdf:HTML literal *** FAILED *** [info] org.apache.jena.riot.RiotException: [line: 2, col: 39] Undefined prefix: rdf [info] at org.apache.jena.riot.system.ErrorHandlerFactory$ErrorHandlerStd.fatal(ErrorHandlerFactory.java:163) [info] at org.apache.jena.riot.system.ParserProfileStd.expandPrefixedName(ParserProfileStd.java:322) [info] at org.apache.jena.riot.system.ParserProfileStd.create(ParserProfileStd.java:282) [info] at org.apache.jena.riot.lang.LangTurtleBase.tokenAsNode(LangTurtleBase.java:577) [info] at org.apache.jena.riot.lang.LangTurtleBase.node(LangTurtleBase.java:410) [info] at org.apache.jena.riot.lang.LangTurtleBase.triplesNode(LangTurtleBase.java:445) [info] at org.apache.jena.riot.lang.LangTurtleBase.objectList(LangTurtleBase.java:419) [info] at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectItem(LangTurtleBase.java:352) [info] at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectList(LangTurtleBase.java:333) [info] at org.apache.jena.riot.lang.LangTurtleBase.triples(LangTurtleBase.java:314) [info] ... RDFHTMLLiteral is working but the transfer to the Jena model is failing. I have traced the error to this function in "ParserProfileStd.java", starting at line 317:
|
Could we extend object RDFNode as follows:
val RDFhtmlStringDatatypeIRI = IRI(rdfSyntax + "HTML")
in:
object RDFNode {
val xsd = "http://www.w3.org/2001/XMLSchema#"
val rdfSyntax = "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
val StringDatatypeIRI = IRI(xsd + "string")
val RDFhtmlStringDatatypeIRI = IRI(rdfSyntax + "HTML")
val LangStringDatatypeIRI = IRI(rdfSyntax + "langString")
val BooleanDatatypeIRI = IRI(xsd + "boolean")
val IntegerDatatypeIRI = IRI(xsd + "integer")
val DoubleDatatypeIRI = IRI(xsd + "double")
val DecimalDatatypeIRI = IRI(xsd + "decimal")
val rdftype = IRI(rdfSyntax + "type")
val rdfnil = IRI(rdfSyntax + "nil")
val rdffirst = IRI(rdfSyntax + "first")
val rdfrest = IRI(rdfSyntax + "rest")
...
...
Ralph
The text was updated successfully, but these errors were encountered: