Re: [xslt] RE: xsl:variable scope problem with 0.10 ?



On Tue, May 22, 2001 at 03:26:51PM -0600, Vakoc, Mark wrote:
> 
> Of course, as soon as I wrote that I think I found it.  Below is the
> original code from function xsltStackLookup in variables.c (sorry, I don't
> have diff capability)
> 
> If ctxt->varsNr is 1, the for loop below will not be processed, and the
> variable won't be found.  Changing the for loop to
> 
> for(;i>=0;i++) will work.  So I believe that as it is, it will always fail
> to find the first defined variable in the context stack.

  Bingo !
Global variables used to be stored in level 0, and are now stored in
a global hash table ... and I forgot to reenable level 0 lookup <grin/>
I commited the fix and added your test to the suite.

  thanks a lot !

Daniel

-- 
Daniel Veillard      | Red Hat Network http://redhat.com/products/network/
veillard@redhat.com  | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/




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