On Apr 16, 2008, at 7:17 AM, Marcin Floryan wrote:
Ted,
Things are funny at times. I have just reached a point where I am slightly confused how the XSD should be written (to define parameters) and so I've looked into your XSD and you seem to have been stuck at the same point :-) There is no neat way to define
<param type="int" ..>int</param> <param type="float">float</param> since XSD does not support element typing based on attribute values (fair enough). So either we have some less strict XSD rules (and relay on further validation in code) or we change that element's name to reflect the type as well (I opt for the latter, but wonder what people here think).
You might look at the discussions on the CREATE mailing list, etc, in regards to the colour format spec. They hit the same point and preferred the more explicit element names to be more "xml-ish" and allow for easier validation, etc.
However... if the existing things are to be changed, I'd strongly recommend looking at XForms since that was drafted by a lot of smart people solving very similar problems as we are. In this area, they used a <bind> element to attach an XML Schema type to a node in the data tree. It also has a simple mechanism to specify allowed ranges and conditions for validation of data as the user is entering it.