Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2378

Number sign unparses in wrong part of number text: "0000000-1"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 2.7.0
    • 3.0.0
    • Back End
    • None

    Description

      The unparser test case below fails.

      The output is "0000000-1" which is clearly wrong. The padding should be after the sign.

      Interestingly same bug appears in IBM DFDL (who asked us to see if it also is in Daffodil), which suggests rather strongly this may be an issue in the ICU library.

      	<tdml:defineSchema name="dfdlwg1" elementFormDefault="unqualified">
      		<xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
      
      		<dfdl:format ref="ex:GeneralFormat" lengthKind="delimited"/>
      
      		<xs:element name="r" type="ex:numeric9_custom1"/>
      		<xs:simpleType dfdl:textNumberPattern="#0" 
                                                  dfdl:textOutputMinLength="9" dfdl:textPadKind="padChar"
      					   dfdl:textTrimKind="padChar" name="numeric9_custom1" 
                                                 dfdl:textNumberPadCharacter="0">
      			<xs:restriction base="xsd:decimal">
      				<xs:totalDigits value="9"/>
      			</xs:restriction>
      		</xs:simpleType>
      
      	</tdml:defineSchema>
      
      	<tdml:unparserTestCase name="textNumberPattern1" model="dfdlwg1">
      		<tdml:document><![CDATA[-00000001]]></tdml:document>
      		<tdml:infoset><tdml:dfdlInfoset>
      			<ex:r>-1</ex:r>
      		</tdml:dfdlInfoset></tdml:infoset>
      	</tdml:unparserTestCase>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mbeckerle Mike Beckerle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: