Hi Suman,

The DFDL expression language does not permit forward references when parsing. See Alan's document which has been rolled into draft 031. You'll have to push the discriminator down inside the group.

Regards, Steve

Steve Hanson
WebSphere Message Brokers
Hursley, UK
Internet: smh@uk.ibm.com
Phone (+44)/(0) 1962-815848



Suman Kalia <kalia@ca.ibm.com>
Sent by: dfdl-wg-bounces@ogf.org

14/02/2008 20:04

To
dfdl-wg@ogf.org
cc
Subject
[DFDL-WG] Fw:  DFDL: Minutes from OGF WG call, 13 Feb 2008






I have reworked the example where the choice branch condition was specified outside the choice contents. We don't have to specifically mention switch, case statement programming paradigm in DFDL; thinking more about this, I believe switch/case statement paradigm is not relevant here.   Attached is the reworked example  .


I also created another example by importing COBOL copy book (containing redefine clause) using IBM message broker toolkit. Here the branch condition is described inside the choice  .  In this case the discriminator contain forward reference to check the condition value; implementations may want to restrict the forward reference to the first token within the contents of choice branch.  


Note : Discriminators are useful when user is dealing with binary or text data which is not tagged..



Your comments/ suggestions are most welcome and appreciated..



Suman Kalia
IBM Toronto Lab
WebSphere Business Integration Application Connectivity Tools
Tel : 905-413-3923  T/L  969-3923
Fax : 905-413-4850 T/L  969-4850
Internet ID : kalia@ca.ibm.com

----- Forwarded by Suman Kalia/Toronto/IBM on 02/14/2008 02:47 PM -----
Ian W Parkinson <PARKIW@uk.ibm.com>
Sent by: dfdl-wg-bounces@ogf.org

02/14/2008 01:34 PM


To
dfdl-wg@ogf.org
cc
Subject
[DFDL-WG] DFDL: Minutes from OGF WG call, 13 Feb 2008








Open Grid Forum: Data Format Description Language Working Group


Weekly Working Group Conference Call

17:00 GMT, 13 Feb 2008



Attendees

Mike Beckerle (Oco)

Steve Hanson (IBM)

Suman Kalia (IBM)

Simon Parker (PolarLake)

Ian Parkinson (IBM)


Apologies

Alan Powell (IBM)



1. Specification Draft Status


Alan has distributed draft 31 of the DFDL specification. The meeting reviewed the plan for the next few versions of the drafts and updated it to reflect progress and revised target dates - a copy of the updated plan is attached to these minutes.


2. Assertions, Discriminators and Choice


Suman has distributed an example showing the use of discriminators in choice constructs in DFDL schemas.
The meeting discussed the distinction between discriminators and assertions - Mike described an assertion as simply a predicate which, if encountered within a choice, can cause backtracking. In contrast a succesful discriminator expression would lock the choice into a particular branch. If no discriminator matches, then the parse would fail - unless, as Simon pointed out, the choice itself was optional. Simon also suggested that the last branch of a choice could be left without a discriminator to act a a catch-all, but felt that the purpose of a discriminator should be more to help disambiguate between the possible branches rather than form such a "swtich" construct.


Steve asked about the timing attribute on assertions, and in particular whether we'd need a similar attribute for discriminators. Mike suggested that the timing attribute might have been included simply to make implementation easier; as without it an implementation would need to perform a significant amount of static analysis. The motivation for discriminators was to allow a choice to be resolved by data encountered before the choice. However as Steve and Suman thought there were use cases where a discriminator might need to refer to elements inside the choice, and so a timing option would be useful. Suman will prepare such an example, and Mike will schedule a further discussion of this topic.


Simon distributed an alternative example, showing the use of fixed fields instead of discriminators or assertions., which he felt might form a useful starting point for a full description of choice disambiguation.


(Steve left the meeting)



3. Presentation for next OGF conference


Simon suggested that Mike highlight the recent discussion topics of the working group, and items which have recently been added to the specification, and asked whether it would be useful to include the UML diagrams. Mike would like to display the diagrams and see whether they trigger a discussion amongst the delegates. He would also like to present work on variable markup and valueCalc.



Meeting closed, 18:00 GMT




Attachment: revised plan for specification drafts


Draft 31
: Draft 32 ("vX+2"):
Draft 33: ("vX+3"):

Extraneous to spec:



Ian Parkinson
WebSphere ESB Development
Mail Point 211, Hursley Park, Hursley, Winchester, SO21 2JN, UK




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
http://www.ogf.org/mailman/listinfo/dfdl-wg--
 dfdl-wg mailing list
 dfdl-wg@ogf.org
 http://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