W3C home > Mailing lists > Public > xsl-editors@w3.org > October to December 2000

Re: Variables and Parameters within Templates

From: James Clark <jjc@jclark.com>
Date: Wed, 22 Nov 2000 13:29:08 +0700
Message-ID: <3A1B67B4.C7F3E297@jclark.com>
To: TOM <ptittom@free.fr>
CC: xsl-editors@w3.org


TOM wrote:
> 
> Le 21/11/00 05:30:00, James Clark a écrit :
> > xsl:variable is in the category "instruction", but xsl:param is not.
> > Thus xsl:for-each can have xsl:variable children but not xsl:param
> > children.
> 
> Oh sorry, I wasn't clear.
> 
> > > the Rec isn't very clear about what is a "template".
> > > In 11.5 :
> > >   "It is an erreor if a binding established by an xsl:variable or
> > >    xsl:param element within a template shadows another binding
> > >    established by an xsl:variable or xsl:param also within the
> > >    template. It is not an erreor if a binding established by an
> > >    xsl:variable or xsl:param element in a template shadows another
> > >    binding established by an xsl:variable or xsl:param top-level
> > >    element."
> 
> Here only 2 "levels" are described : 2 variables or parameters within the
> same template, 2 variables or parameters at different places : one in a
> template, the other at top-level.
> Though what's called a template exactly ? Do the word "template" here only
> refer to xsl:template ?

I think I see where the problem is now.

You are correct in saying that there are two levels: (1) at the
top-level (2) anywhere else where the syntax summary allows it. (2) is
called "in a template".  Level (2) variables can shadow level (1)
variables, but no level (2) variable can shadow any other level (2)
variable.

There's a bug in the text. In 

"It is an erreor if a binding established by an xsl:variable or
xsl:param element within a template shadows another binding
established by an xsl:variable or xsl:param also within ***the***
template."

The highlighted "the" should be "a".

Does this make things clear?

James
Received on Wednesday, 22 November 2000 01:31:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:51 GMT