Monday, May 12, 2008

BAG and IVL types translated differently when generating XSDs from MIF

Rajeev says:
SET – This is a bag. When translated to XSD the cardinality defines the number of nodes and each node is of the type defined in the supplierBindingArgumentDatatype. I.e. SET [0..5] indicates that there will be 5 nodes of type II.BUS. However, what cannot be enforced in XSD are rules like “in a SET each node must be unique”.

IVL – This is not a bag, but an interval consisting of nodes with other data types. Therefore, this becomes a data type itself. In the example below IVL_TS.FULLDATETIME is the data type. This, in theory, translates as an interval node with multiple child nodes, each of which is declared as TS.FULLDATETIME.

You have to remember that when reading a MIF, don’t think XSD. Read the MIF as per the spec. and then think of how we may translate to XSD. It took me a while to get into this mode of thinking.

No comments: