Bug 12618

Summary: Mode attribute on xtags:template & xtags:applyTemplates does not work
Product: Taglibs Reporter: Dawn Roth <dawn.roth>
Component: XTags TaglibAssignee: Tomcat Developers Mailing List <dev>
Severity: major    
Priority: P3    
Version: 1.0   
Target Milestone: ---   
Hardware: Sun   
OS: Solaris   
Attachments: ApplyTemplatesTag.java - add stylesheet.setModeName(mode)
TemplateExecution.java - add property mode
BodyAction.java - add property mode
StylesheetTag.java - logic change in getTemplateExecution()

Description Dawn Roth 2002-09-13 15:06:12 UTC
The mode attribute for the xtags:template and xtags:applyTemplates elements does
not work at all.  It causes the template that has the mode to never match its
elements.  If you remove the modes, then the same templates match as expected.

The following snippet does not work:


<xtags:template match="/">
<p>matched root</p>
<xtags:applyTemplates mode="foo" />

<xtags:template mode="foo" match="item">
<p>output for mode foo</p>


If you remove the modes, it works.  This is important functionality, because
without this, you cannot translate an element two ways depending on your needs.
(Like TOC vs. plain as shown in most XSL examples.)

This mail from the mailing lists also describes the problem:

Thanks very much,
Dawn Roth
Comment 1 Sven Rottenbiller 2004-01-13 16:06:49 UTC
I have some bugfixes for the xtags-taglib. Now the attribute 'mode' works fine. 
Because of no CVS, I attach the complete files and not only patches.
Comment 2 Sven Rottenbiller 2004-01-13 16:08:57 UTC
Created attachment 9934 [details]
ApplyTemplatesTag.java - add stylesheet.setModeName(mode)
Comment 3 Sven Rottenbiller 2004-01-13 16:09:49 UTC
Created attachment 9935 [details]
TemplateExecution.java - add property mode
Comment 4 Sven Rottenbiller 2004-01-13 16:11:01 UTC
Created attachment 9936 [details]
BodyAction.java - add property mode
Comment 5 Sven Rottenbiller 2004-01-13 16:12:11 UTC
Created attachment 9938 [details]
StylesheetTag.java - logic change in getTemplateExecution()
Comment 6 Henri Yandell 2009-11-29 19:44:53 UTC
Resolving. Taglib has been retired.