It seems DFDL is very verbose. I have to copy and paste a lot of lines to reuse 
a structure definition.
Or am I missing a trick? I can do this with simple types.

<!-- Register instance - Current usage --->
<xs:element name="AP_Input" >
    <xs:complexType>
         <xs:sequence>
             <xs:element  ref="register" >
         </xs:sequence>
      </xs:complexType>
</xs:element>

<!-- WISH: Register instance - compact form-->
                    <xs:element name="AP_Input" type="register" >

<!-- register structure definition -->
<xs:element name="register" >
     <xs:complexType>
         <xs:sequence>
             <xs:element name="App_Slot"  type="xs:unsignedByte"/>
             <xs:element name="App_Array" type="xs:unsignedByte"/>
              <xs:element name="App_Index" type="xs:unsignedShort"/>
         </xs:sequence>
      </xs:complexType>
</xs:element>

****************** Expected output:
<AP_Input>
   <register>
      <App_Slot>0</App_Slot>
      <App_Array>0</App_Array>
      <App_Index>0</App_Index>
  </register>
</AP_Input>

Reply via email to