Alan/Steve -  Changes after our meeting this morning (June 16, 2009)  

It addresses the problem hilited today in the meeting related to semantics of dfdl:ref="myFormat" annotation on a xsd constructs. The net effect of this annotation is as if the dfdl:format annotation (along with the  attribute settings) is specified explicitly on the xsd construct.  By providing a level of indirection and referencing variable block through varRef annotations, we have permitted visibility to variables but not to the definition of variables.  

Excerpts from MyEnvelopeFormat.xsd - attached for perusal.. Also attached is the    PI for the example ( see updated xsd files under the folder enveloper_skk)

        <xsd:annotation>
                <xsd:appinfo source="http://dataformat.org/">
                        <dfdl:defineFormat name="MyEnvelopeFormat" baseFormat="dfdlDefaultFormat:defaultFormat" >

                                <!--  statically override properties specific to the envelope wrapped messages -->
                                <dfdl:format byteOrder="big-Endian"   varRef="./MyEnvelopeFormatVariables"/>

                                <!--
                                          Identify variables for processing the messages wrapped in an envelope
                                          i.e. the set of properties values that I need to take from input data and
                                          dynamically set the values of dfdl properties during the processing of the message.
                                         
                                          Assumption: Names of variables defined in the format are unique
                                         
                                -->
 
                <!--  Define the variables needed for the format locally in the format block       -->
               <!--  They could also be defined at the schema level and referenced through varRef -->
               <!--  as its definition is QName just like textFormatBlock or numberFormatBlock    -->
               <!--  Best practice would be to constraint the variable block locally              -->
               
              <dfdl:defineVariableBlock name="MyEnvelopeFormatVariables">
                                <dfdl:defineVariable name="sep" type="string" />
                                <dfdl:defineVariable name="enc" type="string" />
                                <dfdl:defineVariable name="outputDirPathSep" type="string" default="/" use="output" />
                                <dfdl:defineVariable name="outputMsgKind" type="string" use="output" />
                                <dfdl:defineVariable name="inputMsgKind" type="string" use="input" />
              </dfdl:defineVariableBlock>
 
                        </dfdl:defineFormat>
                </xsd:appinfo>
        </xsd:annotation>


Suman Kalia
IBM Toronto Lab
WMB Toolkit Architect and Development Lead
WebSphere Business Integration Application Connectivity Tools

http://www.ibm.com/developerworks/websphere/zones/businessintegration/wmb.html

Tel : 905-413-3923  T/L  969-3923
Fax : 905-413-4850 T/L  969-4850
Internet ID : kalia@ca.ibm.com