Mike - What is the motivation for spreading the annotations on the same object ??  It  certainly adds complexity to the model and once you are on this path, you would have to start working out precedence rules - whether the short ( attribute)  form takes precedence over element form if same set or related set of  properties are spread over these annotations..  

Suman Kalia
IBM Canada Lab
WMB Toolkit Architect and Development Lead
Tel: 905-413-3923 T/L 313-3923
Email: kalia@ca.ibm.com

For info on Message broker
http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html





From:        Steve Hanson <smh@uk.ibm.com>
To:        Mike Beckerle <mbeckerle.dfdl@gmail.com>,
Cc:        dfdl-wg@ogf.org, dfdl-wg-bounces@ogf.org
Date:        10/30/2012 02:38 PM
Subject:        Re: [DFDL-WG] question relevant to evaluation timing - short form
Sent by:        dfdl-wg-bounces@ogf.org




This makes no sense to me. It doesn't work - you can't spread properties across multiple annotations and expect the timing to be different at runtime - what if dfdl:length was on one and dfdl:lengthKind on the other?

IBM DFDL disallows this in its xsd for DFDL annotations. Spec should make this clear if it doesn't already.

Regards

Steve Hanson
Architect, Data Format Description Language (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,
Date:        
30/10/2012 17:50
Subject:        
[DFDL-WG] question relevant to evaluation timing - short form
Sent by:        
dfdl-wg-bounces@ogf.org





Can I do this?

<sequence>
  <annotation><appinfo...>
     <dfdl:setVariable ref="foo" .../>
     <dfdl:sequence initiator="{...expression involving foo...}"/>
     <dfdl:newVariableInstance ref="foo" value="{...some expression...}"/>
     <dfdl:sequence terminator="{...expression involving foo...}"/>
   </appinfo></annotation>
</element>

See how I am spreading out the evaluation of the runtime-valued properties with the setVariable and newVariable stuff.

This works so long as we evaluate everything in schema definition order.

Now let me throw one more wrench (spanner for the UK folks) in the works. I'm going to add a short form annotation:

<sequence dfdl:separator="{... expression...}">
  <annotation><appinfo...>
     <dfdl:setVariable ref="foo" .../>
     <dfdl:sequence initiator="{...expression involving foo...}"/>
     <dfdl:newVariableInstance ref="foo" value="{...some expression...}"/>
     <dfdl:sequence terminator="{...expression involving foo...}"/>
   </appinfo></annotation>
</element>

Now, a short form annotation is equivalent to a long form conversion thereof, but in this case is it this one???

<sequence>
  <annotation><appinfo...>
    <!-- short form annotation comes FIRST when converted. -->
     <dfdl:sequence separator="{...expression ...}"/> <!-- Expression cannot use variable foo. -->

     <dfdl:setVariable ref="foo" .../>
     <dfdl:sequence initiator="{...expression involving foo...}"/>
     <dfdl:newVariableInstance ref="foo" value="{...some expression...}"/>
     <dfdl:sequence terminator="{...expression involving foo...}"/>

   </appinfo></annotation>
</element>


Or... is it this one:

<sequence>
  <annotation><appinfo...>
     <dfdl:setVariable ref="foo" .../>
     <dfdl:sequence initiator="{...expression involving foo...}"/>
     <dfdl:newVariableInstance ref="foo" value="{...some expression...}"/>
     <dfdl:sequence terminator="{...expression involving foo...}"/>

     <!-- short form annotation comes LAST when converted -->
     <dfdl:sequence separator="{...expression ...}"/> <!-- expression could use varible foo. -->
   </appinfo></annotation>
</element>

I would argue I prefer the first one, because makes the lexical order of appearance consistent with evaluation order.

...mikeb



--
Mike Beckerle | OGF DFDL WG Co-Chair
Tel:  781-330-0412

--
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