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 list 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 http://redhat.com/ > veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ > http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ > _______________________________________________ > xslt mailing list, project page http://xmlsoft.org/XSLT/ > xslt gnome org > http://mail.gnome.org/mailman/listinfo/xslt >
Attachment:
transform.c.diff
Description: transform.c.diff
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:template match="imlformcomponent"> <xsl:apply-templates select="document(@href)" /> </xsl:template> </xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <imlformcomponent href="snentry.xml" />
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> </html>