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

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?):

--- Daniel Veillard <veillard redhat com> wrote:
> On Tue, Apr 05, 2005 at 12:21:12PM -0700, Rush Manbert wrote:
> > I have run with the --debug option in both cases. Everything is 
> > identical until the included file processing starts. After that, the 
> > incorrect case doesn't find any of the template matches that were found 
> > in the correct case.
>    I have no idea why template matching would change. This may be a bug
> > I get the following information from "xsltproc --version":
> > Using libxml 20615, libxslt 10112 and libexslt 810
> > xsltproc was compiled against libxml 20615, libxslt 10112 and libexslt 810
> > libxslt 10112 was compiled against libxml 20615
> > libexslt 810 was compiled against libxml 20615
>   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).
> Daniel
> -- 
> Daniel Veillard      | Red Hat Desktop team
> veillard redhat com  | libxml GNOME XML XSLT toolkit
> | Rpmfind RPM search engine
> _______________________________________________
> xslt mailing list, project page
> xslt gnome org

Attachment: transform.c.diff
Description: transform.c.diff

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="";
<xsl:template match="imlformcomponent">
  <xsl:apply-templates select="document(@href)" />


<?xml version="1.0" encoding="UTF-8"?>
<imlformcomponent href="snentry.xml" />

<?xml version="1.0" encoding="UTF-8"?>

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