THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
A common case of such circumstances is when an expression only accesses the previous array index, such as maintaining a running sum of an array of integers. The following schema describes this, but provides a hint that only one previous array index is needed by an expression:
Code Block | ||
---|---|---|
| ||
<xs:element name="arr" maxOccurs="unbounded" dfdlx:previousArrayIndiciesRequired="1"> <xs:complexType> <xs:sequence> <xs:element name="int" type="xs:int" ... /> <xs:element name="runningSum" type="xs:int" dfdl:inputValueCalc="{ if (dfdl:occursIndex() eq 1) then ../int else ../int + ../../arr[dfdl:occursIndex() - 1]/runningSum }" /> </xs:sequence> </xs:complexType> </xs:element> |
...