A Test Condition controls the output of optional target elements that do not have a link from a source element or a literal. In the Test Condition link's Test field, you define a test expression under which the target element is created. In the transformation Map canvas, you can add a Test Condition node that can be linked to one or more targets.
To add a Test Condition:
Double-click to expand the target schema node.
The target schema node converts to a dialog containing its schema tree and all possible targets. You can resize this dialog.
Right-click on the Map canvas and select Add Test Condition from the context menu.
To link the Test Condition to one or more targets:
Click the Test Condition node connection point, which is a yellow or green dot.
Click directly on the target name, for example, Month12 [xsd:integer].
A map link, which appears as a blue arrow, connects the Test Condition to the target.
Click the Test Condition (test_n) node to edit the Test Properties in the Properties Panel view.
Click a Test Condition map link to edit the Link properties in the Properties Panel view:
Link properties
Field | Explanation and options | |
---|---|---|
Source test condition | Displays the name of the literal node, for example, literal_4, as defined earlier in Literal properties. | |
Target full path | Displays a string identifying the target schema, element, and attribute (optional), for example, /sy2:OrderSummary/Sy2:OrderRef. | |
Path Field | Explanation | |
sy2 | An arbitrary namespace identifier. | |
OrderSummary | The name of the schema's root node. | |
OrderRef | The target, in this case, an element. | |
Target relative path | Displays a string identifying the target without the schema qualifier, for example, ../ParallelAttributeInSameElement. | |
Test | Enter the
test condition that defines the condition on which the target is created.
For example, /sy2:OrderSummary/Sy2:OrderRef!=" checks the presence of input values during runtime and omits the target in the resulting XML document if Sy2:OrderRef is empty (null). |
Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com