Description
People tell me that our current validation schema, a DTD, has long been outdated, and has since been replaced with RelaxNG. There's an RNG schema for TEI that I've put in schema/
, tei_all.rng
, which seems to be an even better validator than the DTD. It's a little too strict, however, and there are some issues with it.
For one, it doesn't seem to be able to handle xincludes, so the only way I can seem to get it to check the whole project is by compiling it beforehand with something like this: xmllint --xinclude header.xml | xmllint --noout --relaxng schema/tei_all.rng -
. This works fine, but considers the whole project as one document, without providing line numbers based on the episodes themselves. Here's the output of that command as it stands currently:
$ xmllint --xinclude header.xml | xmllint --noout --relaxng schema/tei_all.rng -
-:33: element language: Relax-NG validity error : Type language doesn't allow value 'franglais'
-:33: element language: Relax-NG validity error : Element language failed to validate attributes
-:2248: element title: Relax-NG validity error : Invalid attribute type for element title
-:4376: element foreign: Relax-NG validity error : Invalid attribute lang for element foreign
-:4965: element title: Relax-NG validity error : Invalid attribute type for element title
-:4965: element title: Relax-NG validity error : Invalid attribute type for element title
-:12967: element title: Relax-NG validity error : Invalid attribute type for element title
-:21008: element title: Relax-NG validity error : Invalid attribute type for element title
-:22313: element title: Relax-NG validity error : Invalid attribute type for element title
-:22317: element title: Relax-NG validity error : Invalid attribute type for element title
- fails to validate
One problem is that "franglais" isn't apparently a valid language, (but neither, sadly, is fr-t-c0-en
, which appears to still be experimental, see #2).
The main issue, though, is that there are no episode/line numbers given here. Maybe using a tool other than xmllint
would work.
At the moment, though, since we already have working DTD validation, I'll leave this one tagged as "wishlist."