DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5050>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5050

Taglib prefix cannot contain '-' character

           Summary: Taglib prefix cannot contain '-' character
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Tomcat 4.0.1 Final does not permit hyphens in the "prefix" when a tag library 
is used from a JSP page; I believe this should be possible.

Section JSP.2.10.2 of the JSP 1.2 final spec says:

  A prefix must follow the naming convention specified in the XML
  namespaces specification

The XML namespaces specification, in turn, has these things to say:

  QName ::=  (Prefix ':')? LocalPart 
  Prefix ::=  NCName 
  LocalPart ::=  NCName
  NCName ::=  (Letter | '_') (NCNameChar)* 
  NCNameChar ::=  Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender 

So, unless I am misunderstanding something (which is always possible), a hyphen 
should be valid in a namespace prefix, unless it's the first character. 
However, Tomcat (specifically, javac) dies on this since a hyphen is not a 
valid character within a Java identifier. There is appropriate code in Tomcat's 
org.apache.jasper.compiler.TagGeneratorBase class (in the getTagVarName() 
method) that escapes characters in the tag "name" part, but not in the "prefix" 
part.

Will post a test case in a moment.

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to