Giter Site home page Giter Site logo

Add rdfa about rdf-vocabularies HOT 9 CLOSED

zazuko avatar zazuko commented on May 30, 2024
Add rdfa

from rdf-vocabularies.

Comments (9)

iand avatar iand commented on May 30, 2024 2

The latest is at http://vocab.org/vann/vann-vocab-20100607.rdf

from rdf-vocabularies.

rubensworks avatar rubensworks commented on May 30, 2024 1

Ah ok, I was just about to say that it would probably be a forbidden character somewhere messing things up.
But good, it's working now :-)

from rdf-vocabularies.

ktk avatar ktk commented on May 30, 2024

I could not find vann in RDF so far.

from rdf-vocabularies.

vhf avatar vhf commented on May 30, 2024

Perhaps @iand could point us to the right place? :)

from rdf-vocabularies.

vhf avatar vhf commented on May 30, 2024

Unfortunately rdfxml-streaming-parser cannot parse http://vocab.org/vann/vann-vocab-20100607.rdf because of this part:

  <cc:Work rdf:about="">
    <cc:license rdf:resource="http://creativecommons.org/licenses/by/1.0/"/>
    <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text"/>
  </cc:Work>

which throws

ParseError: Invalid URI:
    at RdfXmlParser.newParseError (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:140:16)
    at RdfXmlParser.uriToNamedNode (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:165:24)
    at RdfXmlParser.valueToUri (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:152:21)
    at RdfXmlParser.onTagResource (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:334:73)
    at RdfXmlParser.onTag (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:230:18)
    at SAXStream.emit (events.js:200:13)
    at SAXParser.me._parser.<computed> [as onopentag] (/rdf-vocabularies/node_modules/sax/lib/sax.js:258:17)
    at emit (/rdf-vocabularies/node_modules/sax/lib/sax.js:624:35)
    at emitNode (/rdf-vocabularies/node_modules/sax/lib/sax.js:629:5)
    at openTag (/rdf-vocabularies/node_modules/sax/lib/sax.js:825:5)
(see test script)
const fs = require('fs')
const RdfXmlParser = require('rdfxml-streaming-parser').RdfXmlParser
const myParser = new RdfXmlParser()

fs.createReadStream('./vann-vocab-20100607.rdf')
  .pipe(myParser)
  .on('data', console.log)
  .on('error', console.error)
  .on('end', () => console.log('All triples were parsed!'))

from rdf-vocabularies.

ktk avatar ktk commented on May 30, 2024

Ping @rubensworks, any ideas?

from rdf-vocabularies.

rubensworks avatar rubensworks commented on May 30, 2024

@vhf Can you try passing this to the constructor: { baseIRI: 'http://vocab.org/vann/vann-vocab-20100607.rdf ' } ?

from rdf-vocabularies.

vhf avatar vhf commented on May 30, 2024

Sure, with the same test script as above and your suggestion I get a similar error:

ParseError: Invalid URI: http://vocab.org/vann/vann-vocab-20100607.rdf
    at RdfXmlParser.newParseError (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:140:16)
    at RdfXmlParser.uriToNamedNode (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:165:24)
    at RdfXmlParser.valueToUri (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:152:21)
    at RdfXmlParser.onTagResource (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:334:73)
    at RdfXmlParser.onTag (/rdf-vocabularies/node_modules/rdfxml-streaming-parser/lib/RdfXmlParser.js:230:18)
    at SAXStream.emit (events.js:200:13)
    at SAXParser.me._parser.<computed> [as onopentag] (/rdf-vocabularies/node_modules/sax/lib/sax.js:258:17)
    at emit (/rdf-vocabularies/node_modules/sax/lib/sax.js:624:35)
    at emitNode (/rdf-vocabularies/node_modules/sax/lib/sax.js:629:5)
    at openTag (/rdf-vocabularies/node_modules/sax/lib/sax.js:825:5)

from rdf-vocabularies.

vhf avatar vhf commented on May 30, 2024

Sorry @rubensworks , I got it wrong and your suggestion does indeed solve the issue! 👍

(You cannot see it above but it says that http://vocab.org/vann/vann-vocab-20100607.rdf is not a valid URI (notice the space at the end of the string 🤦‍♂ )).

from rdf-vocabularies.

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.