Liquid XML Studio
See Also Send Feedback
Data Mapping > Data Mapper Functions > By Category > Logic > False

Glossary Item Box

Function Name
A boolean false value
None -
Result A constant boolean value of false
None -


The Data Mapper Logic False component allows you to feed a literal boolean value directly into your Mapping functions and output. Since the False function outputs a boolean, you may also use it in conjunction with other functions in the Set, Logic and Comparator categories. To apply the Logic False function, use the following process:

Create a new Data Mapper file, dragging your XML data source and targets into the editor area. For this example we are using staff_source.xsd, an XML Schema Definition inferred from the following source:

Source XML Copy Code

For our target schema we will be using staff_alt_target.xsd, inferred from the following XML:

Target XML Copy Code
 <staff_member since="2000" contract="false" certified="true">
 <staff_member since="2003" contract="true" certified="false">
 <staff_member since="1998" contract="false" certified="true">

The data models employees within an organisation. Notice that the target data model contains a value that is not in the source: the "certified" attribute of the "staff_member" element, representing some sort of work-related certification status. Let's assume that we are mapping data records for employees we know are not certified, perhaps due to which department they are in or where the data has been retrieved from. This means that we know all records should be output with a value of false for the attribute, and can use the False component to define this. Here is the Data Mapper with Source and Target imported:

Data Mapper Source and Target

Drag the Logic False function from the Component Palette into the mapping area:

False Component

False Added

The False component has no inputs, and a single output which is always a boolean false value. The output of the False function may be connected to items in the XML Writer or other components in the Mapper.

Connect the output of the False function to the "certified" input in the XML Writer.

False Mapped

Now each boolean value in the "certified" element will be false for the data being mapped. Finally let's make the remaining input and output connections.

Inputs and Outputs Connected

We can now execute the transform by pressing Shift-F5 or the Execute button (Execute). The transform is applied and the file we selected as output opens in the editor:

Output XML Copy Code
 <staff_member since="2001" contract="true" certified="false">
 <staff_member since="1998" contract="true" certified="false">
 <staff_member since="2008" contract="false" certified="false">
 <staff_member since="1999" contract="false" certified="false">

The output contains the input data plus a false value for each staff member "certified" attribute.

See Also