Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validate with RelaxNG #22

Open
JonathanReeve opened this issue Feb 15, 2017 · 0 comments
Open

Validate with RelaxNG #22

JonathanReeve opened this issue Feb 15, 2017 · 0 comments

Comments

@JonathanReeve
Copy link
Member

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."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant