This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2270 - [XSLT 2.0] Current template rule and current mode (editorial)
Summary: [XSLT 2.0] Current template rule and current mode (editorial)
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XSLT 2.0 (show other bugs)
Version: Last Call drafts
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL: http://www.w3.org/TR/2005/WD-xslt20-2...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-19 20:45 UTC by Anton Lapounov
Modified: 2005-09-28 14:47 UTC (History)
0 users

See Also:


Attachments

Description Anton Lapounov 2005-09-19 20:45:14 UTC
Section 5.4.4 says that the current mode is "the mode in which the current 
template rule was invoked". However, section 6.7 specifies cases when the 
current template rule (CTR) becomes null, and the current mode, according to 
section 6.5, preserves its value in those cases.

I found it confusing, and, in my opinion, it might help other readers if the 
spec clearly says that the current mode is still defined even if CTR becomes 
null.

Also, I found two appearances of the term "current template", I think they 
should be changed to "current template rule" for the sake of consistency.
Comment 1 Michael Kay 2005-09-20 14:09:12 UTC
I think this point is largely editorial. I'm not sure how best to respond to it.
The sentence in 5.4.4 is intended to give a brief introduction to the concept of
"current mode", and it is clearly linked to the more complete definition of the
term in section 6.7. Perhaps I should just add a word in 5.4.4 that emphasises
that the explanation is informal, like "generally" or "normally".

I agree that it would be a good idea to use the term "current template rule"
consistently, rather than "current template". This also means (see comment on
your other bug report) fixing the problem that the current template is set to
the initial template even if it isn't a template rule.

Michael Kay (personal response)
Comment 2 Michael Kay 2005-09-24 23:15:45 UTC
The XSL Working Group asked the editor to propose revised wording for the
relevant rule to clarify the intent. The WG also accepted that "current
template" should always be "current template rule" (2 occurrences found).

Proposed revision: change

The current mode, which is the mode
in which the current template rule was invoked: 
see <specref ref="modes"/>;

to

The current mode, which is the mode set by the most recent call of
xsl:apply-templates (for a full definition see <specref ref="modes"/>);

If there are any problems with this resolution, please reopen the bug.

Michael Kay
XSLT 2.0 editor