You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/08/14 00:17:43 UTC

svn commit: r1157431 - /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java

Author: lu4242
Date: Sat Aug 13 22:17:43 2011
New Revision: 1157431

URL: http://svn.apache.org/viewvc?rev=1157431&view=rev
Log:
MYFACES-3276 xmlns property is set on attribute map as ""

Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java?rev=1157431&r1=1157430&r2=1157431&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/view/facelets/tag/TagAttributeImpl.java Sat Aug 13 22:17:43 2011
@@ -91,7 +91,10 @@ public final class TagAttributeImpl exte
         boolean resourceExpression;
         this.location = location;
         this.namespace = ns;
-        this.localName = localName;
+        // "xmlns" attribute name can be swallowed by SAX compiler, so we should check if
+        // localName is null or empty and if that so, assign it from the qName 
+        // (if localName is empty it is not prefixed, so it is save to set it directly). 
+        this.localName = (localName == null) ? qName : ((localName.length() > 0) ? localName : qName);
         this.qName = qName;
         this.value = value;