Skip to content

make the test-suite more linked data friendly #249

@pchampin

Description

@pchampin

Summary: I argue that the IRIs of the manifests and tests for RDF 1.2 should be changed.

The problem

Consider the RDF 1.1 test suite: the IRI of each manifest is the URL of the manifest.ttl file (example); each test has an IRI of the form manifest.ttl#test-id (example).

  • PROS: it closely follows the LD principles for machines, but...
  • CONS: not so much for people ("3. When someone looks up a URI, provide useful information"), because the HTML description of each test is at a different URL (example). This could be solved with content-negotiation and/or some form of redirection, but sadly github-pages support neither.

The RDF 1.2 test suite made a different choice: each manifests is still described in a file manifest.ttl, but the IRI of the manifest itself is a fragment of the corresponding HTML page (example: in rdf12/rdf-n-triples/manifest.ttl, the IRI of the manifest is rdf12/rdf-n-triples#manifest). The same goes for the IRI of each test (example).

Clearly, the rationale of these choices was to mitigate the CONS above, and ensure that the IRI used by machines to identify a test provide useful information to people when dereferenced. The problem is that, conversely, we broke the 3rd principles for machines... Given that test suites are designed to help with test automation, I would argue that this is a net loss.

Breaking the 3rd principle is not just a philosophical issue: it has immediate practical consequences. In rdf12/rdf-n-triples/manifest.ttl, it says that the manifest mf:includes rdf12/rdf-n-triples/syntax/manifest.ttl. This is semantically incorrect, because that IRI does not identity a manifest (only a turtle file that happens to describe a manifest). This is also practically broken, because when I dereference it, I still need to "guess" the actual IRI of the manifest to get its description. Fortunately, in this case, there is only one manifest described in this file, so a simple heuristics gets me there, but that's brittle and ad-hoc. (Oh, and since RDF 1.2 manifests point to RDF 1.1 manifests, I also need to support both the "proper" LD way and this ad-hoc way...).

Proposed solutions

One option would be to revert to the old naming policy (that of the RDF 1.1 test suite). Not ideal, but better IMO.

Another option would be to use a service that supports content-negociation and redirection (w3.org? w3id.org?), and mint IRIs in this service for manifests and tests of the RDF 1.2 test suite. Those IRIs would redirect to the appropriate URL on github pages, based on the required content-type. E.g.

w3id.org/rdf-test/rdf/rdf12/n-triples →
    IF accept: text/turtle → REDIRECT to w3c.github.com/rdf-tests/rdf/rdf12/n-triples/manifest.ttl
    IF accept: text/html   → REDIRECT to w3c.github.com/rdf-tests/rdf/rdf12/n-triples/index.ttl

The IRI of a manifest would then be w3id.org/rdf-test/rdf/rdf12/n-triples#manifest,
that of a test would be w3id.org/rdf-test/rdf/rdf12/n-triples#test-id,

(again, I'm not attached to w3id.org, I'm happy to use another domain, including w3.org)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions