#315 Ability to validate _xml parameters with XSDs

open
4
2010-04-09
2010-04-01
Ernst de Haan
No

Currently, XINS 2.2 supports XML-type parameters with the _xml type; that is excellent. While with other types of parameters (such as _list or _set) it is possible to create more specific subtypes (e.g. with <list> or <set> elements inside a .typ file), the same does not apply to XML-type parameters.

I propose adding the possibliity to have types that are effectively specializations of the _xml type, but with an assigned XSD for validating the structure of the XML.

For example the following could be in a .fnc file:

<param name="model" required="true" type="Model" />

Then this could be in the Model.typ file:

<type name="Model">
<xml xsd="Model.xsd" />
</type>

Then the Model.xsd file would be a regular XML Schema definition file, which would be checked by the server- and by the client-framework.

The generated specification documentation (xins specdocs) should be updated so that it can show the XSD, preferrably in a nicely formatted manner.

@Anthony: Do you think this is a good idea? If so, do you want to do a proposed implementation or shall I do it?

Discussion

  • Ernst de Haan
    Ernst de Haan
    2010-04-01

    • priority: 5 --> 6
    • assigned_to: nobody --> agoubard
     
    • priority: 6 --> 4