Skip to content
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

TurtleParse produces invalid parsing tree (W3C manifest.ttl) #15

Closed
cordawyn opened this issue Nov 28, 2014 · 2 comments
Closed

TurtleParse produces invalid parsing tree (W3C manifest.ttl) #15

cordawyn opened this issue Nov 28, 2014 · 2 comments

Comments

@cordawyn
Copy link
Collaborator

Parsing the following:

<#datatypes-intensional-xsd-integer-decimal-compatible> a mf:NegativeEntailmentTest;
  mf:name "datatypes-intensional-xsd-integer-decimal-compatible";
  rdfs:comment """
    The claim that xsd:integer is a subClassOF xsd:decimal is not
    incompatible with using the intensional semantics for
    datatypes.
  """;
  rdfs:approval rdft:Approved;
  mf:entailmentRegime "RDFS" ;
  mf:recognizedDatatypes ( xsd:decimal xsd:integer ) ;
  mf:unrecognizedDatatypes ( ) ;
  mf:action <datatypes-intensional/test001.nt>;
  mf:result false .

(from http://www.w3.org/2013/rdf-mt-tests/manifest.ttl) produces invalid output:

Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#NegativeEntailmentTest"))
Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#name"),LNode(PlainL(datatypes-intensional-xsd-integer-decimal-compatible)))
Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/2000/01/rdf-schema#comment"),LNode(PlainL(
    The claim that xsd:integer is a subClassOF xsd:decimal is not
    incompatible with using the intensional semantics for
    datatypes.
  )))
Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/2000/01/rdf-schema#approval"),UNode("http://www.w3.org/ns/rdftest#Approved"))
Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#entailmentRegime"),LNode(PlainL(RDFS)))
Triple(UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#recognizedDatatypes"),BNodeGen(40))
Triple(BNodeGen(40),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),UNode("http://www.w3.org/2001/XMLSchema#decimal"))
Triple(BNodeGen(40),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),BNodeGen(41))
Triple(BNodeGen(41),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#first"),UNode("http://www.w3.org/2001/XMLSchema#integer"))
Triple(BNodeGen(41),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"))
Triple(BNodeGen(41),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#unrecognizedDatatypes"),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil"))
Triple(BNodeGen(41),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#action"),UNode("xxxdatatypes-intensional/test001.nt"))
Triple(BNodeGen(41),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#result"),LNode(TypedL(false,"http://www.w3.org/2001/XMLSchema#boolean")))

Note that it breaks on Triple(BNodeGen(41),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#unrecognizedDatatypes"),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")) where "subject" must be UNode("xxx#datatypes-intensional-xsd-integer-decimal-compatible"), not BNodeGen(41).
Also, the last 2 triples must also have UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#unrecognizedDatatypes") for their subject.

However, parsing of a list with mf:entries (earlier in this file) is correct.

So, the parser either stumbled on "inline" presentation of a list, trailing ";" or something in between ;-)

@cordawyn cordawyn mentioned this issue Dec 3, 2014
@robstewart57
Copy link
Owner

The last two triples should have the subject UNode("#datatypes-intensional-xsd-integer-decimal-compatible") I think. I can reproduce the first problem you report about Triple(BNodeGen(41),UNode("http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#unrecognizedDatatypes"),UNode("http://www.w3.org/1999/02/22-rdf-syntax-ns#nil")) , I'll take a look.

@cordawyn
Copy link
Collaborator Author

cordawyn commented Dec 3, 2014

You're right about the subject of the last 2 triples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants