Hi!
Our group has been experimenting with various ways of interfacing with SBML models from Rust and we are running into some questions regarding model validation. In particular, how things are written in the specification versus how SBML test suite implements the rules. Hopefully this is the appropriate place to ask them :)
(In the following, all questions are applicable to the Level 3 Version 2 specification)
1. Is there some official guidance regarding rule precedence? For example, consider the test case `21116-fail-01-09-sev2-l3v2.xml`. Here, an extra attribute `value` is added to `speciesReference`. This clearly violates rule 21116, which is the point of this test. However, it also violates rule 10102, which simply states that the document must not contain any attributes not defined by the SBML specification. Nevertheless, violation of rule 10102 is not reported in this test case.
2. This contrasts with my second question and is concerned with test case `10102-fail-01-30-20517-sev2-l3v2.xml`. Here, the test suite reports errors 10102 and 20517. These state that the compartment element has an attribute not allowed by the SBML Core namespace, and the model has a child not compatible with the SBML Core namespace. However, as far as my understanding of XML namespaces goes, neither of these items actually *is* in the SBML Core namespace that is being validated (i.e. level 3 version 2). These items are in the `
http://www.sbml.org/sbml/version1` namespace, whereas the SBML Core namespace of this document is `
http://www.sbml.org/sbml/level3/version2/core`. Shouldn't these items just be ignored? Or does the "SBML Core namespace" actually mean "any namespace of any SBML version; current, previous or future"?
3. Another "flavor" of this issue is in the test case `99107-fail-01-06-10102-sev2-l3v2.xml`. Here, error 10102 is reported due to the extra element `listOfShapes`. But this element is in the namespace `
http://anything` and rule 10102 only talks about elements declared in the SBML Core namespace or package namespaces. My understanding of the rule is that it should not apply to elements in non-SBML namespaces (i.e. such elements should be allowed under this rule).
4. I guess this is again about rule precedence, but shouldn't `21105-fail-01-07-sev2-l3v2.xml` also report violation of rule `21116`? I understand that the `speciesReference` element is invalid at this position, but shouldn't 21116 still apply?
5. In the test `10311-fail-01-29-10313-sev2-l3v2.xml` (and other similar tests in this folder), the issue 10313 is declared in the filename as an "extra rule", but it is never reported in the expected output (whereas in other cases that have the extra rule, like the ones discussed above, the extra rule is part of the expected output). I understand that when 10311 is reported, 10313 is largely redundant (similar to 10102 being redundant if 21116 is reported), but then I don't understand the meaning of the "extra rule" file modifier. Is this an error that is also present in the model and should be reported in this test case, or is it an error that is technically present in the model but will not be reported due to rule precedence/other reasons?
I understand that these are rather pedantic questions, but we are trying to understand which of these are due to the SBML core specification and which are just implementation-specific to libSBML. So thank you in advance for bearing with me and for any clarification :)
Best regards,
Sam