GNOME Bugzilla – Bug 56267
Namespaces not propagated (again)
Last modified: 2009-08-15 18:40:50 UTC
Hello. It seems like the namespaces-not-propagated problem is not limited to global variables. The following (with only a one line change from the previous testcase) reproduces the bug: b.xsl ===== <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:n="http://xmlsoft.org/" version='1.0'> <xsl:template match="/"> <!-- Works OK if this line is at top-level, does not work if inside this template --> <xsl:variable name="var" select="/n:x" /> <root> <xsl:value-of select="$var" /> </root> </xsl:template> </xsl:stylesheet> a.xsl ===== <?xml version='1.0'?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version='1.0'> <xsl:include href="b.xsl" /> </xsl:stylesheet> c.xml ===== <?xml version='1.0'?> <x xmlns="http://xmlsoft.org/"> some text </x> xsltproc a.xsl c.xml gives an error. xsltproc b.xsl c.xml is OK. This is of course from the latest CVS version of libxslt.
Dohh ... fixed in a similar way: http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=06%2F15%2F01+18%3A33&maxdate=06%2F15%2F01+18%3A33&cvsroot=%2Fcvs%2Fgnome thanks for the report, Daniel
This bug is refusing to die: it still doesn't work. Could it be that there is still a TODO: propagate namespace? comment in variables.c? Also the regression test bug-37-.xsl includes the wrong stylesheet bug-36-inc.xsl, rather than bug-37-inc.xsl, so that's probably why you didn't catch the error... Anyway thanks in advance for fixing this.
2 stupid errors while doing things late at night, I hope this one fixes it. I checked the last TODO on the subject, it's about users parameters evaluation, and there is really no namespace in scope when they are typed on the command line for example. So I hope this is fixed for good this time, Daniel Log message: - libxslt/variables.c: bug #56267 was still not fixed, forgot to remove the old code - tests/general/bug-37-.xsl: wrong reference to 36 fixed, this does the test for good http://cvs.gnome.org/bonsai/cvsquery.cgi?module=libxslt&branch=HEAD&branchtype=match&dir=libxslt&file=&filetype=match&who=veillard&whotype=match&sortby=Date&hours=&date=explicit&mindate=06%2F16%2F01+09%3A25&maxdate=06%2F16%2F01+09%3A25&cvsroot=%2Fcvs%2Fgnome
The libxml-2.3.11/libxslt-0.12.0 combo should close this bug, thanks Daniel