Re: [xslt] XPath number formatting
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] XPath number formatting
- Date: Fri, 7 Apr 2006 11:40:45 -0400
On Fri, Apr 07, 2006 at 04:31:44PM +0200, Vincent Lefevre wrote:
> > > 2. Even inside xsltproc, the current behavior may break things when
> > > one wants to do string manipulations like digit extraction (this is
> > > my case: I had integers between 0 and 2^53).
> >
> > I don't think the XPath specs can mandate correct behaviour for such
> > integer values.
>
> It does. See above.
>
> > > Isn't the C library sufficient? (BTW, glibc uses GMP for this purpose.)
> >
> > The divergence from the standard is recorded and present since the
> > beginning of libxml2 XPath and libxslt support. At the time clearly
> > there was no coherence in implementations. Maybe this need to be fixed,
> > but I won't take a single other processor output as an argument, even
> > if it's Saxon...
> > Following the spec is important, but number formating is clearly one
> > of the areas where the XPath and XSLT 1.0 were broken.
>
> I don't think it is broken. Perhaps not the best choice (at least
> for very large and very small numbers). But at least, the conversion
> is well-defined, and *in pratice*, the spec seems to be OK (if people
> don't like it, there are other ways to manipulate numbers; but it is
> annoying to spend hours trying to find why some program doesn't work
> while the problem is that the XSLT processor breaks the spec).
You think it's well defined, good. That wasn't the status quo when
that code was done. If you think you understand how this should all be
working, a patch for the related portion of the code is the best way
to make this fully unambiguous.
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]