Re: Variables and inherited attributes

Subject: Re: Variables and inherited attributes
From: Patrice Bonhomme <Patrice.Bonhomme@xxxxxxxx>
Date: Wed, 21 Jun 2000 15:47:22 +0200
David Carlisle wrote:
> 
> > I think that true global variables would have been a good solution to
> > handle inherited attributes (xml:lang, xml:base, etc.).
> 
> how would they have helped?

Using a queue of successive values. 



> Either pass the values down as parameters, or just use get the value
> from the source tree, the currently active value for xml:lang is
> 
> <xsl:value-of select="ancestor-or-self::*/@xml:lang[1]"/>

For large document, getting the value from the document tree is very
time consuming.
Passing the values down templates as parameters makes xsl stylesheets
hard to read and to maintain.

Thanks,
Pat

-- 
  ==============================================================
   bonhomme@xxxxxxxx      Tel : 03 83 59 30 52 / 06 11 34 03 85
   http://www.loria.fr/~bonhomme                 Office : B.228
  ==============================================================


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread