Bug 7603 - XSLT not reporting error when a match pattern has a variable
Summary: XSLT not reporting error when a match pattern has a variable
Alias: None
Product: XmlCommons - Now in JIRA
Classification: Unclassified
Component: Which (show other bugs)
Version: 1.x
Hardware: Sun Linux
: P5 enhancement (vote)
Target Milestone: ---
Assignee: Commons Developers Mailing List
Keywords: ErrorMessage, TestID
Depends on:
Reported: 2002-03-29 12:11 UTC by password
Modified: 2007-03-19 05:18 UTC (History)
1 user (show)


Note You need to log in before you can comment on or make changes to this bug.
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.