Re: [xslt] Peculiar xsl:number behavior or XSL mistake?



On Fri, 2003-11-14 at 07:56, Xyster ! wrote:
> Hi,
> 
> I'm getting strange output from xsltproc on Windows ("Using libxml 20602, 
> libxslt 10100 and libexslt 800") when trying to use xsl:number.

I have reproduced the error on Linux.

I think the patch below solves the problem (it does for the reported
example), but I am not entirely sure because I do not understand
how xsltGetUTF8Char is supposed to work -- the len argument seems
to serve two purposes....

Index: preproc.c
===================================================================
RCS file: /cvs/gnome/libxslt/libxslt/preproc.c,v
retrieving revision 1.44
diff -u -r1.44 preproc.c
--- preproc.c   5 Nov 2003 03:16:43 -0000       1.44
+++ preproc.c   14 Nov 2003 17:49:57 -0000
@@ -771,6 +771,7 @@
     prop = xsltGetNsProp(cur, (const xmlChar *)"grouping-separator",
                        XSLT_NAMESPACE);
     if (prop != NULL) {
+       comp->numdata.groupingCharacterLen = xmlStrlen(prop);
        comp->numdata.groupingCharacter =
            xsltGetUTF8Char(prop,
&(comp->numdata.groupingCharacterLen));
        xmlFree(prop);






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