- From: Kay Michael <Michael.Kay@icl.com>
- Date: Wed, 1 Sep 1999 10:53:13 +0100
- 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 are > 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 problems. 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()]"/> </variable> <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