diff --git a/src/org/apache/xml/serializer/ToStream.java b/src/org/apache/xml/serializer/ToStream.java index de5b2f8fc..261f39b3d 100644 --- a/src/org/apache/xml/serializer/ToStream.java +++ b/src/org/apache/xml/serializer/ToStream.java @@ -3020,6 +3020,14 @@ public boolean addAttributeAlways( index = m_attributes.getIndex(rawName); else { index = m_attributes.getIndex(uri, localName); + /* + * SAX parser sometimes returns attributes with no + * uri and localName defined. In such situation + * attribute may be already defined but it is + * not accessible querying by uri and localName + */ + if(index < 0) + index = m_attributes.getIndex(rawName); } if (index >= 0)