[ http://issues.apache.org/jira/browse/MYFACES-206?page=comments#action_63429 ] sean schofield commented on MYFACES-206: ----------------------------------------
If there are duplicate attributes in the TLD that would seem to be a mistake on our part. I will give a chance for the other committers to weigh in on this before I fix it. Matt, can you supply a patch for the fixes that you have already identified? That would help speed up the fix since we are working on several issues at the moment. > TLDs in myfaces-examples.war contain duplicated attributes for some tags > which prevents the war from working in ServletExec 5.0 > ------------------------------------------------------------------------------------------------------------------------------- > > Key: MYFACES-206 > URL: http://issues.apache.org/jira/browse/MYFACES-206 > Project: MyFaces > Type: Bug > Environment: Win XP Pro, JDK 1.5.0_01 using SE 5.0 AS running with it's > built-in webserver > Reporter: Matt McGinty > Priority: Blocker > > From what I can tell, the myfaces-examples.war (from both > myfaces-1.0.9rc3-app.tgz AND myfaces-1.0.8-examples.tgz) > has TLD files (inside it's myfaces.jar file) that appear to be incorrect. > For example, looking in the myfaces_html.tld file... looking in the <tag> > named "outputLink", it contains: > --- > <attribute> > <name>target</name> > <required>false</required> > <rtexprvalue>false</rtexprvalue> > </attribute> > <!-- HtmlOutputLink attributes --> > <attribute> > <name>target</name> > <required>false</required> > <rtexprvalue>false</rtexprvalue> > </attribute> > --- > That's the same name for 2 attributes... for the same tag. > That seems wrong to me. > What if that duplicated attribute name was using different values for the > <required> or <rtexprvalue> nodes? > Which one would the JSP Engine be expected to use? > And looking in myfaces_ext.tld looking at the tag named "inputHtml". It see > that it defines: > <attribute> > <name>id</name> > <required>false</required> > <rtexprvalue>false</rtexprvalue> > </attribute> > and also > <attribute> > <name>id</name> > <required>false</required> > <rtexprvalue>false</rtexprvalue> > <type>java.lang.String</type> > <description>Every component may have an unique id. Automatically created > if omitted.</description> </attribute> > They are slightly different. > Tomcat 5 does not appear to complain or report this, and things work fine > there. > But other Servlet/JSP Engines (not just SE) may perform validation on the TLD > and complain about the duplicated attributes which may prevent the app from > functioning. > Duplicated attributes in a TLD seems ambiguous to me. > From what I can tell, the JSP 2.0 specification does not say anything > definitive (one way or the > other) about the case of a TLD using the same attribute name for the same tag > more than once. > But common sense tells me it should not be done. > Does it make sense for a TLD to do this? > Doesn't MyFaces need to correct their TLD files in these cases? > If I rig SE so that it doesn't check for duplicated attributes in a TLD, the > app deploys and runs fine. > But I don't think that SE should have to be altered in this way (unless > someone has found information that I haven't... if so please share that with > me). > Otherwise, I think that the TLDs used in this MyFaces example need to be > corrected. > Other examples I've found so far in myfaces_ext.tld include: > 1. the attribute named "onblur" for the tag named "commandNavigation" > 2. the attribute named "onfocus" for the tag named "commandNavigation" > 3. the attribute named "id" for the tag named "inputHtml" > 4. the attribute named "style" for the tag named ... (Here is where I stopped > debugging this). > Thanks for your time, > Matt McGinty > Software Engineer > New Atlanta Communications, LLC > http://www.newatlanta.com -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira