Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1715

xs:boolean( path/to/an/unsignedByte ) fails with SDE - missing conversion

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 2.0.0
    • None
    • Back End, Front End
    • None

      When testing Asterix

      Schema Definition Error: The type UnsignedByte cannot be converted to Boolean.

      XPath says xs:boolean(.....) on a positive or negative number returns true, zero false. This should work regardless of the number type.

      The offending schema fragment looks like

                              <xsd:element dfdl:alignmentUnits="bits" dfdl:length="1" dfdl:lengthKind="explicit" dfdl:lengthUnits="bits" name="FSPEC1_Present" type="xsd:unsignedByte"/>
       
      ....
                        <xsd:element dfdl:lengthKind="implicit" dfdl:occursCountKind="implicit" minOccurs="0" name="fspec1">
                                                                  <xsd:annotation>
                            <xsd:appinfo source="http://www.ogf.org/dfdl/">
                              <dfdl:discriminator>{xs:boolean(../fspec0/FSPEC1_Present)}</dfdl:discriminator>
                            </xsd:appinfo>
                          </xsd:annotation>
                        ...

              jadams Joshua Adams
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: