cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Wechner <michael.wech...@wyona.com>
Subject DOMStreamer patched: default namespace and non-empty prefix of attributes
Date Fri, 04 Feb 2005 13:46:39 GMT
Within Lenya we have encountered a problem with the 
o.a.c.xml.dom.DOMStreamer re default namespace and non-empty prefix for 
attributes. Thanks to Josias Thoeny the bug has been fixed and I have 
checked it into Cocoon-2.1.7-dev (BRANCH_2_1_X)


--- src/java/org/apache/cocoon/xml/dom/DOMStreamer.java (revision 151344)
+++ src/java/org/apache/cocoon/xml/dom/DOMStreamer.java (working copy)
@@ -396,7 +396,7 @@
                                 // if the prefix is null, or the prefix 
has not been declared, or conflicts with an in-scope binding
                                 if (declaredUri == null || 
!declaredUri.equals(attrNsURI)) {
                                     String availablePrefix = 
currentElementInfo.findPrefix(attrNsURI);
-                                    if (availablePrefix != null)
+                                    if (availablePrefix != null && 
!availablePrefix.equals(""))
                                         assignedAttrPrefix = 
availablePrefix;
                                     else {


Please let us know if there might be a regression.

Thanks

Michi

-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com                      http://lenya.apache.org
michael.wechner@wyona.com                        michi@apache.org


Mime
View raw message