Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

application/rdf-xml parser not found: should fail faster #69

Open
slorber opened this Issue · 5 comments

4 participants

@slorber

Hello Antonio

This seems kind of normal according to the code:

RDFLoader.RDFLoader = function (params) {
    this.precedences = ["text/turtle", "text/n3", "application/ld+json", "application/json"/*, "application/rdf+xml"*/];
    this.parsers = {"text/turtle":N3Parser.parser, "text/n3":N3Parser.parser, "application/ld+json":JSONLDParser.parser, "application/json":JSONLDParser.parser/*, "application/rdf+xml":RDFXMLParser.parser*/};
 ...
}

But the error is not really explicit.

This is what I've found out trying to use rdfstore in a backbone app:
http://sebastien.lorber.free.fr/addressbook/app
https://github.com/stample/angular-addressbook

It seems we got a response with mimeType application/rdf+xml from http://bart.netage.nl/foaf - will try to parse it as a graph services.js:46
Cannot read property 'async' of undefined rdf_store.js:7200
TypeError: Cannot read property 'async' of undefined
    at RDFLoader.RDFLoader.tryToParse (http://sebastien.lorber.free.fr/addressbook/app/lib/rdf_store.js:7188:18)
    at Store.Store.load (http://sebastien.lorber.free.fr/addressbook/app/lib/rdf_store.js:31921:31)
    at loadGraph (http://sebastien.lorber.free.fr/addressbook/app/js/services.js:56:16)
    at http://sebastien.lorber.free.fr/addressbook/app/js/services.js:47:18
    at wrappedCallback (http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:10905:81)
    at wrappedCallback (http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:10905:81)
    at http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:10991:26
    at Scope.$eval (http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:11906:28)
    at Scope.$digest (http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:11734:31)
    at Scope.$apply (http://sebastien.lorber.free.fr/addressbook/app/lib/angular/angular.js:12012:24) 

The parser passed to tryToParse is empty. It should fail fast IMO.

Btw where is the RDF XML parser? the doc seems to indicate rdfstore work with rdf xml, (at least for sparql queries?)
we can even see this code:
store.registerParser("application/rdf+xml", rdXmlParser); but don't really know where to find the rdXmlParser.

Isn't there a way to have a default support for application/rdf+xml?

@PauloLira

news about this question ? i have this problem ever that try get a tag at rdf file.

@ariutta

The RDF/XML parser appears to be here. It appears to share a common ancestor with the version from rdflib.js.

It's called from rdf_loader.js, but it's commented out three times in configuration.rb.

@ariutta

See also this open issue at rdflib.js. I have a working version in my fork.

@kevinprotoss

Hello,

is this issue still open?

I had tried to use the rdf/xml parser of rdfstore-js which depends on rdflib.js, However all the subjects of returned quads are blank node. Has anybody the same problem?

Is this parser ready to be correctly used so far? or just for future?

Best regards,
Kevin

@ariutta

@kevinprotoss, it appears to not be functional at present. Check out my demo for a really rough proof of concept RDF/XML to JSON-LD conversion. See also my rdflib.js fork for another rough example, this time of just the RDF/XML parser working in Node.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.