Re: [xslt] Redefining a variable

On Mon, Sep 17, 2001 at 12:35:10AM +0200, ben wrote:
> Hello,
> I think I don't undertstand how the set of variables works with
> stylesheets.
> I have a stylesheet that defines a variable to a default value, and I
> want to override the variable value with another stylesheet like this:
> <xsl:stylesheet xmlns:xsl=""
> version='1.0'>
> <xsl:import href="/the/main/stylesheet.xsl"/>
> <xsl:variable name="my.var">the-value</xsl:variable>
> </xsl:stylesheet>
> When running xsltproc I've got the error message:
> "runtime error: file /the/main/stylesheet.xsl line 172 element variable
> Global variable my.var already defined"
> Is-it only a warning, or do I do something wrong? With others processors
> (XT, Xalan) there's no complaint.

  Clearly a bug !

I have fixed it in CVS and added a couple of associated testcases:

  thanks for the report, I'm surprized it didn't show up before !


Daniel Veillard      | Red Hat Network  | libxml Gnome XML XSLT toolkit | Rpmfind RPM search engine

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