Closed tamuri closed 4 years ago
Note: Not sure libCellML is planning to take care of this
libCellML validation currently validates MathML strings against the MathML 2.0 DTD and I think also checks that <ci>
's only make use of variables defined in the component.
Thanks!
If libCellML is going to validate the MathML - can this be closed ?
For the time being we're not using libcellml, so no?
Reason I ask is that previous experience has shown that having bad MathML in a model can play havoc with unit checking/conversion etc. So realistically validating MathML needs to be a priority when it comes to unit stuff
I'm all for validating it properly! And checking whether its restricted to the CellML subset (which checking against the MathML DTD doesn't do)
I have much experience of writing RNG schemas for reduced sets of MathML (strangely this is because SBML only supports a subset of MathML!) so could certainly get that sorted quickly. If RNG is acceptable.
We also have the RNG schemas for CellML 1.0 (and MathML) that pycml uses... https://github.com/Chaste/Chaste/blob/release/python/pycml/cellml1.0.rng etc
If we want to do that, then here's an example of how to do it in Python: https://github.com/MichaelClerx/cellml-validation/blob/master/check/_validation.py#L54-L81
And here's a report showing which errors it catches: https://github.com/MichaelClerx/cellml-validation/blob/master/reports/relaxng_1_0.md :D :D :D
Cool - so can I assume that before any call is made to generate simulation code/use cellmlmanip the cellml has been validated enough that I shouldnt hit any issues ?
No none of this is currently implemented in CellMLManip!
Note from Jonathan: