SlicerExecutionModel icon indicating copy to clipboard operation
SlicerExecutionModel copied to clipboard

paramType in schema improperly described

Open jcfr opened this issue 12 years ago • 4 comments

Looking at the schema allowing to validated the XML description, I noticed that the paramType is specified as a xsd:choice of name, flag, longflag, ... which is probably incorrect.

For example, I believe name is mandatory, at least flag or longflag should be specified, ...

See https://github.com/Slicer/SlicerExecutionModel/blob/master/ModuleDescriptionParser/ModuleDescription.xsd#L52

For reference, what motivated the creation of this issue if what's discussed here: http://www.na-mic.org/Bug/view.php?id=1828

jcfr avatar Mar 22 '12 00:03 jcfr

Some time ago we had a short mail discussion about a possible official xsd file for the xml (unfortunately, we did not reach any agreement/consensus yet). I posted a modified version of Julien's original schema file which would also solve the issue reported here:

https://gist.github.com/1584291

saschazelzer avatar Mar 22 '12 12:03 saschazelzer

I am not well versed in XML schema, so I'd have to dig through the documentation to comment on whether xsd:choice is the right field.

I can comment that a parameter must have either

  1. a flag or a longflag or both, XOR
  2. a index in the index parameter list

In other words, a parameter is either a flag parameter (meaning the parameter is optional and does not need to be specified) or an index parameter (meaning the parameter must be specified).

"name" is a required field.

millerjv avatar Mar 22 '12 12:03 millerjv

That is exactly how I interpreted it from reading the parser code and wiki documentation. The posted xsd file models these requirements exactly.

saschazelzer avatar Mar 22 '12 14:03 saschazelzer

#140 is somewhat related.

dzenanz avatar Jun 03 '24 19:06 dzenanz