Stylesheets icon indicating copy to clipboard operation
Stylesheets copied to clipboard

Test RDF output is apparently invalid

Open martindholmes opened this issue 9 years ago • 4 comments

Test/test12.xml is apparently designed to check TEI conversion to CIDOC CRM in RDF. The expected-results/test12.rdf file, though, has two invalidities according to Oxygen:

On Line 48, the element <rdf:value> has a text node as a direct child; although this appears to be permitted elsewhere in the file, in this context as a child of <E35_Title> it appears to be invalid.

On line 51, the element <F30_Publication_Event> seems to be invalid.

I don't know RDF and CIDOC CRM well enough to start debugging this, but Oxygen is using a file called "rdfxml.rnc" to do the validation; if this turns out to be a trustworthy schema, we could add it to the repo and validate RDF output against it as part of the test.

martindholmes avatar Jan 06 '17 00:01 martindholmes

Color me deeply skeptical. Validating RDF/XML with a schema is for suckers.

hcayless avatar Jan 06 '17 01:01 hcayless

If there's no way of knowing whether the output is right or not, what's the point in the test then?

martindholmes avatar Jan 06 '17 02:01 martindholmes

That is an excellent question.

hcayless avatar Jan 06 '17 02:01 hcayless

RDF schema validation in Oxygen relies on frameworks\rdf\schema\rdfxml.rnc which describes itself as:

# This schema is for information only and NON-NORMATIVE
#
# It is based on one originally written by James Clark in
# http://lists.w3.org/Archives/Public/www-rdf-comments/2001JulSep/0248.html
# and updated with later changes.

Using an RDF parser is probably the better way to check validity. See https://www.w3.org/RDF/Validator/documentation and https://www.w3.org/People/Barstow/#online_parsers, or http://librdf.org/raptor/rapper.html for instance.

GVogeler avatar Jan 26 '21 06:01 GVogeler