|Re: How do we make integer datatype behave like String data type in XML/XSD? [message #1229975 is a reply to message #1229710]
||Fri, 10 January 2014 17:53
| Ed Merks
Registered: July 2009
This forum is for asking questions about using the XSD model not about |
how to design XML Schemas. The XML Schema specification defines that
the integer data type behaves the way you describe so if you need
something different, i.e., that leading zeros are somehow meaningful,
you can't use that data type. Of course you can always pad with leading
On 10/01/2014 3:43 PM, RIMD NA wrote:
> 0 down vote favorite
> I have the following XSD/XML type definition. It has been used by
> number of business units/applications.
> <xsd:simpleType name="INDUSCodeType">
> <xsd:restriction base="xsd:integer">
> <xsd:minInclusive value="000001"/>
> <xsd:maxInclusive value="999000"/>
> As this one defined as "integer" data type, it strips the leading
> zeros of input. Eg: 0078 become 78 after parsing.
> We need to pass the input as it is without stripping leading zeros eg
> 0078 become 0078 after parsing.
> The ideal fix is to change the integer to string in restriction base.
> It is non-starter due to buy in from other groups.
> You know we can redefine in COBOL Copy book such as F1 PIC 9(9) and
> redefines to PIC X(9) . As we consume redefined X(9), input parsed as
> it is without stripping zeros.
> Is there a way to redefine in XML/XSD the above data type for desired
> How do I do it?
> Books and net dont seem to have helped too much either, so I am
> starting to question if this is theoretically possible at all
> Thanks in helping.
Powered by FUDForum
. Page generated in 0.01999 seconds