Re: [xslt] Incorrect output using -o option (All info - long post)

Answers inline.

Mark Vakoc wrote:

I'm not sure if this is the cause of your problem but when I tried to duplicate
the issue running I got the following messages:

snentry.xml:0: error : Node next->prev : forward link wrong
snentry.xml:4: element html: error : Node has no prev and not first of parent

I found that in  transform.c : xsltDefaultProcessOneNode that incorrectly
unlinks a DTD element when encountered (looks like when the first document
child or last document child is a DTD node).

To duplicate run the following with the attached files:
xsltproc --novalid stylesheet.xsl test.xml

Proposed patch attached (any reason not to just use xmlUnlinkNode?):

I tried your example, using the attached files, against xsltproc built with libxml2-2.6.19 and libxslt-1.1.14 and I cannot reproduce the error. All I get as output, whether to stdout or to a file is this:
<?xml version="1.0"?>

However, writing to stdout is instantaneous, while writing to a file requires 11-12 seconds.

I also did "make uninstall" and "make clean" in the libxslt-1.1.14 directory, applied your patch, rebuilt and reinstalled and tried it again. The patch made no difference for me. I got the same result.

--- Daniel Veillard <veillard redhat com> wrote:

 Can you try with the latest versions i.e. libxml2-2.6.19 and libxslt-1.1.14
If you still see the problem, then enter it into bugzilla (please use
attachments since cut and pasting XML/XSL files from text content can
have serious side effects).

I got these versions, built them, and tried again. I got the same result as before. The only noticeable difference is that the "writing to a file" case is a couple of seconds slower than before. (It takes about 13 seconds, while the "writing to stdout" case is virtually instantaneous.)

I also applied Mark's proposed patch and rebuilt/reinstalled, then tried again. I got the same bad results when writing to a file. (I was not able to reproduce the error that he reported.)

Just as a check, my xsltproc --version now tells me:
Using libxml 20619, libxslt 10114 and libexslt 812
xsltproc was compiled against libxml 20619, libxslt 10114 and libexslt 812
libxslt 10114 was compiled against libxml 20619
libexslt 812 was compiled against libxml 20619

I'm happy to submit a bug if that's the next step, but will need a little guidance. Is there a link to some documentation?

In general, should I have attached the files when I posted to the list, rather than copying inline? (That's what I'd rather do, and it is what Mark did, so I'm guessing the answer is "yes".)


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