Parameter values and domains

Previous Next

Input and output parameters can be based on a domain.

Basing a parameter on a domain allows you to differentiate between simple parameter values containing text-like values, and more complex XML values.

Examples of simple parameter values are: BRAZIL, and: 65. An example of a complex XML value is:

<MyXMLParameter>

    <TOUR>BRAZIL</TOUR>

    <AGE>65</AGE>

</MyXMLParameter>

 

Basing a parameter on a domain also allows you to ensure that parameter values conform to the XML datatype specified for this parameter, for example: xsd:date, or xsd:double.

This means that for a domain based on a DATE data type, and with IO Format set to: YYYY-MM-DD, both the data type and IO Format are applied in the following SQL Statement of a method:

SELECT     start_date

FROM     schedtour

WHERE     schedtour_id = :MySchedtourID

AND     start_date > :MyStartDate

 

Finally, basing a parameter on a domain also allows you to ensure that the definitions of the exchanged XML data , as defined in an XML schema document, are interpreted correctly by USoft. For example, an XML schema restriction for an AGE simple type between 1 and 120 should be reflected in an AGE domain with a minimum and maximum value.