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:
Hi,

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
XInclude
Iconv Unicode Regexps Automata Schemas

If I use a decimal like this '130.480907024' then there are no errors but
if
I extend the number of decimal points like this '130.48090702489' then I
get
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
MAC
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
http://asdd.ga.gov.au/asdd/tech/relaxng/anzmeta-1.3.1.rng and the XML
document instance is at
http://asdd.ga.gov.au/asdd/work/ANZNT0782000040.xmlm
if that helps anyone.

Thanks.


John

I was able to reproduce this problem on x86 and x86_64 systems (with
different
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
I
can complete it.  I'll let you know when the fix is complete.

Bill


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

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.

Greetings,

Kasimier

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
comment).

Bill




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