linkeddata / rdflib.js

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

parsing a html+RDFa resource containing datatype="rdf:HTML" return 500 #485

Closed bourgeoa closed 3 years ago

bourgeoa commented 3 years ago

message: 'Error translating between RDF formats', status: 500

Sarven Capadisli
@csarven
12:46
@bourgeoa

HTTP/2 500 
date: Tue, 23 Mar 2021 11:52:46 GMT
server: Apache/2.4.29 (Ubuntu)
x-powered-by: solid-server/5.6.6
vary: Accept,Authorization,Origin
access-control-allow-credentials: true
access-control-expose-headers: Authorization, User, Location, Link, Vary, Last-Modified, ETag, Accept-Patch, Accept-Post, Updates-Via, Allow, WAC-Allow, Content-Length, WWW-Authenticate, MS-Author-Via, X-Powered-By
allow: OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
link: <linked-research-decentralised-web.acl>; rel="acl", <linked-research-decentralised-web.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Resource>; rel="type"
wac-allow: user="read",public="read"
ms-author-via: SPARQL
updates-via: wss://csarven.ca
content-type: text/plain; charset=utf-8
content-length: 38
etag: W/"26-QBI7EYtDt6zJzGYxyvtGCQrnW5Q"

Error translating between RDF formats

  solid:get /linked-research-decentralised-web on csarven.ca +12s
  solid:handlers GET -- Reading /var/www/solid/data/linked-research-decentralised-web$.html +12s
  solid:get error translating: /linked-research-decentralised-web text/html -> text/turtle -- 500 Cannot read property 'htmlOptions' of undefined +426ms
  solid:server Error page because of: [HTTPError: Error translating between RDF formats] {
  name: 'HTTPError',
  message: 'Error translating between RDF formats',
  status: 500

Sarven Capadisli
@csarven
14:12
The request was: curl -iH'Accept: text/turtle' https://csarven.ca/linked-research-decentralised-web
Alain Bourgeois
@bourgeoa
15:48

@csarven
Thanks for giving the link url.
I run the html+RDFa tests using a copy of your big file :

    test failed
    run test on part of your file : test succeed until it encounters : datatype="rdf:HTML"
    test succeed when replacing every datatype="rdf:HTML" with "rdf:html"

What is the correct parameter ? I suppose the problem lies in rdflib.js or a dependency. Is lowercase rdf:html acceptable ?
Alain Bourgeois
@bourgeoa
15:58
When I say that the test succeed it is that there is no error translating between RDF formats. I did not check that all expected elements are returned.
bourgeoa commented 3 years ago

Specification : https://www.w3.org/TR/rdf11-concepts/#dfn-recognized-datatype-iris

csarven commented 3 years ago

Strange that it fails on rdf:HTML but passes with rdf:html. Where is the test of that result?

TallTed commented 3 years ago

Strange that it fails on rdf:HTML but passes with rdf:html. Where is the test of that result?

Especially since rdf:HTML (or rather <http://www.w3.org/1999/02/22-rdf-syntax-ns#HTML>) exists while rdf:html (<http://www.w3.org/1999/02/22-rdf-syntax-ns#html>) does not.

Ah, case sensitivity... A blessing and a curse.

bourgeoa commented 3 years ago
  1. It does not seem to be a case sensitivity. If I remove the datatype="rdf:HTML" we have the same result than with lowercase.

  2. A small part of @csarven document converted to turtle with datatype="rdf:html (below is also the source). schem:description contains also the abstract.

It will help if you could quote what is wrong, or give what is expected. It will help look at the RDFa parser. (The parser contains the rdf:HTML) For example is abstract expected to be at the same level as description, or inside it ?

console.log
      @prefix : <#>.
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
      @prefix pso: <http://purl.org/spar/pso/>.
      @prefix schem: <http://schema.org/>.
      @prefix prov: <http://www.w3.org/ns/prov#>.
      @prefix n: <http://mementoweb.org/ns#>.
      @prefix lin: <https://csarven.ca/archives/linked-research-decentralised-web/>.
      @prefix terms: <http://purl.org/dc/terms/>.
      @prefix bibo: <http://purl.org/ontology/bibo/>.
      @prefix n0: <https://csarven.ca/#>.
      @prefix cito: <http://purl.org/spar/cito/>.
      @prefix isbn: <http://worldcat.org/isbn/>.
      @prefix XML: <http://www.w3.org/2001/XMLSchema#>.
      @prefix n1: <https://creativecommons.org/licenses/by/4.0/>.
      @prefix owl: <http://www.w3.org/2002/07/owl#>.
      @prefix cs: <https://csarven.ca/>.
      @prefix link: <http://www.w3.org/2007/ont/link#>.
      @prefix ldp: <http://www.w3.org/ns/ldp#>.
      @prefix inbox: <https://csarven.ca/archives/linked-research-decentralised-web/inbox/>.
      @prefix n2: <http://www.w3.org/ns/odrl/2/>.
      @prefix dok: <https://dokie.li/>.
      @prefix tests: <https://linkedresearch.org/ldn/tests/>.
      @prefix TR: <https://www.w3.org/TR/>.
      @prefix n3: <https://www.w3.org/ns/activitystreams#>.
      @prefix li: <https://linkedresearch.org/>.
      @prefix rel: <https://www.w3.org/ns/iana/link-relations/relation#>.
      @prefix ns0: <http://creativecommons.org/ns#>.
      @prefix l: <https://csarven.ca/linked-research-decentralised-web#>.

      pso:published a pso:PublicationStatus.

      <>
          a schem:CreativeWork, schem:ScholarlyArticle, prov:Entity;
          n:memento lin:ce36de40-64a7-4d57-a189-f47c364daa74;
          n:timemap <https://csarven.ca/linked-research-decentralised-web.timemap>;
          terms:language "en";
          bibo:authorList [ rdf:first n0:i; rdf:rest rdf:nil ];
          cito:includesQuotationFrom isbn:9781584230700;
          pso:holdsStatusInTime :31943b7f-b646-4ebd-8787-ec2341e862c1;
          schem:abstract
              "\n              This thesis is about research communication in the context of the Web. I analyse literature which reveals how researchers are making use of Web technologies for knowledge dissemination, as well as how individuals are disempowered by the centralisation of certain systems, such as academic publishing platforms and social media. I share my findings on the feasibility of a decentralised and interoperable information space where researchers can control their identifiers whilst fulfilling the core functions of scientific communication: registration, awareness, certification, and archiving.\n\n              The contemporary research communication paradigm operates under a diverse set of sociotechnical constraints, which influence how units of research information and personal data are created and exchanged. Economic forces and non-interoperable system designs mean that researcher identifiers and research contributions are largely shaped and controlled by third-party entities; participation requires the use of proprietary systems.\n\n              From a technical standpoint, this thesis takes a deep look at semantic structure of research artifacts, and how they can be stored, linked and shared in a way that is controlled by individual researchers, or delegated to trusted parties. Further, I find that the ecosystem was lacking a technical Web standard able to fulfill the awareness function of research communication. Thus, I contribute a new communication protocol, Linked Data Notifications (published as a W3C Recommendation) which enables decentralised notifications on the Web, and provide implementations pertinent to the academic publishing use case. So far we have seen decentralised notifications applied in research dissemination or collaboration scenarios, as well as for archival activities and scientific experiments.\n\n              Another core contribution of this work is a Web standards-based implementation of a clientside tool, dokieli, for decentralised article publishing, annotations and social interactions. dokieli can be used to fulfill the scholarly functions of registration, awareness, certification, and archiving, all in a decentralised manner, returning control of research contributions and discourse to individual researchers.\n\n              The overarching conclusion of the thesis is that Web technologies can be used to create a fully functioning ecosystem for research communication. Using the framework of Web architecture, and loosely coupling the four functions, an accessible and inclusive ecosystem can be realised whereby users are able to use and switch between interoperable applications without interfering with existing data.\n\n              Technical solutions alone do not suffice of course, so this thesis also takes into account the need for a change in the traditional mode of thinking amongst scholars, and presents the Linked Research initiative as an ongoing effort toward researcher autonomy in a social system, and universal access to human- and machine-readable information. Outcomes of this outreach work so far include an increase in the number of individuals self-hosting their research artifacts, workshops publishing accessible proceedings on the Web, in-the-wild experiments with open and public peer-review, and semantic graphs of contributions to conference proceedings and journals (the Linked Open Research Cloud).\n\n              Some of the future challenges include: addressing the social implications of decentralised Web publishing, as well as the design of ethically grounded interoperable mechanisms; cultivating privacy aware information spaces; personal or community-controlled on-demand archiving services; and further design of decentralised applications that are aware of the core functions of scientific communication.\n            "^^rdf:html;
          schem:author n0:i;
          schem:creator n0:i;
          schem:dateCreated "2016-04-13T18:31:21Z"^^XML:dateTime;
          schem:dateModified "2019-07-29T00:00:00Z"^^XML:dateTime;
          schem:datePublished "2019-07-29T00:00:00Z"^^XML:dateTime;
          schem:description
              "\n          \n            The past went that-a-way. When faced with a totally new situation we tend always to attach ourselves to the objects, to the flavor of the most recent past. We look at the present through a rear-view mirror. We march backward into the future. Suburbia lives imaginatively in Bonanza-land.\n\n            The Medium is the Massage: An Inventory of Effects, p. 74-75, Marshall McLuhan, 1967\n          \n\n          \n            Abstract\n            \n              This thesis is about research communication in the context of the Web. I analyse literature which reveals how researchers are making use of Web technologies for knowledge dissemination, as well as how individuals are disempowered by the centralisation of certain systems, such as academic publishing platforms and social media. I share my findings on the feasibility of a decentralised and interoperable information space where researchers can control their identifiers whilst fulfilling the core functions of scientific communication: registration, awareness, certification, and archiving.\n\n              The contemporary research communication paradigm operates under a diverse set of sociotechnical constraints, which influence how units of research information and personal data are created and exchanged. Economic forces and non-interoperable system designs mean that researcher identifiers and research contributions are largely shaped and controlled by third-party entities; participation requires the use of proprietary systems.\n\n              From a technical standpoint, this thesis takes a deep look at semantic structure of research artifacts, and how they can be stored, linked and shared in a way that is controlled by individual researchers, or delegated to trusted parties. Further, I find that the ecosystem was lacking a technical Web standard able to fulfill the awareness function of research communication. Thus, I contribute a new communication protocol, Linked Data Notifications (published as a W3C Recommendation) which enables decentralised notifications on the Web, and provide implementations pertinent to the academic publishing use case. So far we have seen decentralised notifications applied in research dissemination or collaboration scenarios, as well as for archival activities and scientific experiments.\n\n              Another core contribution of this work is a Web standards-based implementation of a clientside tool, dokieli, for decentralised article publishing, annotations and social interactions. dokieli can be used to fulfill the scholarly functions of registration, awareness, certification, and archiving, all in a decentralised manner, returning control of research contributions and discourse to individual researchers.\n\n              The overarching conclusion of the thesis is that Web technologies can be used to create a fully functioning ecosystem for research communication. Using the framework of Web architecture, and loosely coupling the four functions, an accessible and inclusive ecosystem can be realised whereby users are able to use and switch between interoperable applications without interfering with existing data.\n\n              Technical solutions alone do not suffice of course, so this thesis also takes into account the need for a change in the traditional mode of thinking amongst scholars, and presents the Linked Research initiative as an ongoing effort toward researcher autonomy in a social system, and universal access to human- and machine-readable information. Outcomes of this outreach work so far include an increase in the number of individuals self-hosting their research artifacts, workshops publishing accessible proceedings on the Web, in-the-wild experiments with open and public peer-review, and semantic graphs of contributions to conference proceedings and journals (the Linked Open Research Cloud).\n\n              Some of the future challenges include: addressing the social implications of decentralised Web publishing, as well as the design of ethically grounded interoperable mechanisms; cultivating privacy aware information spaces; personal or community-controlled on-demand archiving services; and further design of decentralised applications that are aware of the core functions of scientific communication.\n            \n          \n"^^rdf:html;
          schem:license n1:;
          schem:name "Linked Research on the Decentralised Web"@en;
          schem:publisher n0:i;
          owl:sameAs cs:linked-research-decentralised-web;
          link:uri cs:linked-research-decentralised-web;
          ldp:inbox inbox:;
          n2:hasPolicy :document-policy-offer;
          prov:wasDerivedFrom
              cs:call-for-linked-research, cs:cooling-down-web-science,
              cs:dokieli-rww, cs:enabling-accessible-knowledge, cs:faipdaaf,
              cs:linked-research, cs:linked-research-scholarly-communication,
              cs:linked-sdmx-data, cs:linked-specifications-reports,
              cs:linked-statistical-data-analysis, cs:sense-of-lsd-analysis,
              cs:sparqlines-sparql-to-sparkline, cs:this-paper-is-a-demo,
              cs:web-science-from-404-to-200, dok:, tests:summary, TR:annotation-html;
          n3:inReplyTo li:calls;
          rel:latest-version lin:ce36de40-64a7-4d57-a189-f47c364daa74.
      :31943b7f-b646-4ebd-8787-ec2341e862c1 pso:withStatus pso:published.

      :document-permission
          a n2:Permission;
          n2:action
              ns0:Attribution, ns0:DerivativeWorks, ns0:Distribution, ns0:Notice,
              ns0:Reproduction, n2:aggregate, n2:archive, n2:concurrentUse, n2:derive,
              n2:digitize, n2:display, n2:index, n2:inform, n2:install, n2:present,
              n2:print, n2:read, n2:reproduce, n2:stream, n2:synchronize,
              n2:textToSpeech, n2:transform, n2:translate;
          n2:assigner n0:i.
      :document-policy-offer
          a n2:Offer, n2:Policy;
          n2:permission :document-permission;
          n2:target cs:linked-research-decentralised-web;
          n2:uid l:document-policy-offer.
      n0:i
          a schem:Person;
          schem:familyName "Capadisli"@en;
          schem:givenName "Sarven"@en;
          schem:name "Sarven Capadisli"@en;
          schem:url cs:.

      /home/alain/github/solidos/workspaces/solid-crud-tests/test/surface/conneg.test.ts:205

and this is the source

    console.log
      <!DOCTYPE html>
      <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
        <head>
          <meta charset="utf-8" />
          <title>Linked Research on the Decentralised Web</title>
          <meta content="width=device-width, initial-scale=1" name="viewport" />
          <link href="https://dokie.li/media/css/basic.css" media="all" rel="stylesheet" title="Basic" />
          <link href="https://dokie.li/media/css/dokieli.css" media="all" rel="stylesheet" />
          <script src="https://dokie.li/scripts/dokieli.js"></script>
        </head>

        <body about="" prefix="rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema# owl: http://www.w3.org/2002/07/owl# xsd: http://www.w3.org/2001/XMLSchema# dcterms: http://purl.org/dc/terms/ dctypes: http://purl.org/dc/dcmitype/ foaf: http://xmlns.com/foaf/0.1/ pimspace: http://www.w3.org/ns/pim/space# skos: http://www.w3.org/2004/02/skos/core# prov: http://www.w3.org/ns/prov# mem: http://mementoweb.org/ns# qb: http://purl.org/linked-data/cube# earl: http://www.w3.org/ns/earl# schema: http://schema.org/ void: http://rdfs.org/ns/void# rsa: http://www.w3.org/ns/auth/rsa# cert: http://www.w3.org/ns/auth/cert# wgs: http://www.w3.org/2003/01/geo/wgs84_pos# bibo: http://purl.org/ontology/bibo/ sioc: http://rdfs.org/sioc/ns# doap: http://usefulinc.com/ns/doap# dbr: http://dbpedia.org/resource/ dbp: http://dbpedia.org/property/ sio: http://semanticscience.org/resource/ opmw: http://www.opmw.org/ontology/ deo: http://purl.org/spar/deo/ doco: http://purl.org/spar/doco/ cito: http://purl.org/spar/cito/ fabio: http://purl.org/spar/fabio/ scoro: http://purl.org/spar/scoro/ oa: http://www.w3.org/ns/oa# as: https://www.w3.org/ns/activitystreams# ldp: http://www.w3.org/ns/ldp# solid: http://www.w3.org/ns/solid/terms# acl: http://www.w3.org/ns/auth/acl# odrl: http://www.w3.org/ns/odrl/2/ dio: https://w3id.org/dio# rel: https://www.w3.org/ns/iana/link-relations/relation#" typeof="schema:CreativeWork prov:Entity">
          <main>
            <article about="" typeof="schema:ScholarlyArticle">
              <h1 property="schema:name">Linked Research on the Decentralised Web</h1>

              <div id="authors">
                <dl id="author-name">
                  <dt>Author</dt>
                  <dd id="Sarven-Capadisli" inlist="" rel="bibo:authorList" resource="https://csarven.ca/#i"><span about="" rel="schema:creator schema:publisher schema:author"><a about="https://csarven.ca/#i" href="https://csarven.ca/" property="schema:name" rel="schema:url" typeof="schema:Person"><span about="https://csarven.ca/#i"><span property="schema:givenName">Sarven</span> <span property="schema:familyName">Capadisli</span></span></a></span><sup>✊</sup></dd>
                </dl>
              </div>

              <dl id="document-identifier">
                <dt>Identifier</dt>
                <dd><a href="https://csarven.ca/linked-research-decentralised-web" rel="owl:sameAs">https://csarven.ca/linked-research-decentralised-web</a></dd>
              </dl>

              <dl id="document-created">
                <dt>Created</dt>
                <dd><time content="2016-04-13T18:31:21Z" datatype="xsd:dateTime" datetime="2016-04-13T18:31:21Z" property="schema:dateCreated">2016-04-13</time></dd>
              </dl>

              <dl id="document-modified">
                <dt>Modified</dt>
                <dd><time content="2019-07-29T00:00:00Z" datatype="xsd:dateTime" datetime="2019-07-29T00:00:00Z" property="schema:dateModified">2019-07-29</time></dd>
              </dl>

              <dl id="document-published">
                <dt>Published</dt>
                <dd><time content="2019-07-29T00:00:00Z" datatype="xsd:dateTime" datetime="2019-07-29T00:00:00Z" property="schema:datePublished">2019-07-29</time></dd>
              </dl>

              <dl id="document-latest-version">
                <dt>Latest Version</dt>
                <dd><a href="https://csarven.ca/archives/linked-research-decentralised-web/ce36de40-64a7-4d57-a189-f47c364daa74" rel="mem:memento rel:latest-version">https://csarven.ca/archives/linked-research-decentralised-web/ce36de40-64a7-4d57-a189-f47c364daa74</a></dd>
              </dl>

              <dl id="document-timemap">
                <dt>TimeMap</dt>
                <dd><a href="https://csarven.ca/linked-research-decentralised-web.timemap" rel="mem:timemap">https://csarven.ca/linked-research-decentralised-web.timemap</a></dd>
              </dl>

              <dl id="document-derived-from">
                <dt>Derived From</dt>
                <dd>
                  <ul>
                    <li><cite><a data-versiondate="2019-07-09T21:22:19Z" data-versionurl="https://web.archive.org/web/20190709212219/https://csarven.ca/linked-sdmx-data" href="https://csarven.ca/linked-sdmx-data" rel="prov:wasDerivedFrom">Linked SDMX Data</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/linked-research" href="https://csarven.ca/linked-research" rel="prov:wasDerivedFrom">Linked Research</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:22:25Z" data-versionurl="https://web.archive.org/web/20190709212225/https://csarven.ca/linked-statistical-data-analysis" href="https://csarven.ca/linked-statistical-data-analysis" rel="prov:wasDerivedFrom">Linked Statistical Data Analysis</a></cite></li>
                    <li><cite><a data-versiondate="2019-06-19T10:26:40Z" data-versionurl="https://web.archive.org/web/20190619102640/https://csarven.ca/sense-of-lsd-analysis" href="https://csarven.ca/sense-of-lsd-analysis" rel="prov:wasDerivedFrom">Semantic Similarity and Correlation of Linked Statistical Data Analysis</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:23:11Z" data-versionurl="https://web.archive.org/web/20190709212311/https://csarven.ca/call-for-linked-research" href="https://csarven.ca/call-for-linked-research" rel="prov:wasDerivedFrom">Call for Linked Research</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/enabling-accessible-knowledge" href="https://csarven.ca/enabling-accessible-knowledge" rel="prov:wasDerivedFrom">Enabling Accessible Knowledge</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/this-paper-is-a-demo" href="https://csarven.ca/this-paper-is-a-demo" rel="prov:wasDerivedFrom">This ‘Paper’ is a Demo</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/cooling-down-web-science" href="https://csarven.ca/cooling-down-web-science" rel="prov:wasDerivedFrom">Cooling Down Web Science</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:22:53Z" data-versionurl="https://web.archive.org/web/20190709212253/https://dokie.li/" href="https://dokie.li/" rel="prov:wasDerivedFrom">dokieli</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/linked-research-scholarly-communication" href="https://csarven.ca/linked-research-scholarly-communication" rel="prov:wasDerivedFrom">Linked Research: An Approach for Scholarly Communication</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:22:49Z" data-versionurl="https://web.archive.org/web/20190709212249/https://csarven.ca/linked-data-notifications" href="https://csarven.ca/linked-data-notifications">Linked Data Notifications</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/sparqlines-sparql-to-sparkline" href="https://csarven.ca/sparqlines-sparql-to-sparkline" rel="prov:wasDerivedFrom">Sparqlines: SPARQL to Sparkline</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/web-science-from-404-to-200" href="https://csarven.ca/web-science-from-404-to-200" rel="prov:wasDerivedFrom">Where is Web Science? From 404 to 200</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:03Z" data-versionurl="https://web.archive.org/web/20190729131203/https://www.w3.org/TR/annotation-html/" href="https://www.w3.org/TR/annotation-html" rel="prov:wasDerivedFrom">Embedding Web Annotations in HTML</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:23:14Z" data-versionurl="https://web.archive.org/web/20190709212314/https://csarven.ca/dokieli-rww" href="https://csarven.ca/dokieli-rww" rel="prov:wasDerivedFrom">Decentralised Authoring, Annotations and Notifications for a Read-Write Web with dokieli</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-29T13:12:02Z" data-versionurl="https://web.archive.org/web/20190729131202/https://csarven.ca/faipdaaf" href="https://csarven.ca/faipdaaf" rel="prov:wasDerivedFrom">Full Article, Immediate, Permanent, Discoverable, and Accessible to Anyone Free of charge</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:22:54Z" data-versionurl="https://web.archive.org/web/20190709212254/https://linkedresearch.org/ldn/tests/summary" href="https://linkedresearch.org/ldn/tests/summary" rel="prov:wasDerivedFrom">LDN Test Reports and Summary</a></cite></li>
                    <li><cite><a data-versiondate="2019-07-09T21:22:49Z" data-versionurl="https://web.archive.org/web/20190709212249/https://csarven.ca/linked-specifications-reports" href="https://csarven.ca/linked-specifications-reports" rel="prov:wasDerivedFrom">Linking Specifications, Test Suites, and Implementation Reports</a></cite></li>
                  </ul>
                </dd>
              </dl>

              <dl id="document-language">
                <dt>Language</dt>
                <dd><span content="en" lang="" property="dcterms:language" xml:lang="">English</span></dd>
              </dl>

              <dl id="document-license">
                <dt>License</dt>
                <dd><a href="https://creativecommons.org/licenses/by/4.0/" rel="schema:license">Creative Commons Attribution 4.0 International</a></dd>
              </dl>

              <dl id="document-inbox">
                <dt>Notifications Inbox</dt>
                <dd><a href="https://csarven.ca/archives/linked-research-decentralised-web/inbox/" rel="ldp:inbox">https://csarven.ca/archives/linked-research-decentralised-web/inbox/</a></dd>
              </dl>

              <dl id="document-in-reply-to">
                <dt>In Reply To</dt>
                <dd><a href="https://linkedresearch.org/calls" rel="as:inReplyTo">Call for Linked Research</a></dd>
              </dl>

              <dl id="document-policy">
                <dt>Policy</dt>
                <dd>
                  <dl id="document-policy-offer" rel="odrl:hasPolicy" resource="#document-policy-offer" typeof="odrl:Policy">
                    <dt>Rule</dt>
                    <dd><a about="#document-policy-offer" href="https://www.w3.org/TR/odrl-vocab/#term-Offer" typeof="odrl:Offer">Offer</a></dd>
                    <dt>Unique Identifier</dt>
                    <dd><a href="https://csarven.ca/linked-research-decentralised-web#document-policy-offer" rel="odrl:uid">https://csarven.ca/linked-research-decentralised-web#document-policy-offer</a></dd>
                    <dt>Target</dt>
                    <dd><a href="https://csarven.ca/linked-research-decentralised-web" rel="odrl:target">https://csarven.ca/linked-research-decentralised-web</a></dd>
                    <dt>Permission</dt>
                    <dd>
                      <dl id="document-permission" rel="odrl:permission" resource="#document-permission" typeof="odrl:Permission">
                        <dt>Assigner</dt>
                        <dd><a rel="odrl:assigner" href="https://csarven.ca/#i">Sarven Capadisli</a></dd>
                        <dt>Action</dt>
                        <dd>
                          <ul rel="odrl:action">
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-aggregate" resource="odrl:aggregate">Aggregate</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-archive" resource="odrl:archive">Archive</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-Attribution" resource="http://creativecommons.org/ns#Attribution">Attribution</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-concurrentUse" resource="odrl:concurrentUse">Concurrent Use</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-DerivativeWorks" resource="http://creativecommons.org/ns#DerivativeWorks">Derivative Works</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-derive" resource="odrl:derive">Derive</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-digitize" resource="odrl:digitize">Digitize</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-display" resource="odrl:display">Display</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-Distribution" resource="http://creativecommons.org/ns#Distribution">Distribution</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-index" resource="odrl:index">Index</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-inform" resource="odrl:inform">Inform</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-install" resource="odrl:install">Install</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-Notice" resource="http://creativecommons.org/ns#Notice">Notice</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-present" resource="odrl:present">Present</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-print" resource="odrl:print">Print</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-read" resource="odrl:read">Read</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-reproduce" resource="odrl:reproduce">Reproduce</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-Reproduction" resource="http://creativecommons.org/ns#Reproduction">Reproduction</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-stream" resource="odrl:stream">Stream</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-synchronize" resource="odrl:synchronize">Synchronize</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-texttoSpeech" resource="odrl:textToSpeech">Text-to-speech</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-transform" resource="odrl:transform">Transform</a></li>
                            <li><a href="https://www.w3.org/TR/odrl-vocab/#term-translate" resource="odrl:translate">Translate</a></li>
                          </ul>
                        </dd>
                      </dl>
                    </dd>
                  </dl>
                </dd>
              </dl>

              <dl id="document-status">
                <dt>Document Status</dt>
                <dd prefix="pso: http://purl.org/spar/pso/" rel="pso:holdsStatusInTime" resource="#31943b7f-b646-4ebd-8787-ec2341e862c1"><span rel="pso:withStatus" resource="http://purl.org/spar/pso/published" typeof="pso:PublicationStatus">Published</span></dd>
              </dl>

              <nav id="table-of-contents"><h2>Contents</h2><div><ol class="toc"><li data-id="abstract"><a href="#abstract">Abstract</a></li><li data-id="general-terms"><a href="#general-terms">General Terms</a></li><li data-id="categories-and-subject-descriptors"><a href="#categories-and-subject-descriptors">Categories and Subject Descriptors</a></li><li data-id="keywords"><a href="#keywords">Keywords</a></li><li data-id="audience"><a href="#audience">Audience</a></li><li data-id="declaration"><a href="#declaration">Declaration</a></li><li data-id="acknowledgements"><a href="#acknowledgements">Acknowledgements</a></li><li data-id="introduction"><a href="#introduction">Introduction</a><ol><li data-id="motivation"><a href="#motivation">Motivation</a></li><li data-id="research-goals"><a href="#research-goals">Research Goals</a><ol><li data-id="stakeholders"><a href="#stakeholders">Stakeholders</a></li><li data-id="problem-context"><a href="#problem-context">Problem Context</a></li><li data-id="technical-research-goals"><a href="#technical-research-goals">Technical Research Goals</a></li><li data-id="knowledge-goals"><a href="#knowledge-goals">Knowledge Goals</a></li></ol></li><li data-id="research-questions"><a href="#research-questions">Research Questions</a><ol><li data-id="technical-research-problems"><a href="#technical-research-problems">Technical Research Problems</a></li><li data-id="knowledge-questions"><a href="#knowledge-questions">Knowledge Questions</a></li></ol></li><li data-id="thesis-overview"><a href="#thesis-overview">Thesis Overview</a><ol><li data-id="document-structure"><a href="#document-structure">Structure</a></li><li data-id="literature-review-and-citations"><a href="#literature-review-and-citations">Literature Review and Citations</a></li><li data-id="document-convention"><a href="#document-convention">Document Convention</a></li><li data-id="how-to-read-this-thesis"><a href="#how-to-read-this-thesis">How to Read This Thesis</a></li></ol></li></ol></li><li data-id="scholarly-communication-on-the-web"><a href="#scholarly-communication-on-the-web">Scholarly Communication on the Web</a><ol><li data-id="mediums-and-paradigms"><a href="#mediums-and-paradigms">Mediums and Paradigms</a><ol><li data-id="on-mediums"><a href="#on-mediums">On Mediums</a></li><li data-id="on-paradigms"><a href="#on-paradigms">On Paradigms</a></li><li data-id="rear-view-mirror"><a href="#rear-view-mirror">Rear-View Mirror</a></li></ol></li><li data-id="web-a-social-machine"><a href="#web-a-social-machine">Web: A Social Machine</a><ol><li data-id="architecture-of-the-web"><a href="#architecture-of-the-web">Architecture of the Web</a><ol><li data-id="architecture-of-the-web-identification"><a href="#architecture-of-the-web-identification">Identification</a></li><li data-id="architecture-of-the-web-interaction"><a href="#architecture-of-the-web-interaction">Interaction</a></li><li data-id="architecture-of-the-web-data-formats"><a href="#architecture-of-the-web-data-formats">Data Formats</a></li></ol></li><li data-id="linked-data"><a href="#linked-data">Linked Data</a></li><li data-id="web-science"><a href="#web-science">Web Science</a></li></ol></li><li data-id="a-brief-history-of-scholarship-on-the-web"><a href="#a-brief-history-of-scholarship-on-the-web">A Brief History of Scholarship on the Web</a><ol><li data-id="open-and-free"><a href="#open-and-free">Open and Free</a></li><li data-id="archives-and-repositories"><a href="#archives-and-repositories">Archives and Repositories</a></li><li data-id="open-access"><a href="#open-access">Open Access</a></li><li data-id="deconstructing-the-scholarly-journal"><a href="#deconstructing-the-scholarly-journal">Deconstructing the Scholarly Journal</a></li><li data-id="open-archiving"><a href="#open-archiving">Open Archiving</a></li><li data-id="scholarly-declarations-and-practices"><a href="#scholarly-declarations-and-practices">Scholarly Declarations and Practises</a></li><li data-id="paper-user-interface"><a href="#paper-user-interface">Paper User Interface</a></li><li data-id="semantic-publishing"><a href="#semantic-publishing">Semantic Publishing</a></li><li data-id="arguments-and-citations"><a href="#arguments-and-citations">Arguments and Citations</a></li><li data-id="registration-of-identifiers"><a href="#registration-of-identifiers">Registration of Identifiers</a></li></ol></li><li data-id="social-scholarly-web"><a href="#social-scholarly-web">Social Scholarly Web</a><ol><li data-id="social-media-and-academia"><a href="#social-media-and-academia">Social Media and Academia</a></li><li data-id="quality-control-and-certification"><a href="#quality-control-and-certification">Quality Control and Certification</a></li><li data-id="privilege-and-gatekeeping"><a href="#privilege-and-gatekeeping">Privilege and Gatekeeping</a></li></ol></li><li data-id="forces-and-functions"><a href="#forces-and-functions">Forces and Functions</a></li><li data-id="effects-and-artifacts"><a href="#effects-and-artifacts">Effects and Artifacts</a></li><li data-id="understanding-the-medium"><a href="#understanding-the-medium">Understanding the Medium</a></li></ol></li><li data-id="structure-of-scholarly-information"><a href="#structure-of-scholarly-information">Structure of Scholarly Information</a><ol><li data-id="information-spaces"><a href="#information-spaces">Information Spaces</a></li><li data-id="structure-and-semantics"><a href="#structure-and-semantics">Structure and Semantics</a><ol><li data-id="units-of-communication"><a href="#units-of-communication">Units of Communication</a></li><li data-id="human-and-machine-readable-information"><a href="#human-and-machine-readable-information">Human- and Machine-Readable Information</a></li><li data-id="vocabularies"><a href="#vocabularies">Vocabularies</a></li><li data-id="accessibility-usability-inclusion"><a href="#accessibility-usability-inclusion">Accessibility, Usability, and Inclusion</a></li><li data-id="archivability"><a href="#archivability">Archivability</a></li></ol></li><li data-id="existing-markup-patterns"><a href="#existing-markup-patterns">Existing Markup Patterns</a></li><li data-id="linked-statistics"><a href="#linked-statistics">Linked Statistics</a><ol><li data-id="linked-sdmx-data"><a href="#linked-sdmx-data">Linked SDMX Data</a></li><li data-id="linked-statistical-data-analysis"><a href="#linked-statistical-data-analysis">Linked Statistical Data Analysis</a></li></ol></li></ol></li><li data-id="decentralising-scholarly-communication"><a href="#decentralising-scholarly-communication">Decentralising Scholarly Communication</a><ol><li data-id="control-yourself"><a href="#control-yourself">Control Yourself</a></li><li data-id="decentralised-dataspaces"><a href="#decentralised-dataspaces">Decentralised Dataspaces</a></li><li data-id="read-write-linked-data"><a href="#read-write-linked-data">Read-Write Linked Data</a></li><li data-id="universal-identity-for-the-web"><a href="#universal-identity-for-the-web">Universal Identity for the Web</a></li><li data-id="authentication-and-authorization"><a href="#authentication-and-authorization">Authentication and Authorization</a></li><li data-id="persistence-and-preservation"><a href="#persistence-and-preservation">Persistence and Preservation</a></li><li data-id="decentralised-storage-and-interoperable-applications"><a href="#decentralised-storage-and-interoperable-applications">Decentralised Storage and Interoperable Applications</a></li><li data-id="design-decisions-for-decentralisation"><a href="#design-decisions-for-decentralisation">Design Decisions for Decentralisation</a></li><li data-id="degree-of-control"><a href="#degree-of-control">Degree of Control</a></li><li data-id="forces-and-functions-in-specifications"><a href="#forces-and-functions-in-specifications">Forces and Functions in Specifications</a></li><li data-id="the-effects-and-artifacts-of-autonomous-engagement"><a href="#the-effects-and-artifacts-of-autonomous-engagement">The Effects and Artifacts of Autonomous Engagement</a></li></ol></li><li data-id="linked-data-notifications"><a href="#linked-data-notifications">Linked Data Notifications</a><ol><li data-id="fulfilling-the-awareness-function"><a href="#fulfilling-the-awareness-function">Fulfilling the Awareness Function</a></li><li data-id="overview-of-web-notification-systems"><a href="#overview-of-web-notification-systems">Overview of Web Notification Systems</a></li><li data-id="use-cases-for-decentralised-notifications"><a href="#use-cases-for-decentralised-notifications">Use Cases for Decentralised Notifications</a></li><li data-id="design-considerations"><a href="#design-considerations">Design Considerations</a></li><li data-id="a-decentralised-notifications-protocol"><a href="#a-decentralised-notifications-protocol">A Decentralised Notifications Protocol</a><ol><li data-id="application-interactions"><a href="#application-interactions">Application Interactions</a><ol><li data-id="sender-to-receiver"><a href="#sender-to-receiver">Sender to Receiver interactions</a></li><li data-id="consumer-to-receiver"><a href="#consumer-to-receiver">Consumer to Receiver interactions</a></li></ol></li><li data-id="data-formats"><a href="#data-formats">Data Formats and Content Negotiation</a></li><li data-id="security-privacy-content-considerations"><a href="#security-privacy-content-considerations">Security, Privacy and Content Considerations</a></li><li data-id="protocol-interaction-and-content"><a href="#protocol-interaction-and-content">Protocol Interaction and Content</a></li></ol></li><li data-id="test-suite-and-implementation-reports"><a href="#test-suite-and-implementation-reports">Test Suite and Implementation Reports</a></li><li data-id="linked-data-notifications-implementations"><a href="#linked-data-notifications-implementations">Linked Data Notifications Implementations</a><ol><li data-id="ldn-report-receiver"><a href="#ldn-report-receiver">Receiver reports</a></li><li data-id="ldn-report-consumer"><a href="#ldn-report-consumer">Consumer reports</a></li><li data-id="ldn-report-sender"><a href="#ldn-report-sender">Sender reports</a></li></ol></li><li data-id="ldn-forces-functions"><a href="#ldn-forces-functions">Forces and Functions in Linked Data Notifications</a></li><li data-id="contextualising-ldn"><a href="#contextualising-ldn">Contextualising LDN</a><ol><li data-id="comparison-of-notification-mechanisms"><a href="#comparison-of-notification-mechanisms">Comparison of Notification Mechanisms</a></li><li data-id="interoperability-across-specifications"><a href="#interoperability-across-specifications">Interoperability Across Specifications</a></li><li data-id="degree-of-control-in-ldn"><a href="#degree-of-control-in-ldn">Degree of Control in LDN</a></li><li data-id="additional-considerations"><a href="#additional-considerations">Additional Considerations</a></li></ol></li></ol></li><li data-id="decentralised-linked-research-application"><a href="#decentralised-linked-research-application">Decentralised Linked Research Application</a><ol><li data-id="linking-the-decentralised-information-space"><a href="#linking-the-decentralised-information-space">Linking the Decentralised Information Space</a></li><li data-id="implementing-a-read-write-application"><a href="#implementing-a-read-write-application">Implementing a Read-Write Application</a><ol><li data-id="core-techniques"><a href="#core-techniques">Core Techniques</a><ol><li data-id="core-concepts"><a href="#core-concepts">Core Concepts</a></li><li data-id="core-mechanisms"><a href="#core-mechanisms">Core Mechanisms</a></li><li data-id="core-artifacts"><a href="#core-artifacts">Core Artifacts</a></li></ol></li><li data-id="resource-interaction"><a href="#resource-interaction">Resource Interaction</a></li><li data-id="personal-identities"><a href="#personal-identities">Personal Identities</a></li><li data-id="annotations"><a href="#annotations">Annotations</a></li><li data-id="activities"><a href="#activities">Activities</a></li><li data-id="sharing-resources"><a href="#sharing-resources">Sharing Resources</a></li><li data-id="semantic-citations"><a href="#semantic-citations">Semantic Citations</a></li><li data-id="social-reviews"><a href="#social-reviews">Social Reviews</a></li><li data-id="privacy-considerations"><a href="#privacy-considerations">Privacy Considerations</a></li><li data-id="interactive-linked-statistics"><a href="#interactive-linked-statistics">Interactive Linked Statistics</a></li><li data-id="deployment"><a href="#deployment">Deployment</a></li></ol></li><li data-id="semantic-content-authoring-quality-attributes"><a href="#semantic-content-authoring-quality-attributes">Semantic Content Authoring Quality Attributes</a></li><li data-id="fair-metrics"><a href="#fair-metrics">FAIR Metrics</a><ol><li data-id="fair-metrics-data-structure-definition"><a href="#fair-metrics-data-structure-definition">FAIR Metrics Data Structure Definition</a></li><li data-id="fair-metrics-dataset"><a href="#fair-metrics-dataset">FAIR Metrics Dataset</a></li></ol></li><li data-id="dokieli-forces-functions"><a href="#dokieli-forces-functions">Forces and Functions in dokieli</a></li><li data-id="contextualising-dokieli"><a href="#contextualising-dokieli">Contextualising dokieli</a><ol><li data-id="web-publishing-systems"><a href="#web-publishing-systems">Web Publishing Systems</a></li><li data-id="adoption-of-dokieli"><a href="#adoption-of-dokieli">Adoption of dokieli</a></li><li data-id="degree-of-control-in-dokieli"><a href="#degree-of-control-in-dokieli">Degree of Control in dokieli</a></li><li data-id="effects-and-artifacts-of-dokieli"><a href="#effects-and-artifacts-of-dokieli">Effects and Artifacts of dokieli</a></li></ol></li></ol></li><li data-id="linked-research"><a href="#linked-research">Linked Research</a><ol><li data-id="design-principles"><a href="#design-principles">Design Principles</a><ol><li data-id="autonomy"><a href="#autonomy">Autonomy</a></li><li data-id="universal-access"><a href="#universal-access">Universal Access</a></li></ol></li><li data-id="call-for-linked-research"><a href="#call-for-linked-research">Call for Linked Research</a><ol><li data-id="acid-test"><a href="#acid-test">Acid Test</a></li><li data-id="linked-open-research-cloud"><a href="#linked-open-research-cloud">Linked Open Research Cloud</a></li><li data-id="linked-specifications-reports"><a href="#linked-specifications-reports">Linked Specifications, Test Suites, and Implementation Reports</a></li></ol></li><li data-id="linked-research-forces-functions"><a href="#linked-research-forces-functions">Forces and Functions of Linked Research</a></li><li data-id="contextualising-linked-research"><a href="#contextualising-linked-research">Contextualising Linked Research</a></li><li data-id="linked-research-as-a-paradigm"><a href="#linked-research-as-a-paradigm">Linked Research as a Paradigm</a></li></ol></li><li data-id="conclusions"><a href="#conclusions">Conclusions</a><ol><li data-id="research-questions-review"><a href="#research-questions-review">Research Questions Review</a></li><li data-id="interpretations"><a href="#interpretations">Interpretations</a></li><li data-id="perspectives"><a href="#perspectives">Perspectives</a></li></ol></li></ol></div></nav>

              <div datatype="rdf:html" id="content" property="schema:description">
                <blockquote cite="http://worldcat.org/isbn/9781584230700" id="the-past-went-that-a-way">
                  <p>The past went that-a-way. When faced with a totally new situation we tend always to attach ourselves to the objects, to the flavor of the most recent past. We look at the present through a rear-view mirror. We march backward into the future. Suburbia lives imaginatively in Bonanza-land.</p>

                  <footer><cite><a data-versiondate="2019-07-09T10:31:14Z" data-versionurl="https://web.archive.org/web/20190709103114/https://www.worldcat.org/title/medium-is-the-massage-an-inventory-of-effects/oclc/634760105" href="http://worldcat.org/isbn/9781584230700" rel="cito:includesQuotationFrom">The Medium is the Massage: An Inventory of Effects</a></cite>, p. 74-75, <a href="https://dbpedia.org/resource/Marshall_McLuhan">Marshall McLuhan</a>, 1967</footer>
                </blockquote>

                <section id="abstract">
                  <h2>Abstract</h2>
                  <div datatype="rdf:html" property="schema:abstract">
                    <p>This thesis is about research communication in the context of the Web. I analyse literature which reveals how researchers are making use of Web technologies for knowledge dissemination, as well as how individuals are disempowered by the centralisation of certain systems, such as academic publishing platforms and social media. I share my findings on the feasibility of a decentralised and interoperable information space where researchers can control their identifiers whilst fulfilling the core functions of scientific communication: registration, awareness, certification, and archiving.</p>

                    <p>The contemporary research communication paradigm operates under a diverse set of sociotechnical constraints, which influence how units of research information and personal data are created and exchanged. Economic forces and non-interoperable system designs mean that researcher identifiers and research contributions are largely shaped and controlled by third-party entities; participation requires the use of proprietary systems.</p>

                    <p>From a technical standpoint, this thesis takes a deep look at semantic structure of research artifacts, and how they can be stored, linked and shared in a way that is controlled by individual researchers, or delegated to trusted parties. Further, I find that the ecosystem was lacking a technical Web standard able to fulfill the awareness function of research communication. Thus, I contribute a new communication protocol, <cite><a href="#linked-data-notifications">Linked Data Notifications</a></cite> (published as a W3C Recommendation) which enables decentralised notifications on the Web, and provide implementations pertinent to the academic publishing use case. So far we have seen decentralised notifications applied in research dissemination or collaboration scenarios, as well as for archival activities and scientific experiments.</p>

                    <p>Another core contribution of this work is a Web standards-based implementation of a clientside tool, <cite><a href="#decentralised-linked-research-application">dokieli</a></cite>, for decentralised article publishing, annotations and social interactions. dokieli can be used to fulfill the scholarly functions of registration, awareness, certification, and archiving, all in a decentralised manner, returning control of research contributions and discourse to individual researchers.</p>

                    <p>The overarching conclusion of the thesis is that Web technologies can be used to create a fully functioning ecosystem for research communication. Using the framework of Web architecture, and loosely coupling the four functions, an accessible and inclusive ecosystem can be realised whereby users are able to use and switch between interoperable applications without interfering with existing data.</p>

                    <p>Technical solutions alone do not suffice of course, so this thesis also takes into account the need for a change in the traditional mode of thinking amongst scholars, and presents the <cite><a href="#linked-research">Linked Research</a></cite> initiative as an ongoing effort toward researcher autonomy in a social system, and universal access to human- and machine-readable information. Outcomes of this outreach work so far include an increase in the number of individuals self-hosting their research artifacts, workshops publishing accessible proceedings on the Web, in-the-wild experiments with open and public peer-review, and semantic graphs of contributions to conference proceedings and journals (the Linked Open Research Cloud).</p>

                    <p>Some of the future challenges include: addressing the social implications of decentralised Web publishing, as well as the design of ethically grounded interoperable mechanisms; cultivating privacy aware information spaces; personal or community-controlled on-demand archiving services; and further design of decentralised applications that are aware of the core functions of scientific communication.</p>
                  </div>
                </section>
      </div></article></main></body></html>

      /home/alain/github/solidos/workspaces/solid-crud-tests/test/surface/conneg.test.ts:204
TallTed commented 3 years ago

The correct prefixed name is rdf:HTML; this should replace all instances of rdf:html.

I'm not (and I don't recommend anyone else go) looking into the giant quoted chunks above unless/until testing is repeated after the replacement just described.

bourgeoa commented 3 years ago

Replacement to rdf:HTML returns a 500. So nothing to look at.

csarven commented 3 years ago

The source https://csarven.ca/linked-research-decentralised-web uses rdf:HTML. If I understand @bourgeoa correctly, they used rdf:html to 'have it working'.

Can you give me the script/CLI you used to parse?

Is https://github.com/linkeddata/rdflib.js/blob/44f968ae83d1d4b3864d278dade0028f4b8559e7/src/rdfaparser.js#L207-L231 related? It seems to check for both value as is as well as lowercased. But I still can't tell at the moment if that's the actual issue or the triple not completing or what..

TallTed commented 3 years ago

The error behind the HTTP 500 from the initial report is --

500 Cannot read property 'htmlOptions' of undefined

htmlOptions occurs twice in /src/rdfaparser.js, at line 899 --

      case RDFaProcessor.HTMLLiteralURI:
        var string = ''
        Object.keys(x.value).forEach(function (i) {
          string += Util.domToString(x.value[i], this.htmlOptions)
        }

-- and at line 53 --

    this.htmlOptions = {
      'selfClosing': 'br img input area base basefont col colgroup source wbr isindex link meta param hr'
    }

I hope that is helpful.

bourgeoa commented 3 years ago

The source https://csarven.ca/linked-research-decentralised-web uses rdf:HTML. If I understand @bourgeoa correctly, they used rdf:html to 'have it working'.

This was only made this as an experiment on @csarven file to see what parameter break the RDFa parsing. Deleting or replacing this parameter was enough to allow parsing. I am not saying giving the expected result. I don't know what is the expected result. It was my above question.

Nothing is done to change the html when running the T064 test. It just happen that the example used in T064 do not contain any datatype="rdf:HTML".

csarven commented 3 years ago

Good catch @TallTed . I've completely skipped over that error.

I did introduce htmlOptions / domToString awhile back.. and it was working. However, the constructor (and bunch of other stuff) seems to have changed since then.. I can't quite make out why this.htmlOptions while defined, this doesn't appear to be available when called from toRDFNodeObject.

Is this sensible to anyone else?

The parser is supposed to continue processing the node with rdf:HTML (domToString helps with that) but appears to halt at first encounter.

bourgeoa commented 3 years ago

is there any relation with https://github.com/linkeddata/rdflib.js/pull/197#issuecomment-324980145 ?

bourgeoa commented 3 years ago

@csarven I was able to parse and convert to turtle your source with 2 modifications :

Are these RDFa document anomalies or rdflib.js parser errors ?

The modified and turtle files are here :

bourgeoa commented 3 years ago

@csarven converting csraven-mod.html to application/ld+json fail with an other error :

(node:8140) UnhandledPromiseRejectionWarning: Error: Unsupported U escape
    at /home/alain/github/solidos/workspaces/rdflib/node_modules/rdf-canonize/lib/NQuads.js:390:13
    at String.replace (<anonymous>)
    at _unescape (/home/alain/github/solidos/workspaces/rdflib/node_modules/rdf-canonize/lib/NQuads.js:372:12)
    at parse (/home/alain/github/solidos/workspaces/rdflib/node_modules/rdf-canonize/lib/NQuads.js:140:29)
    at Function.jsonld.fromRDF (/home/alain/github/solidos/workspaces/rdflib/node_modules/jsonld/lib/jsonld.js:636:31)
    at /home/alain/github/solidos/workspaces/rdflib/lib/convert.js:38:23
    at nextTask (/home/alain/github/solidos/workspaces/rdflib/node_modules/async/dist/async.js:4576:27)
    at next (/home/alain/github/solidos/workspaces/rdflib/node_modules/async/dist/async.js:4584:13)
    at /home/alain/github/solidos/workspaces/rdflib/node_modules/async/dist/async.js:321:20
    at singleDone (/home/alain/github/solidos/workspaces/rdflib/node_modules/n3/lib/N3Writer.js:371:26)
(node:8140) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:8140) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Written ,csarven-mod.json
csarven commented 3 years ago

The original RDFa is valid. (Yes, about is allowed on <body> and it can have an empty value.)

IIRC, there was some fiddling to get the base URI working properly in GreenTurtle/rdflib.js. Although NSS had other issues at the time, parsing RDFa with rdflib.js was fine. Issue 197 and some other changes may have reintroduced.. but I couldn't confirm at the time.

csarven commented 3 years ago

By the way, the csarven-mod.html you created with the div including the prefixes as a standalone node is not useful/an issue because they're not used by the rest of the document. It needs to be on the same node or parent of whatever is using those prefixes. That's why I put mine on body. I can't tell from the error you shared above (perhaps not e Error: Unsupported U escape) but that's potentially an issue.

bourgeoa commented 3 years ago

@csarven using PR #487 this is your file in rdfa --> turtle https://bourgeoa.solidcommunity.net:8443/public/csarven-ori.ttl

I used a small part as t15.html in tests/serialize to test RDFa rdf:HTML