After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 56267 - Namespaces not propagated (again)
Namespaces not propagated (again)
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-06-15 22:17 UTC by stevecheng
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description stevecheng 2001-06-15 22:17:22 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.
Comment 2 stevecheng 2001-06-16 13:08:31 UTC
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.
Comment 3 Daniel Veillard 2001-06-16 13:34:59 UTC
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
Comment 4 Daniel Veillard 2001-06-17 18:40:02 UTC
The libxml-2.3.11/libxslt-0.12.0 combo should close this bug,

  thanks

Daniel