[xsd-users] Bug using INF as a default value

Thomas Müller th.mueller at weisang.com
Thu Feb 15 10:04:41 EST 2007


Hi Boris,

just found an issue in XSD 2.3.1, when using an INF as a default value
(using VC8):

For instance in this case:

<xs:complexType name="dummy">
    <xs:complexContent mixed="true">
      <xs:extension base="xs:string">
        <xs:attribute name="minimum" type="xs:double" default="-INF"
use="optional" />
        <xs:attribute name="maximum" type="xs:double" default="INF"
use="optional" />
      </xs:extension>
    </xs:complexContent>
</xs:complexType>

Using	dummy::maximum::default_value() then returns an uninitialized value.

Just set a breakpoint in libxsd\xsd\cxx\tree\traits.txx (line 355) to see
the issue. It seems to me that at least the cases for INF, -INF and NaN have
to be handled separately. I did not try 'true' or 'false' for double values,
but this could also be a - minor - issue.

Best regards,
Thomas





More information about the xsd-users mailing list