You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by ra...@apache.org on 2006/07/22 00:25:29 UTC
svn commit: r424478 - in
/xml/security/trunk/src/org/apache/xml/security/utils: ElementProxy.java
XMLUtils.java
Author: raul
Date: Fri Jul 21 15:25:28 2006
New Revision: 424478
URL: http://svn.apache.org/viewvc?rev=424478&view=rev
Log:
Fixed bug when the prefix digital signature uri is not null.
Modified:
xml/security/trunk/src/org/apache/xml/security/utils/ElementProxy.java
xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java
Modified: xml/security/trunk/src/org/apache/xml/security/utils/ElementProxy.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/ElementProxy.java?rev=424478&r1=424477&r2=424478&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/ElementProxy.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/ElementProxy.java Fri Jul 21 15:25:28 2006
@@ -542,6 +542,10 @@
throw new XMLSecurityException("prefix.AlreadyAssigned", exArgs);
}
}
+ if (Constants.SignatureSpecNS.equals(namespace)) {
+ XMLUtils.dsPrefix=prefix;
+ XMLUtils.xmlnsDsPrefix="xmlns:"+prefix;
+ }
ElementProxy._prefixMappings.put(namespace, prefix.intern());
ElementProxy._prefixMappingsBindings.put(namespace, ("xmlns:"+prefix).intern());
}
Modified: xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java
URL: http://svn.apache.org/viewvc/xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java?rev=424478&r1=424477&r2=424478&view=diff
==============================================================================
--- xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java (original)
+++ xml/security/trunk/src/org/apache/xml/security/utils/XMLUtils.java Fri Jul 21 15:25:28 2006
@@ -216,7 +216,8 @@
}
- static final String dsPrefix= Constants.getSignatureSpecNSprefix();
+ static String dsPrefix=null;
+ static String xmlnsDsPrefix=null;
static Map namePrefixes=new HashMap();
/**
* Creates an Element in the XML Signature specification namespace.
@@ -251,7 +252,7 @@
namePrefixes.put(elementName,namePrefix);
}
Element element = doc.createElementNS(Constants.SignatureSpecNS, namePrefix);
- element.setAttributeNS(Constants.NamespaceSpecNS, dsPrefix,
+ element.setAttributeNS(Constants.NamespaceSpecNS, xmlnsDsPrefix,
Constants.SignatureSpecNS);
return element;