[DFDL-WG] Need dfdl:inputValueCalc and dfdl:outputValueCalc on same element

Mike Beckerle mbeckerle.dfdl at gmail.com
Tue Jul 19 13:48:51 EDT 2016


So in PCAP format we find something like this:


<element name="length" type="xs:int"
  dfdl:outputValueCalc="{ dfdl:contentLength(../payload) + 20 }">
<element name="payloadLength" type="xs:int"
  dfdl:inputValueCalc="{ ../length - 20 }" />
<element name="payload" dfdl:length="{ ../payloadLength }">
   <complexType>.....</complexType>
</element>


To make this unparse we really need the payloadLength element to carry both
an IVC and an OVC.

Otherwise when unparsing the dfdl:length expression on the payload element
can't be meaningful. We have an erratum that states that length expressions
are always re-evaluated when unparsing, so as to produce a target length
that can be used to insert padding/fillByte.

However, the spec currently says you cannot have both IVC and OVC on the
same element.

I do not recall why we have this restriction, other than trying to prohibit
things we didn't think were necessary, but it seems in this situation to be
needed.

Comments?


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
<http://www.ogf.org/About/abt_policies.php>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20160719/1942cef8/attachment.html>


More information about the dfdl-wg mailing list