W3C home > Mailing lists > Public > xsl-editors@w3.org > July to September 1999

RE: comments on XSLT draft 13 August 1999

From: Kay Michael <Michael.Kay@icl.com>
Date: Wed, 1 Sep 1999 10:53:13 +0100
Message-ID: <93CB64052F94D211BC5D0010A800133170F093@wwmess3.bra01.icl.co.uk>
To: "'xsl-list@mulberrytech.com'" <xsl-list@mulberrytech.com>, xsl-editors@w3.org
Cc: gmf@odi.com
> 10) 11.4 Top-level Variables and Parameters
> 	Why not use the same visibility rules for top-level 
> variables and parameters as for template variables and parameters: they
> visible in following siblings and their descendents?  Forcing XSLT
processors to
> handle forward references to other top-level variables and 
> parameters adds complexity without any functional benefit.  Since circular

> references are prohibited anyway, there must be some ordering that
eliminates forward
> references, so why not just prohibit forward references?
I agree strongly with this. The current ordering rules give me considerable

I have previously raised the comment (which is not addressed in the current
draft) that the current rules don't handle other forms of circular
reference, e.g.

<variable name="index">
    <apply-templates select="//record[last()]"/>
<template match="record[number($index)]" priority="2">1</template>
<template match="record">2</xsl:template>

The simplest answer to this one is to ban calls on apply-templates and
call-template within a global variable declaration.

Circular references can also be caused by key definitions (a global variable
uses a key, while the key definition uses the global variable) and by named
attribute sets. A general principle of "no forwards references" could solve
many of the problems at a stroke.

Mike Kay
Received on Thursday, 2 September 1999 05:25:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:17:45 UTC