0

We're generating HTML preview of an XML schema (EAD 2002) and want to embed validation errors as hovers/tooltips in the respective HTML location.

We've done it for some custom Schematron rules (which output SVRL that includes the xpath location of the error), but can't do it for the basic EAD schema.

Is there a XSD or RelaxNG validator that outputs the xpath location of errors?

Vladimir Alexiev
  • 2,477
  • 1
  • 20
  • 31

1 Answers1

1

Is there a XSD or RelaxNG validator that outputs the xpath location of errors?

There is rng-extension (https://github.com/transpect/rng-extension), a Relax NG validation extension for XML Calabash (http://xmlcalabash.com/). Haven't used either myself, though.

Rintze Zelle
  • 1,654
  • 1
  • 14
  • 30
  • Thanks for the pointer! I analyzed it a bit and we'll try to adapt LtxValidateWithRNG.java to run outside of Calabash and produce SVRL reports. Ideally, we'll add it as a `-svrl` option to jing (that source uses a patched jing) – Vladimir Alexiev Jul 12 '16 at 17:35
  • Also, for posterity, there is an open Jing ticket to add XPath paths to the error output: https://github.com/relaxng/jing-trang/issues/158 – Rintze Zelle Jul 13 '16 at 15:14
  • 1
    Thanks, we'll be working on implementing this for standalone Jing (will report on github), and may integrate in http://docs.basex.org/wiki/Validation_Module#validate:rng-report – Vladimir Alexiev Jul 21 '16 at 12:36
  • 1
    We implemented this at https://github.com/EHRI/jing-trang/pull/1 – Vladimir Alexiev Dec 12 '16 at 06:27