Git Product home page Git Product logo

Comments (4)

firefrorefiddle avatar firefrorefiddle commented on July 21, 2024

The error did go away when I added

:- use_module(library(semweb/rdfa)).

to lib/semweb/rdf_file_type.pl

from cliopatria.

wouterbeek avatar wouterbeek commented on July 21, 2024

@firefrorefiddle Thanks for reporting.

The Pirates demo loads data from a Turtle manifest file, which includes the following URL as a data source: http://semanticweb.cs.vu.nl/2009/11/sem/

The URL exposes an RDF/XML file that (erroneously) claims to be an HTML file in its Content-Type header (Media Type text/html). Library semweb/rdf_db does not implement enough clever heuristics in order to figure that the claim made in the HTTP reply header (=HTML) is inconsistent with the actual content of the HTTP reply body (=RDF/XML).

The error that you encountered is thrown later, when the HTML Media Type is matched onto the RDFa serialization format, whose library is not loaded by ClioPatria:

rdf_content_type('text/html', 0.66, rdfa). %AC

IMO two fixes are needed:

  1. rdf_content_type/3 needs to be made into a multi-file predicate that is distributed over the RDF/XML, RDFa, Turtle/TriG, and N-Quads/N-Triples modules.
  2. semweb/rdfa needs to be loaded by ClioPatria, because a user may wish to load data in that serialization format.

@JanWielemaker Do you agree?, especially WRT (1)?

from cliopatria.

JanWielemaker avatar JanWielemaker commented on July 21, 2024

It is not the whole story. The server serves the documentation if the accept type contains html, but the documentation is not in rdfa. So, after loading the rdfa plugin it will load the html and zero triples. Seems the critical fix is to fix the content negotiation at the server end (an nginx server).

from cliopatria.

JanWielemaker avatar JanWielemaker commented on July 21, 2024

Fixed the server, so at least this works again:

?- rdf_load('http://semanticweb.cs.vu.nl/2009/11/sem/').

The other stuff is probably a good idea, though I'm still a little in doubt.

from cliopatria.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.