Re: Recursion among top-level elements

Kay Michael wrote:

> The XSLT specification (section 12.4) discusses the possibility of cycles
> existing among global variable declarations, but it does not seem to deal
> with other possibilities for circular definitions.
> 
> Example1: there is nothing to stop a global variable definition calling
> xsl:apply-templates; and there is nothing to stop the match pattern in
> xsl:template referencing a global variable. In general therefore, when
> xsl:apply-templates is called within a global variable definition it will be
> impossible to determine which template to invoke.
> 
> Example2: there is nothing to stop a global variable definition referencing
> a key, and there is nothing to stop any of the patterns in a key definition
> from referencing a global variable.
...
> The problem with xsl:apply-templates remains: I think it is necessary either
> to stop template match patterns referring to global variables, or to stop
> global variable definitions invoking xsl:apply-templates.

The XSL WG decided to do the former (similarly for xsl:key).

James

Received on Wednesday, 15 September 1999 12:32:16 UTC