Description
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>
|
...
|