Better approach would be
Attached below is a schema coded with the assumption (a) listed above..
<xsd:complexType
name="CobolTypes">
<xsd:sequence>
<!----------------
External Decimal -------------------------------->
<xsd:element
name="elem9"
dfdl:ref="dfdlCobolFmt:CobolZonedDecimalFormat"
dfdl:length="4"
dfdl:representation="text"
dfdl:numberPattern="0000">
<xsd:simpleType>
<xsd:restriction
base="xsd:short">
<xsd:minInclusive
value="0"
/>
<xsd:maxInclusive
value="9999"
/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element
name="elem9Signed"
dfdl:ref="dfdlCobolFmt:CobolZonedDecimalFormat"
dfdl:length="4"
dfdl:representation="text"
dfdl:numberPattern="0000+"
>
<xsd:simpleType>
<xsd:restriction
base="xsd:short">
<xsd:minInclusive
value="-9999"
/>
<xsd:maxInclusive
value="9999"
/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element
name="elem9SignedLeading"
dfdl:ref="dfdlCobolFmt:CobolZonedDecimalFormat"
dfdl:length="4"
dfdl:representation="text"
dfdl:numberPattern="+0000">
<xsd:simpleType>
<xsd:restriction
base="xsd:short">
<xsd:minInclusive
value="-9999"
/>
<xsd:maxInclusive
value="9999"
/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element
name="elem9SignedLeadingSeparate"
dfdl:ref="dfdlCobolFmt:CobolStandardDecimalFormat"
dfdl:length="5"
dfdl:representation="text"
dfdl:numberPattern="+0000;-00000"
>
<xsd:simpleType>
<xsd:restriction
base="xsd:short">
<xsd:minInclusive
value="-9999"
/>
<xsd:maxInclusive
value="9999"
/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element
name="elem9SignedTrailingSeparate"
dfdl:ref="dfdlCobolFmt:CobolStandardDecimalFormat"
dfdl:length="5"
dfdl:representation="text"
dfdl:numberPattern="0000+;00000-">
<xsd:simpleType>
<xsd:restriction
base="xsd:short">
<xsd:minInclusive
value="-9999"
/>
<xsd:maxInclusive
value="9999"
/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
----- Data format Definitions
<xsd:defineFormat
name="CobolStandardDecimalFormat">
<xsd:format
ref="tns:BaseTextNumberStandardDecimal"
dfdl:lengthKind="explicit"
dfdl:lengthUnits="bytes"
dfdl:alignment="1"
dfdl:alignmentUnits="bytes"
dfdl:leadingSkipBytes="0"
dfdl:trailingSkipBytes="0"
/>
</xsd:defineFormat>
<xsd:defineFormat
name="CobolZonedDecimalFormat">
<xsd:format
ref="tns:BaseTextNumberZonedDecimal"
dfdl:lengthKind="explicit"
dfdl:lengthUnits="bytes"
dfdl:alignment="1"
dfdl:alignmentUnits="bytes"
dfdl:leadingSkipBytes="0"
dfdl:trailingSkipBytes="0"
/>
</xsd:defineFormat>
-- Text number Formats ( added here
for reference to identify applicable attributes for standard and zoned
decimal)
<xsd:defineTextNumberFormat
name="ZonedDecimalNumberFormat">
<xsd:textNumberFormat
numberCheckPolicy="lax"
numberRoundingMode="roundUp"
numberZonedSignStyle="asciiStandard"
/>
</xsd:defineTextNumberFormat>
<xsd:defineTextNumberFormat
name="StandardDecimalFormat">
<xsd:textNumberFormat
numberGroupingSeparator=","
numberDecimalSeparator="."
numberExponentCharacter="E"
numberCheckPolicy="lax"
numberInfinityRep="\u221E"
numberNanRep="\uFFFD"
numberRoundingMode="roundUp"
numberZeroRep=""
"" />
</xsd:defineTextNumberFormat>
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