Troubleshooting
Problem
XPath - how to create attributes for elements when the element contains no text.
Symptom
The goal is to create 12 nodes in ProcessData, each with an attribute containing a month of the year. The previous node is being overwritten by the node that follows it. The assign statements have the append property set to true. When the BP completes, the only node that is present is the one for December. January through November are overwritten. Below is a portion of the BP and along with a sample of the desired output.
<process name="test_convert_num_Month_2_Text">
<sequence name="Sequence Start">
<assign name="Assign" to="/Month/month/@monthnum" from="'January'" append="true"></assign</span>
<assign name="Assign" to="/Month/month/@monthnum" from="'February'" append="true"></assign>
<assign name="Assign" to="/Month/month/@monthnum" from="'March'" append="true"></assign>
<assign name="Assign" to="/Month/month/@monthnum" from="'April'" append="true"></assign>
</sequence>
</process>
This is an example of how the file should look:
<ProcessData>
<Month>
<month monthnum="January"/>
<month monthnum="February"/>
:
<month monthnum="November"/>
<month monthnum="December"/>
</Month>
</ProcessData>
No errors, but the ProcessData does not contain the desired output.
Log InLog in to view more of this document
Historical Number
NFX9908
Was this topic helpful?
Document Information
Modified date:
11 February 2020
UID
swg21558138