Bug 7603

Summary: XSLT not reporting error when a match pattern has a variable
Product: XmlCommons - Now in JIRA Reporter: password <gary.frederick>
Component: WhichAssignee: Commons Developers Mailing List <commons-dev>
Severity: enhancement CC: commons-dev
Priority: P5 Keywords: ErrorMessage, TestID
Version: 1.x   
Target Milestone: ---   
Hardware: Sun   
OS: Linux   

Description password 2002-03-29 12:11:34 UTC
The template rule 
  <xsl:template match="item[position() mod $thisnup = 1]">
should generate an error because the match attribute has a variable in it.

I like that it does not generate an error. The variable can be resolved at
runtime and the match's expression with the variable gives me a way to generate
different results, based on the value at runtime.

But it is not correct...

I reported this to the mozilla folks
there are test cases there

Comment 1 David_Marston 2002-05-07 19:42:47 UTC
This raises that old debate about variables inside predicates. You quoted 5.3.
Section 5.2 says "predicates in a pattern can use arbitrary expressions..."
Comment 2 David_Marston 2002-06-17 16:43:47 UTC
Test case idkey43 can be used as an example. Some processors allow this use of
a variable. Scott Boag thinks we should issue a warning but allow the usage.
Comment 3 David_Marston 2002-06-17 18:37:30 UTC
Also see idkeyerr21, which is more universally agreed upon as an error.
This case is reported in bug #5202, which may be deemed a duplicate only if one
fix will swat both.
Comment 4 ders 2006-08-10 17:25:57 UTC
Comment 5 Ronnie Brunner 2007-03-19 04:00:45 UTC
Tried to reassign this to xalan, but don't have that in the product select box
-> xmlcommons is the closest I could find... Sorry...
Comment 6 Michael Glavassevich 2007-03-19 05:18:56 UTC
You couldn't find it in Bugzilla because Xalan now uses JIRA 
(http://issues.apache.org/jira) for bug tracking. If this bug report is still 
relevant, please re-open it there.