Author: anil.saldhana(a)jboss.com
Date: 2010-11-08 12:06:59 -0500 (Mon, 08 Nov 2010)
New Revision: 539
Modified:
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java
Log:
add prefix to element
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 2010-11-08
17:06:33 UTC (rev 538)
+++
federation/trunk/picketlink-fed-core/src/main/java/org/picketlink/identity/federation/core/util/TransformerUtil.java 2010-11-08
17:06:59 UTC (rev 539)
@@ -269,8 +269,13 @@
String prefix = elementName.getPrefix();
String localPart = elementName.getLocalPart();
- String qual = prefix != null && prefix != "" ? prefix +
":" + localPart : localPart ;
- Element el = doc.createElementNS( ns, qual );
+ String qual = prefix != null && prefix != "" ? prefix +
":" + localPart : localPart ;
+ Element el = doc.createElementNS( ns, qual );
+
+ if( StringUtil.isNotNull( prefix ))
+ {
+ el.setPrefix( prefix );
+ }
//Look for attributes
@SuppressWarnings("unchecked")
@@ -285,6 +290,7 @@
doc.createAttributeNS( ns, qual );
el.setAttributeNS( ns, qual , attr.getValue() );
}
+
XMLEvent nextEvent = StaxParserUtil.peek(xmlEventReader);
if( nextEvent.getEventType() == XMLEvent.CHARACTERS )
Show replies by date