Author: anil.saldhana(a)jboss.com
Date: 2011-07-22 22:35:20 -0400 (Fri, 22 Jul 2011)
New Revision: 1111
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java
Log:
PLFED-212: TransformerUtil/StaxUtil changes with xmlns
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java
===================================================================
---
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java 2011-07-22
18:46:26 UTC (rev 1110)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java 2011-07-23
02:35:20 UTC (rev 1111)
@@ -358,7 +358,10 @@
log.trace("Set Attribute Namespace=" + name.getNamespaceURI() +
"::Qual=:" + qual + "::Value="
+ namespace.getNamespaceURI());
}
- el.setAttributeNS(name.getNamespaceURI(), qual,
namespace.getNamespaceURI());
+ if (qual != null && qual.startsWith("xmlns"))
+ {
+ el.setAttributeNS(name.getNamespaceURI(), qual,
namespace.getNamespaceURI());
+ }
}
XMLEvent nextEvent = StaxParserUtil.peek(xmlEventReader);
@@ -410,7 +413,7 @@
if (prefix != null && prefix != "")
qual = (localPart != null && localPart != "") ? prefix +
":" + localPart : prefix;
- if (qual.equals("xmlns"))
+ if (qual != null && qual.equals("xmlns"))
return namespace.getNamespaceURI();
}
return null;
Show replies by date