Bug 6563 - JstlFmtTLV rejects valid <fmt:locale> action element
Summary: JstlFmtTLV rejects valid <fmt:locale> action element
Status: RESOLVED FIXED
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-02-19 23:14 UTC by Hans Bergsten
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans Bergsten 2002-02-19 23:14:47 UTC
The JstlFmtTLV validator rejects a valid <fmt:locale> element because it has a
scope attribute but no var attribute. This is valid syntax, and in fact, the
<fmt:locale> action doesn't support a var attribute because the name is hardcoded.

Something like this in the startElement() method fixes the problem:

  String localeTag = prefix + ":" + "locale";
  if (qn.startsWith(prefix + ":") && !localeTag.equals(qn) &&
    hasDanglingScope(a))
    fail(Resources.getMessage("TLV_DANGLING_SCOPE", qn));
Comment 1 Shawn Bayern 2002-02-19 23:18:53 UTC
Thanks for the report, Hans.

Fixed using an approach similar to the one you suggested.
Comment 2 peter_e 2002-08-01 08:59:43 UTC
The equivalent bug still exists in the JSTL fmt:setLocale element in 
the "standard taglibs" releases 1.0 and 1.0.1.