Background for discussion on DFDL WG call today.
Part of deferred action 242.
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
----- Forwarded by Steve
Hanson/UK/IBM on 24/05/2016 11:58 -----
From:
Steve Hanson/UK/IBM
To:
Mike Beckerle <mbeckerle.dfdl@gmail.com>
Cc:
"dfdl-wg@ogf.org"
<dfdl-wg@ogf.org>, dfdl-wg-bounces@ogf.org
Date:
28/04/2014 11:10
Subject:
Re: [DFDL-WG]
dfdl:contentLength and complex types with interior
alignmentFill
Mike
This doesn't solve the problem fully,
because it assumes an alignment of 0 and in practice the alignment might
be some odd number that forces the first child with alignment 2, 4 or 8
onto a different offset, and hence the length is different. So I'm
not sure whether the additional calculation helps much.
Regards
Steve Hanson
Architect, IBM
DFDL
Co-Chair, OGF
DFDL Working Group
IBM SWG, Hursley, UK
smh@uk.ibm.com
tel:+44-1962-815848
From:
Mike Beckerle <mbeckerle.dfdl@gmail.com>
To:
"dfdl-wg@ogf.org"
<dfdl-wg@ogf.org>,
Date:
24/04/2014 22:36
Subject:
[DFDL-WG] dfdl:contentLength
and complex types with interior alignmentFill
Sent by:
dfdl-wg-bounces@ogf.org
dfdl:contentLength interacts pretty badly with alignment
because alignmentFill regions mean you cannot know the size of a complex
type element without knowing its starting position.
It is very likely that one will have outputValueCalc that
wants to evalutate dfdl:contentLength on an infoset item before the starting
position for that item is known or knowable.
To fix this we say that dfdl:contentLength(e) on complex-type
infoset item e, is computed as if element e's alignment was first put into
place along with the rest of the LeftFraming, and then the content length
computed as if the complex content was unparsed starting from after that
LeftFraming up to the final RightFraming In other words, the entire element
has to be unparsed, not just the complex content of it, and then the part
of that unparsed data that corresponds to the complex content is used as
the return value from dfdl:contentLength.
This works because element e's alignment (LeftFraming generally) is not
within the complex content for element e. It is before the complex content
of the element, so if the schema puts an explicit alignment on element
e, then it will clearly be aligned that way when it is really unparsed,
but the dfdl:contentLength function will also compute a length from the
infoset value as if that same alignment were in place.
I think that is about the best we can do.
Thoughts?
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
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