linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
565 stars 143 forks source link

Handle Atom XML feeds #467

Open timbl opened 3 years ago

timbl commented 3 years ago

Example: http://dbpedia.org/data/Massachusetts_Institute_of_Technology.atom

produces from rdflib:

Error: Fetcher: Unsupported dialect of XML: not RDF or XHTML namespace, etc. <?xml version="1.0" encoding="utf-8" ?> <feed xmlns="http://www.w3.org/2005/A 

at Fetcher.failFetch 

 at XMLHandler.parse (https://timbl.com/timbl/Automation/Library/Mashup/mashlib.js:9994:22) at https://timbl.com/timbl/Automation/Library/Mashup/mashlib.js:11543:24 at async Promise.all (index 8)
store = context.session.store

The XML resource starts:

<?xml version="1.0" encoding="utf-8" ?>
<feed 
     xmlns="http://www.w3.org/2005/Atom" 
     xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" 
     xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
     xmlns:georss="http://www.georss.org/georss/"
     xmlns:dbp="http://dbpedia.org/property/"
     xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
     xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
     xmlns:foaf="http://xmlns.com/foaf/0.1/"
     xmlns:dbo="http://dbpedia.org/ontology/"
>
    <id>http://dbpedia.org:8891/data/Massachusetts_Institute_of_Technology.atom</id>
    <updated>2020-12-14T17:20:55.266081Z</updated>
    <author><name /></author>
    <title type="text">OData Service and Descriptor Document</title>
    <entry>
        <id>http://dbpedia.org/resource/Massachusetts_Institute_of_Technology</id>
        <link rel="http://www.w3.org/2002/07/owl#sameAs" href="http://es.dbpedia.org/resource/Instituto_Tecnológico_de_Massachusetts"/>
        <link rel="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" href="http://dbpedia.org/class/yago/Institution108053576"/>
        <link rel="http://www.w3.org/1999/02/22-rdf-syntax-ns#type" href="http://www.wikidata.org/entity/Q3918"/>
        <link rel="http://purl.org/linguistics/gold/hypernym" href="http://dbpedia.org/resource/University"/>