SlicerExecutionModel
SlicerExecutionModel copied to clipboard
paramType in schema improperly described
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
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
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
- a flag or a longflag or both, XOR
- 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.
That is exactly how I interpreted it from reading the parser code and wiki documentation. The posted xsd file models these requirements exactly.
#140 is somewhat related.