There are not allowed in the node test of a match pattern, but _are_ allowed in predicates:
"A pattern must match the grammar for Pattern. A Pattern is a set of location path patterns separated by |. A location path pattern is a location path whose steps all use only the child or attribute axes. Although patterns must not use the descendant-or-self axis, patterns may use the // operator as well as the / operator. Location path patterns can also start with an id or key function call with a literal argument. Predicates in a pattern can use arbitrary expressions just like predicates in a location path." from : http://www.w3.org/TR/xslt#patterns As far as the core dump with the circular reference -- we're currently not diagnosing circular references, so this is the expected behavior. As we start doing more sophisticated stylesheet analyses, we may try to catch situations like this, but we won't always be able to. In this case, we might want to give a warning, but without knowing the source document, we wouldn't be able to report an error, since we wouldn't know if the offending element even exists. Dave Sriram Sankar <ssankar@akam To: [EMAIL PROTECTED] ai.com> cc: (bcc: David N Bertoni/CAM/Lotus) Subject: Variable References in template 10/25/2001 match predicates 09:08 PM Please respond to xalan-dev Hi, I was trying out Xalan C++ 1.2 (RedHat Linux) and found that the match attribute of the xsl:template allows a variable reference in the predicates. (eg) <xsl:template match = "doc[$foo]"> The XSLT specification is clear in stating that the variable references are not allowed in template and key match patterns. The following code also coredumps because of the circular reference. <xsl:variable name="foo"> <xsl:apply-templates select="//doc"/> </xsl:variable> <xsl:template match = "doc[$foo]"> </xsl:template> The confusing part is the testcase in the Xalan test suite match14.xsl which shows that a variable can be used in the template match pattern. Can someone pl. confirm if this is intentional?? Thanks, -Sriram