[DFDL-WG] New Experimental Feature document: dfdl:emptyElementParsePolcy

Mike Beckerle mbeckerle.dfdl at gmail.com
Fri Nov 22 14:43:22 EST 2019


Actually daffodil doesn't insert defaults when parsing, it creates the
element, having no value, and then on-demand, when accessed, the value is
pulled from where we save it in the static runtime data structures, and is
saved as the element's value.  This can happen when an expression refers to
the element, or when the data set is subsequently output as some other
representation like JSON or XML.

So we *are* somehow doing defaults when parsing. Just not at the time the
parser traverses the element.  For all intents and purposes we are doing
defaulting during parsing. Not unparsing yet though.

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>



On Fri, Nov 22, 2019 at 11:57 AM Steve Hanson <smh at uk.ibm.com> wrote:

> Mike
>
> The new document looks good, the descriptions of the property values are
> clear and simple.
>
> One comment of yours I need to follow up though. You said:
>
> " Bug in this doc. Daffodil is not inserting defaults here (doesn’t
> implement default insertion when parsing.)  Fixed with new language you
> suggested. "
>
> Are you saying that if Daffodil parses an occurrence and determines it has
> the empty rep, and there is a default value on the element declaration,
> that the default value is not used?  If so then what happens?  Further, if
> you subsequently change Daffodil so it does use the default value, you have
> silently changed parsing behaviour in an incompatible way. IBM DFDL
> similarly does not use default values when parsing, but to prevent a future
> incompatible behaviour change, if we find a zero-length occurrence and
> there is a default value, we throw a runtime SDE.
>
> Regards
>
> Steve Hanson
>
> IBM Hybrid Integration, Hursley, UK
> Architect, *IBM DFDL*
> <http://www.ibm.com/developerworks/library/se-dfdl/index.html>
> Co-Chair, *OGF DFDL Working Group* <http://www.ogf.org/dfdl/>
> *smh at uk.ibm.com* <smh at uk.ibm.com>
> tel:+44-1962-815848
> mob:+44-7717-378890
> Note: I work Tuesday to Friday
>
>
>
> From:        Mike Beckerle <mbeckerle.dfdl at gmail.com>
> To:        Steve Hanson <smh at uk.ibm.com>
> Cc:        DFDL-WG <dfdl-wg at ogf.org>
> Date:        16/10/2019 19:19
> Subject:        [EXTERNAL] Re: [DFDL-WG] New Experimental Feature
> document: dfdl:emptyElementParsePolcy
> ------------------------------
>
>
>
>
> I have revised this per your comments, and uploaded a new revision. Link:
> *https://redmine.ogf.org/dmsf_files/13596?download=*
> <https://redmine.ogf.org/dmsf_files/13596?download=>
>
>
> Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
> *www.tresys.com* <http://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>
>
>
>
> On Wed, Oct 16, 2019 at 12:23 PM Steve Hanson <*smh at uk.ibm.com*
> <smh at uk.ibm.com>> wrote:
> Mike
>
> Some significant comments on this.
>
>
>
> Regards
>
> Steve Hanson
> IBM Hybrid Integration, Hursley, UK
> Architect, *IBM DFDL*
> <http://www.ibm.com/developerworks/library/se-dfdl/index.html>
> Co-Chair, *OGF DFDL Working Group* <http://www.ogf.org/dfdl/>
> *smh at uk.ibm.com* <smh at uk.ibm.com>
> tel:+44-1962-815848
> mob:+44-7717-378890
> Note: I work Tuesday to Friday
>
>
>
> From:        Mike Beckerle <*mbeckerle.dfdl at gmail.com*
> <mbeckerle.dfdl at gmail.com>>
> To:        DFDL-WG <*dfdl-wg at ogf.org* <dfdl-wg at ogf.org>>
> Date:        14/10/2019 19:58
> Subject:        [EXTERNAL] [DFDL-WG] New Experimental Feature document:
>      dfdl:emptyElementParsePolcy
> Sent by:        "dfdl-wg" <*dfdl-wg-bounces at ogf.org*
> <dfdl-wg-bounces at ogf.org>>
> ------------------------------
>
>
>
> Per one of our trackers I uploaded an "official" document to describe this
> experimental feature.
>
> gwde-dfdl-experience-7-emptyElementParsePolicy.docx
>
> This describes the feature as we have implemented it in Daffodil. There
> has been some discussion on this proposal already, particularly on whether
> the enum values for the property are appropriately chosen so that they
> clearly identify the different behaviors.
>
> Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
> *www.tresys.com* <http://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>
> --
>  dfdl-wg mailing list
>  *dfdl-wg at ogf.org* <dfdl-wg at ogf.org>
>  *https://www.ogf.org/mailman/listinfo/dfdl-wg*
> <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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20191122/0ae462b7/attachment-0001.html>


More information about the dfdl-wg mailing list