I sent this question off into the black hole of
[EMAIL PROTECTED] but I don't really expect an answer so I'll
post the question here for discussion.
This question comes a bug (387) against Tomcat-3. The JSP specification
defines tag names attribute names as containing NMTOKEN values. The
specification does not define NMTOKEN so I assume that the XML definition
applies. The XML definition of NMTOKEN allows strings that are not valid
Java identifiers. Jasper uses tag names to create variable names in the
generated Java files, so if a tag name contains valid NMTOKEN characters
(like -, ., and :) then the generated variable name is invalid. It should
be a fairly straight forward change to Jasper to mangle tag names into valid
Java syntax.
Attribute names, however, pose a different problem. Attribute names map
into Java method names and thus can't contain some of NMTOKEN characters.
Either the specification should define a mapping of NMTOKEN values into Java
identifers or state that attribute names must be valid Java identifier
names.
For example, the following segment of a tag library descriptor is valid
according to the specification.
<tag>
<name>for-each</name>
<attribute>
<name>start-index</name>
</attribute>
<attribute>
<name>end-index</name>
</attribute>
</tag>