New action 289 raised to clarify the behaviour when element A has an expression that refers back to an element B with OVC which refers ahead of A.

Regards
 
Steve Hanson

IBM Integration Bus, Hursley, UK
Architect,
IBM DFDL
Co-Chair,
OGF DFDL Working Group
smh@uk.ibm.com
tel:+44-1962-815848
mob:+44-7717-378890




From:        Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:        "dfdl-wg@ogf.org" <dfdl-wg@ogf.org>
Date:        25/07/2016 20:59
Subject:        [DFDL-WG] unparsing with dfdl:setVariable referring to        dfdl:outputValueCalc element
Sent by:        "dfdl-wg" <dfdl-wg-bounces@ogf.org>





I somehow think we already discussed this, but am unable to find the thread.


Suppose:

<xs:element name="len" type="xs:int" dfdl:outputValueCalc="{ dfdl:valueLength(../data) + 10 }"/>
<xs:sequence><xs:annotation><xs:appinfo ...>
    <dfdl:setVariable name="var">{ ../len }" />
</xs:appinfo></xs:annotation></xs:setVariable>
<xs:element name="data" dfdl:length="{ $var }">
    ....

</xs:element>

In the above, when unparsing, the output value calc for len can be evaluated, but we must delay its evaluation and unparsing until the subsequent data element is available.

The next thing the unparse has to do, after delaying the unparsing of 'len' is set the var variable. This requires the value of len, which has been deferred.

We have real schemas (e.g., even PCAP) where this occurs.

This breaks the rule that when variables are evaluated, things they reference must have already been evaluated. Basically, when we delay evaluating the OVC for len we are suspending anything that depends on len having a value as well.

Did we discuss and/or agree on this behavior? I don't have any work around for this.



Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology | www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are subject to the OGF Intellectual Property Policy
--
 dfdl-wg mailing list
 dfdl-wg@ogf.org
 
https://www.ogf.org/mailman/listinfo/dfdl-wg


Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU