Clarification of XPath XML usage changes introduced in LiveCycle ES 8.0.1.1
Issue
The initial release of Adobe LiveCycle ES, version 8.0.1 introduced changes to how XPath and node data is handled. Copying a node from the source to a target using XPath adds the node as a child to the target. This is different from the way LiveCycle 7.x works and affects backward compatibility. In addition, when the node is copied, all of the node's existing children are removed and then the node is appended to the target. See the Example section to review an example of this behavior.
Solution
Install the latest service pack for LiveCycle ES, version 8.0.1 to resolve this issue. If you have installed any of Service Packs 1, 2 or 3 (versions 8.0.1.1, 8.0.1.2, or 8.0.1.3), your LiveCycle ES environment will behave as required. If you have not updated your LiveCycle ES environment, you can obtain the latest service pack from the LiveCycle Developer Center.
Example
The following XML sample illustrates the how the XML structure is affected by this issue without the service pack updates.
Note: This is not a real world example and omits the parent XML structure of (/process_data/formVariable/object/data/xdp/datasets/).
<data>
<TextField1>Hello world 1...</TextField1>
<SomeOtherField1/>
<form1>
<MyFormField1></MyFormField1>
<TextField1>Hello world 2...</TextField1>
<AnotherNode>
<TextField1>Hello world 3...</TextField1>
</AnotherNode>
</form1>
</data>
When copying the node form1 from source to target within the SetValue service, you would do the following:
/process_data/formVariable/object/data/xdp/datasets/data =
/process_data/formVariable/object/data/xdp/datasets/data/form1
This would append form1 and all its children to the data node in our target. Because LiveCycle ES, version 8.01 removes and appends all the children from the source node, the same copy would be written like:
/process_data/formVariable/object/data/xdp/datasets/data/form1 =The following examples are based on the sample code above.
/process_data/formVariable/object/data/xdp/datasets/data/form1
-
/process_data/formVariable/object/data/xdp/datasets/data/TextField1will return"Hello world 1...". -
/process_data/formVariable/object/data/xdp/datasets/data/form1/TextField1will return"Hello world 2...". -
/process_data/formVariable/object/data/xdp/datasets/data/form1/AnotherNode/TextField1will return"Hello world 3...". -
/process_data/formVariable/object/data/xdp/datasets/data//TextField1returns"Hello world 1...","Hello world 2...", and"Hello world 3..."and therefore is more flexible if the exact structure of an XML is not known (for example, when using a relative path).
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
