Re: [xml] Problems with the "decimal" definition of a RELAX NG XSD on the Solaris 2.8 platform during validation using xmllint

Kasimier Buchcik said:

William M. Brack wrote:
William M. Brack said:

John Hockaday ga gov au said:

Hi All,

I have a RELAX NG XSD that uses a 'decimal' definition. I am validating an
XML document using xmllint but I get unexpected errors.  Libxml2 is running
on Solaris 2.8 with the following version of libxml2:

/usr/local/bin/xmllint: using libxml version 20616
  compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer
Iconv Unicode Regexps Automata Schemas

If I use a decimal like this '130.480907024' then there are no errors but
I extend the number of decimal points like this '130.48090702489' then I
the following error:

ANZNT0782000040.xml:61: element eastbc: Relax-NG validity error : Error
validating datatype decimal
It seems to me that the precision of the 'decimal' definition in the
libraries is causing the problem.  The problem doesn't occur on LINUX or
platforms.  The funny thing is that Solaris 2.8 is a 64 bit system.  Can
anyone help me with this?

The RELAX NG XSD is located at and the XML
document instance is at
if that helps anyone.



I was able to reproduce this problem on x86 and x86_64 systems (with
symptoms on each :-).  It's caused by some coding within xmlschemastypes.c,
and may occur anytime the total number of digits in the number exceeds 10.
I'm working on a "proper" solution for it, but it may be a day or two before
can complete it.  I'll let you know when the fix is complete.


OK, I think I have fixed the problem.  The changes are in CVS
(xmlschemastypes.c) - let me know if it now works OK on Solaris, and thanks
very much for reporting it.


Bill, if you are already at it: if you could implement support for
values bigger than 32 bit for decimals, it would erase a couple of
hundred failures in the NIST tests for XML schemata.



After my enhancement, hopefully the coding now handles 24 significant digits
(but really needs to be more thoroughly tested).  Let me know whether if you
find any stupid mistakes (the clever ones you can go ahead and fix without


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]