Figure 28 illustrates the different types of mappings when elements are required, optional, or nillable.
In the example above, Item and
Amount illustrate mapping required elements to other required elements. The
OnSale element illustrates mapping a nillable element to an optional element. The
Discount element illustrates mapping an optional element to an optional element. The
Pickup element illustrates mapping an optional element to a nillable element. The
CustomerAddr and
ShipTo elements illustrate mapping an optional and nillable element to an optional and nillable element.
Below is the XSLT template illustrated by the mappings in Figure 28. You can see from the XSLT code that certain mappings are automatically surrounded by tests to create the appropriate input schema.