Open joeha480 opened 9 years ago
Do you have MTM-specific rules, or do you just want a generic PEF validator?
Generic is fine, for now, I think.
Ok, so just put the PEF through this RNG then? And output any errors?
http://www.daisy.org/projects/braille/braille_workarea/pef/validation/pef-2008-1.rng
So basically what I did in this old branch: https://github.com/daisy/pipeline-mod-braille/commit/7f164608c3fae70289db86aea89808e524ff22d3
But @joeha480 maybe for maintainability we want to keep using the validator in brailleutils?
CC @jukkae.
@josteinaj that link is not maintained. It should probably be deleted. @bertfrees the brailleutils validator also does some schematron checks, so perhaps it is easier to just use that. But I also did an xproc version with your help a couple of years ago (which includes the schematron)...
I do the same Schematron checks in my branch. But what I call "my" branch is probably just what we did together. That would explain a lot because I don't see why I would've done the same thing twice :)
If I remember correctly you did it to get a bit of hands-on experience with XProc.
The question is whether we should continue with the XProc approach or use what is in brailleutils. It's really just of matter of maintainability. Assuming that the only code that matters are the RelaxNG and Schematron and that everything else is just boilerplate, it shouldn't cause much issues to have two versions. Then it's just a matter of keeping the RNG and SCH files (possibly embedded) in sync. But still something to think about.
For now I'd say just continue with the XProc step because it already works and it's not a big deal to move back to brailleutils later. Also, the output of p:validate-with-relax-ng
and p:validate-with-schematron
can be piped into a utility step called px:validation-report-to-html
for generating a nice HTML report. I'm not sure the output from brailleutils can be used for the same purpose.
Joel fixed this in https://github.com/mtmse/pipeline/commit/22606feb6283938de1588a8c06aa0399d5bed1dc and https://github.com/mtmse/pipeline/commit/da199788267768da433a7c22104e5c57c61d98d9 and it is waiting to be merged upstream: https://github.com/daisy/pipeline/pull/490.
We want to validate the PEF result, but it should only report errors not fail, we want to have a result even when invalid.