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));
Thanks for the report, Hans. Fixed using an approach similar to the one you suggested.
The equivalent bug still exists in the JSTL fmt:setLocale element in the "standard taglibs" releases 1.0 and 1.0.1.