Kbase P116560: By default WRITE-XMLSCHEMA generated XSD files with 0 decimals
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/16/2008 |
|
Status: Unverified
FACT(s) (Environment):
OpenEdge 10.1A
SYMPTOM(s):
Using WRITE-XMLSCHEMA ProDataSet / buffer object method.
The temp-table contains decimal field definition which doesn't explicit specify DECIMALS.
The generated XSD file shows decimals 0.
Reproducible code looks like:
/*--------------------------*/
DEFINE TEMP-TABLE ttDataType
FIELD myDecimal_1 AS DECIMAL
FIELD myDecimal_2 AS DECIMAL DECIMALS 2.
CREATE ttDataType.
ASSIGN
ttDataType.myDecimal_1 = 9876.1234567890
ttDataType.myDecimal_2 = 9876.1234567890 .
TEMP-TABLE ttDataType:DEFAULT-BUFFER-HANDLE:WRITE-XML("FILE",'DataType.xml').
TEMP-TABLE ttDataType:DEFAULT-BUFFER-HANDLE:WRITE-XMLSCHEMA("FILE",'DataTypeXSD.xml').
OS-COMMAND NO-WAIT DataTypeXSD.xml.
/*-----------------------*/
The output XSD file shows:
<xsd:element name="myDecimal_1" type="xsd:decimal" nillable="true" prodata:decimals="0" />
<xsd:element name="myDecimal_2" type="xsd:decimal" nillable="true" prodata:decimals="2" />
In the example above, for myDecimal_1 the decimals should be 10 as the temp-table decimal fields default DECIMALS is 10.
CAUSE:
This is a known issue being investigated by Development.
FIX:
Add DECIMALS 10 in the temp-table field definition.