clarification needed - choice with both dispatch and discriminator

Section 15.1.2 says you can have both dfdl:choiceBranchKey and a discriminator on a choice branch. But it doesn't clarify what the meaning of having both is. My assumption is that if you have both, the choice is resolved by the choiceDispatchKey/choiceBranchKey, so any discriminator would be about some surrounding point of uncertainty outside the choice. I wanted to confirm this is the intention. The alternative semantics would be that the discriminator is redundant, and so if it evaluates to true that means nothing at all since the choice branch has already been discriminated by the choiceDispatchKey/choiceBranchKey. If the discriminator evaluates to false, or errors when it evaluates, that would be a parse error that would cause the entire choice to fail. 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>


The choiceBranchKey resolves the choice PoC and the subsequent discriminator resolves any outer PoC. Andy I have modified your words - do you agree? Regards Steve Hanson IBM Hybrid Integration, Hursley, UK Architect, IBM DFDL Co-Chair, OGF DFDL Working Group smh@uk.ibm.com tel:+44-1962-815848 mob:+44-7717-378890 From: Andrew Edwards/UK/IBM@IBMGB To: mbeckerle.dfdl@gmail.com Cc: dfdl-wg@ogf.org Date: 27/01/2017 03:57 Subject: Re: [DFDL-WG] clarification needed - choice with both dispatch and discriminator Sent by: "dfdl-wg" <dfdl-wg-bounces@ogf.org> Section 15.1.2 also says the following: When a match is found, it is as if a dfdl:discriminator had evaluated to true on that branch. It is selected as resolution of the choice, and there is no backtracking to try other alternative selections if a processing error occurs. I have always taken that to mean that a match with direct dispatch is taken as definitive, and if a following discriminator check on that choice branch fails, then it is a valid error situation. That is to say, the model is accurately saying that the data doesn't match the entire choice. It matches enough to look like direct dispatch can make a selection and resolve the choice to that branch, but a further discrimination check has proved that the entire choice doesn't match the data. Andy Edwards Software Engineer E-mail: andy.edwards@uk.ibm.com Snail-mail: MP211, Hursley park, Hursley, WINCHESTER, Hants, SO21 2JN Phone (internal): 247222 Phone (external): 44-1962-817222 Desk: DE3 F16 The Feynman problem solving Algorithm: 1) Write down the problem 2) Think real hard 3) Write down the answer -- Murray Gell-mann in the NY Times ----- Original message ----- From: Mike Beckerle <mbeckerle.dfdl@gmail.com> Sent by: "dfdl-wg" <dfdl-wg-bounces@ogf.org> To: "dfdl-wg@ogf.org" <dfdl-wg@ogf.org> Cc: Subject: [DFDL-WG] clarification needed - choice with both dispatch and discriminator Date: Wed, Jan 25, 2017 11:05 PM Section 15.1.2 says you can have both dfdl:choiceBranchKey and a discriminator on a choice branch. But it doesn't clarify what the meaning of having both is. My assumption is that if you have both, the choice is resolved by the choiceDispatchKey/choiceBranchKey, so any discriminator would be about some surrounding point of uncertainty outside the choice. I wanted to confirm this is the intention. The alternative semantics would be that the discriminator is redundant, and so if it evaluates to true that means nothing at all since the choice branch has already been discriminated by the choiceDispatchKey/choiceBranchKey. If the discriminator evaluates to false, or errors when it evaluates, that would be a parse error that would cause the entire choice to fail. 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 -- 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 -- 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
participants (3)
-
Andrew Edwards
-
Mike Beckerle
-
Steve Hanson