Re: [xslt] Redefining a variable
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] Redefining a variable
- Date: Mon, 17 Sep 2001 09:00:40 -0400
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="http://www.w3.org/1999/XSL/Transform"
> 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:
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=09%2F17%2F01+08%3A51&maxdate=09%2F17%2F01+08%3A53&cvsroot=%2Fcvs%2Fgnome
thanks for the report, I'm surprized it didn't show up before !
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]