libxml2, scrollkeeper, and commas in tags



On Wed, 13 Mar 2002, Daniel Veillard wrote:

>   Guys, this is frustrating. There is a bug, at least 2 persons have seen
> it, it seems related to libxslt not doing the right thing, I asked for
> a reproductible test but didn't got anything, not even basic informations
> about the platform being used.

I wish we could have found a reproducable test case earlier, but I'm not
sure anybody is worthy of finger-pointing here.  The only two people who
observed it both thought it was a bug in ScrollKeeper and reported it to
me.  I couldn't reproduce it, but did what I could to investigate the
ScrollKeeper stylesheets for a bug.  Meanwhile I was emailing and cc'ing
some of the emails to you just in case it was a problem with libxml.  So,
you really haven't missed out on much here.

We do (finally) have a reproducable test case:  It seems that the bug is 
only seen in certain locales (eg. sv_SE but not C).

If you have scrollkeeper-0.3.5 (from
https://sourceforge.net/project/showfiles.php?group_id=11543&release_id=24049),
you can do:

xsltproc /usr/share/scrollkeeper/stylesheets/toc.xsl 
/usr/share/scrollkeeper/doc/writing_scrollkeeper_omf_files/C/writing_scrollkeeper_omf_files.xml

and you get good output for both C and sv_SE in LC_ALL.

If you use the ScrollKeeper extraction code, you see the problem:

scrollkeeper-extract 
/usr/share/scrollkeeper/doc/writing_scrollkeeper_omf_files/C/writing_scrollkeeper_omf_files.xml 
/usr/share/scrollkeeper/stylesheets/toc.xsl /tmp/junk

ie. for sv_SE, there are commas (,) inserted into the tags in the output 
file, /tmp/junk.

The main code being used here is (from libs/extract.c):

int apply_stylesheets (char *input_file, char *type, int stylesheet_num,
                        char **stylesheets, char **outputs)
{
      xmlDocPtr res;
      docbDocPtr doc;
      xsltStylesheetPtr cur;
      FILE *fid;
...

      doc = xmlParseFile(input_file);
      cur = xsltParseStylesheetFile((const xmlChar *)(stylesheets[i]));
      res = xsltApplyStylesheet(cur, doc, NULL);
      xsltSaveResultToFile(fid, res, cur);
...
}


-Dan




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