sbmlsecretary / test-sbml-specifications

Test repo for transferring issues.
0 stars 0 forks source link

New general XML validation rule 10103 #21

Closed sbmlsecretary closed 2 years ago

sbmlsecretary commented 17 years ago

As per the discussion in issue #1647752, this issue request is to define a new validation rule, number 10103. The statement of this validation rule should be (roughly):

An SBML XML document must conform to the XML Schema for the corresponding SBML Level, Version and Revision. The XML Schema for SBML defines the basic SBML object structure, the data types used by those objects, and the order in which the objects may appear in an SBML document. (References: L2V2 Section 4.1.)

Reported by: mhucka

Original Ticket: "sbml/sbml-specifications//48":https://sourceforge.net/p/sbml/sbml-specifications//48

sbmlsecretary commented 17 years ago

Logged In: YES user_id=1045203 Originator: NO

I am accepting this issue as valid.

Original comment by: lenov

sbmlsecretary commented 17 years ago

Logged In: YES user_id=862059 Originator: NO

I am accepting this issue as valid.

Original comment by: shoops

sbmlsecretary commented 17 years ago

Logged In: YES user_id=641982 Originator: NO

This one bothers me. If we include this as a validation rule then we can only implement it in libSBML for certain XML Parsers. So libSBML would then have to have a proviso namely: 'libSBML implements the SBML specifications with the exception that unless it is used with Xerces XML Parser Rule 10103 is not checked' and I have to say I'm not keen to do this.

A huge amount of time and effort has gone into making libSBML work seemlessly with several parsers and implement a large number of validation rules, many of which are encompassed in the schema but the validation rule provides clearer error information. [NOTE: This isnt just personal since at least half of this wasnt me :-)]

Looking at the schema the only errors that would be flagged by schema validation that are not already covered are:

1) XHTML Namespace on Notes 2) id is a required field 3) max occurence of any ListOf, kineticLaw and delay is 1

Now obviously I could implement these and attribute failure to the above rule; without actually using schema validation; but that strikes me as messy - and anyway you'd get better error messages by implementing the above as separate rules. I'm not suggesting we dont use schema validation ever - just that we fully validate a model where schema validation is not possible.

Original comment by: sarahkeating

sbmlsecretary commented 17 years ago

Logged In: YES user_id=862059 Originator: NO

Sarah, I understand your concerns regarding the implementation in libSBML. But I think that this should not impact how we deal with this as SBML editors.

The validation rules should be implemented by any SBML validating tool. Having one generic error message stating the line (and character position) where the schema violation occured makes this simpler.

From the libSBML view I think we have no other option than to implement the additinal checks independently from the underlying parser library. Looking at the code I get the impression that at least the multiple kineticLaw elements should already create an error.

Original comment by: shoops

sbmlsecretary commented 17 years ago

Logged In: YES user_id=343670 Originator: YES

I know this is just adding more work, but I have to concur with Stefan. If we examine what is done in SBML independently of an implementation, we would say that adherence to the schema should be checked. Then the question of how to accomplish that is an implementation issue.

I know it's not easy, but one of the reasons for using a validating parser is precisely to get schema checks "for free", as it were. In the absence of a validating parser, one has to implement substitutions. It's more work, but it seems like the right thing to do.

The idea of just having a single error code for all schema failures is acceptable, though if possible, it would be nice to issue more details where possible.

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Logged In: YES user_id=862059 Originator: NO

I agree with the proposed change and that it should be done.

Original comment by: shoops

sbmlsecretary commented 17 years ago

Logged In: YES user_id=862059 Originator: NO

Having just one validation rule does not prevent libSBML to elaborate in its message on the nature of the schema validation. However, requiring any tool to do so is something different.

Original comment by: shoops

sbmlsecretary commented 17 years ago

Original comment by: lenov

sbmlsecretary commented 17 years ago

Logged In: YES user_id=343670 Originator: YES

I agree with the proposed change and that it should be done.

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Logged In: YES user_id=1045203 Originator: NO

I agree with the proposed change and that it should be done.

Original comment by: lenov

sbmlsecretary commented 17 years ago

Logged In: YES user_id=641982 Originator: NO

OK I give in - its in libSBML as only one rule; but I have to say it makes debugging a model painful :-)

Original comment by: sarahkeating

sbmlsecretary commented 17 years ago

Logged In: YES user_id=641982 Originator: NO

I agree with the proposed change and that it should be done.

Original comment by: sarahkeating

sbmlsecretary commented 17 years ago

Original comment by: lenov

sbmlsecretary commented 17 years ago

Original comment by: mhucka

sbmlsecretary commented 17 years ago

Logged In: YES user_id=343670 Originator: YES

Fixed for SBML L2v3r1.

Original comment by: mhucka