TEI-Simple icon indicating copy to clipboard operation
TEI-Simple copied to clipboard

relaxng validation of testfiles with xmllint seems faulty

Open lb42 opened this issue 10 years ago • 6 comments

xmllint --valid teisimple.dtd tests/testsimple2.xml # works fine xmllint --valid --relaxng teisimple.rng tests/testsimple2.xml # sits there like a pudding jing teisimple.rng tests/testsimple2.xml # works fine rnv teisimple.rnc tests/testsimple2.xml # works fine

lb42 avatar Oct 06 '15 10:10 lb42

Confirmed. Nothing I try will make xmllint validate this. If we can figure out what's causing it, we can file a bug.

Things worth checking:

  • default attribute values
  • normalization form of the document
  • missing xml declaration
  • anyone think of anything else?

Cheers, Martin

On 15-10-06 03:05 AM, Lou wrote:

xmllint --valid teisimple.dtd tests/testsimple2.xml # works fine xmllint --valid --relaxng teisimple.rng tests/testsimple2.xml # sits there like a pudding jing teisimple.rng tests/testsimple2.xml # works fine rnv teisimple.rnc tests/testsimple2.xml # works fine

— Reply to this email directly or view it on GitHub https://github.com/TEIC/TEI-Simple/issues/24.

martindholmes avatar Oct 06 '15 15:10 martindholmes

At the moment, I cannot get xmllint to validate any TEI-based Relax NG or Schematron schema (either this or EpiDoc). I imagine it's a bug in libxml2.

adunning avatar Nov 14 '15 03:11 adunning

When I use xmllint to validate a file against a RelaxNG schema, I get lots of instances of the "RNG internal error trying to compile notAllowed" error the Syd reported over seven years ago:

http://comments.gmane.org/gmane.comp.gnome.lib.xml.general/14409

There don't seem to have been any responses to that. It doesn't seem that RNG is important to the libxml2 team, perhaps.

martindholmes avatar Nov 14 '15 22:11 martindholmes

I was afraid of that; does that leave any method of validating against RNG or Schematron without Java? (I would like to be able to get validation working in a few editors other than Oxygen, but one can hardly ask developers to add such a heavy dependency just for this.)

adunning avatar Nov 15 '15 00:11 adunning

There's r n v ... It's in c

lb42 avatar Nov 15 '15 11:11 lb42

Strange thing: if you try to validate teisample2.xml against a different rng it will work:

This means there’s something in teisimple.rng that xmllint doesn’t like

ghost avatar Nov 15 '15 14:11 ghost