-
Notifications
You must be signed in to change notification settings - Fork 315
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
RDF issues testing 4.1.0 RC 1 #412
Comments
This is not expected - the same settings you used for 4.0.x should bring in the same dependencies in 4.1.0. Can you share what you used for 4.0.x so I can figure out what went wrong? |
Regarding the XML literals, #333 was the bug report that originated the change. http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-XMLLiteral the XML literal is intended to /not/ be escaped, and needs to not break the XML structure of the containing RDF/XML file. However, I'm not particularly confident of my own interpretation of the specs, so I'd welcome more eyes on the specs. Under the assumption that the resulting XML is as specified by the specs, this would point out a bug in other tools. To keep compatibility where these tools cannot/have not yet been updated, we could introduce an XMLWriter preference to output XML literals in the old way. |
I thing this is the problem:
http://www.w3.org/TR/rdf-syntax-grammar/#section-Syntax-XML-literals
« These are written in RDF/XML as content of a property element (not a
property attribute) and indicated using
the **rdf:parseType="Literal"** attribute on the containing property
element.»
Although the real problem may be the use of RDF/XML 😀
|
Nice. So in RDF 1.1 the type is no longer XMLLiteral but Literal. Yes the problem is clearly RDF/XML. Insert rant about separation of concerns and design by committee here. |
It's the parse type that needs to be changed. The datatype is implicit.
|
Ok, so the example shows the XML content is not escaped - this would mean OWLAPI is behaving as expected. The failing fragment looks like this:
I can't tell if |
@ignazio1977 and @sesuncedu thanks a lot for looking into this issue. Very much appreciated. @ignazio1977 I think that is the case. I cannot access the full content right now but I remember that the error was complaining about a missing prefix, probably If the XML did not have to be escaped what is the solution here ? To add the prefix definition ? ... and should the OWL API generate an error instead of generating invalid RDF/XML ? For our processing workflow in BioPortal it'd be better if the OWLAPI could generate an error in this case. Thanks again. |
There would be a performance price to pay for parsing the XML and make sure it can be parsed validly. It could be shifted to happen on creation of the literals rather than serialization - therefore allowing only well formed XMLLiterals to be created, although this would likely cause its own set of problems. |
@ignazio1977 this is the previous pom.xml config file |
About the pom config, I get the same issues in 4.0.2 running the verification project with only owlapi-distribution as a dependency. The issue seems to be with the managed jackson dependencies - the dependency management is not extended through the dependencies, and the wrong versions of jackson are pulled in. With these in my pom, I can run all OWLAPI unit tests from a separate project. Dropping the dependency management bits, I get errors trying to use JSON-LD, due to incompatible jackson versions:
|
Would be better if the dependencies for owlapi-distribution took care of that. |
This change allows the dependency to be just:
|
This commit adds a test for ill formed XML literals, which are expected to fail to serialize. The issue is that ill formed literals would create ontologies that cannot be parsed back.
Second commit throws an error when trying to save RDF/XML ontologies that have ill formed XML literals in them. |
If you need JSONLD-Java changed to a newer version of Jackson I can do that. It is known not to work with 2.5.0 but they fixed the incompatibility in 2.5.1: If there are other incompatibilities with newer versions let me know and I can try to avoid them or get them fixed in jackson. |
That would be useful - currently things work with 2.3.3 for core, databind and annotations. I can try updating the managed versions to 2.5.1 and see what happens. Part of the issue is that databind 2.3.3 depends on annotations 2.3.0, and sesame-rio-rdfjson depends on 2.2.1 - so a third party project without management gets a variety of versions. |
Pushing up to 2.5.1 works fine. |
In regards to sesame-rio-rdfjson that I also manage, I have stuck with 2.2.1 due to the great forward compatibility with jackson through the version 2.x series (except for 2.5.0 that was a very small oversight), as sesame-rio-rdfjson doesn't use any of the newer features and it is simpler just to stay with a single version. However, on the OWLAPI end, as a user of the libraries, it is a great idea to manage them to consistent versions, so it is great that it all works with 2.5.1. |
This commit adds a test for ill formed XML literals, which are expected to fail to serialize. The issue is that ill formed literals would create ontologies that cannot be parsed back.
RC3 is available on Sonatype and it solves the dependency issues. |
I have an owlapi wrapper that translates different ontology formats to OWL/RDF. I recently pull the latest code. had to add the following to my pom.xml to avoid some RDFFormat not found class exception.
Not sure if this is an issue or if I am suppose to add this new artifact. It is fine if that is case. But the issue is that this new RDF library/module is generating RDF that does not parse with other tools (i.e: rapper and http://www.w3.org/RDF/Validator/). The problem is with potentially bad encoded XMLLiteral values.
With owlapi version 4.0.x I was getting:
With 4.1.0 RC1 I get the following:
The second one (4.1.0 RC1) has the XML tags in the XMLLiteral value not encoded in the same way that 4.0.X has. Both the rapper tool and the W3C validator failed to parse the 4.1.0RC1 version so I imagine that this is invalid RDF.
The text was updated successfully, but these errors were encountered: