Graphical mapping data type compatibility

Data type compatibility checking is implemented, which is done when performing a mapping. Elements from the source are only permitted to be mapped directly to a compatible element type in the target. If a mapping is not compatible the editor does not approve a mapping connection. If the data type of an already mapped source or target element is changed in the schema and the new data types are not compatible. The mapping connection is removed. The mouse icon changes to indicate an incompatible type. The W3C website (w3.org) diagram shows the type compatibility:

nt_screen_datatype_comp

Note:  When using a function that returns an output that is of anyType, you can define the target and its children. No validation error is raised if the element with such function has one or more required children when they are not matched. Check whether the required child nodes in the target are set correctly, either by the aforementioned parent function or in separate connection with the source.

To map between incompatible types one or more functions are required. Add them to the mapping between the source and the target elements of the mapping. You can perform casting manually by creating a function. You can also automatically cast from the source type to the target type where a casting function is available.