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