GNOME Bugzilla – Bug 700689
transformation hangs when aliasing some namespace to default
Last modified: 2015-05-07 21:10:18 UTC
To recreate this bug create a stylesheet that 1) has a namespace-alias element mapping prefix ("n") to no (default) prefix, AND 2) has an element with the same namespace prefix, ("n"), in one of the templates ("t"), Then create an input document that has an element that matches the match criterion for the template ("t"). Apply the stylesheet to the input document either through the API, or though xsltproc. The transformation operation hangs indefinitely (or for a very long time; I have not tried to run the operation for an extended period, but rather only long enough to see that the behaviour is incorrect.). Examples of the described stylesheet and input document are attached in the form of a zip archive (bugzilla does not allow multiple attachments). I am using libxslt 1.1.26 and libxml2 2.7.6.
Created attachment 244748 [details] zip archive containing test case
Created attachment 244749 [details] input document for test case
Created attachment 244750 [details] stylesheet for test case
Just ran across this issue. Fedora 21, libxslt 1.1.28, libxml2 2.9.1. It only happens when the namespace prefix is declared on result elements, not if the prefix is declared on the xsl:stylesheet, so that's an easy workaround for stylesheet authors. A cursory look with gdb indicates the problem is probably either in xsltCopyNamespaceList or xmlHashLookup3.
Created attachment 302926 [details] [review] Have to set cur to cur->next when you continue in a loop
Dohhh ! ACK, Shaun please commit, and change as RESOLVED :-) Thanks for the report and the patch ! Daniel