Bug 12618 - Mode attribute on xtags:template & xtags:applyTemplates does not work
Summary: Mode attribute on xtags:template & xtags:applyTemplates does not work
Status: RESOLVED LATER
Alias: None
Product: Taglibs
Classification: Unclassified
Component: XTags Taglib (show other bugs)
Version: 1.0
Hardware: Sun Solaris
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-09-13 15:06 UTC by Dawn Roth
Modified: 2009-11-29 19:44 UTC (History)
0 users



Attachments
ApplyTemplatesTag.java - add stylesheet.setModeName(mode) (5.45 KB, text/plain)
2004-01-13 16:08 UTC, Sven Rottenbiller
Details
TemplateExecution.java - add property mode (3.40 KB, text/plain)
2004-01-13 16:09 UTC, Sven Rottenbiller
Details
BodyAction.java - add property mode (3.99 KB, text/plain)
2004-01-13 16:11 UTC, Sven Rottenbiller
Details
StylesheetTag.java - logic change in getTemplateExecution() (13.04 KB, text/plain)
2004-01-13 16:12 UTC, Sven Rottenbiller
Details

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

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

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

</xtags:stylesheet>

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:
http://www.mail-archive.com/taglibs-user@jakarta.apache.org/msg01485.html

Thanks very much,
Dawn Roth
303-223-7885
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.