You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by co...@apache.org on 2013/03/20 17:06:12 UTC

svn commit: r1458908 - in /santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security: Init.java algorithms/JCEMapper.java encryption/XMLCipher.java

Author: coheigea
Date: Wed Mar 20 16:06:11 2013
New Revision: 1458908

URL: http://svn.apache.org/r1458908
Log:
Removing some non namespace aware DOM code

Modified:
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java
    santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java?rev=1458908&r1=1458907&r2=1458908&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/Init.java Wed Mar 20 16:06:11 2013
@@ -186,8 +186,8 @@ public class Init {
                 if (tag.equals("ResourceBundles")) {
                     Element resource = (Element)el;
                     /* configure internationalization */
-                    Attr langAttr = resource.getAttributeNode("defaultLanguageCode");
-                    Attr countryAttr = resource.getAttributeNode("defaultCountryCode");
+                    Attr langAttr = resource.getAttributeNodeNS(null, "defaultLanguageCode");
+                    Attr countryAttr = resource.getAttributeNodeNS(null, "defaultCountryCode");
                     String languageCode = 
                         (langAttr == null) ? null : langAttr.getNodeValue();
                     String countryCode = 
@@ -245,7 +245,7 @@ public class Init {
                             XMLUtils.selectNodes(algorithmsNode.getFirstChild(), CONF_NS, "Algorithm");
                         for (int i = 0; i < algorithms.length; i++) {
                             Element element = algorithms[i];
-                            String id = element.getAttribute("URI");
+                            String id = element.getAttributeNS(null, "URI");
                             JCEMapper.register(id, new JCEMapper.Algorithm(element));
                         }
                     }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java?rev=1458908&r1=1458907&r2=1458908&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/algorithms/JCEMapper.java Wed Mar 20 16:06:11 2013
@@ -308,11 +308,11 @@ public class JCEMapper {
          * @param el
          */
         public Algorithm(Element el) {
-            requiredKey = el.getAttribute("RequiredKey");
-            jceName = el.getAttribute("JCEName");
-            algorithmClass = el.getAttribute("AlgorithmClass");
+            requiredKey = el.getAttributeNS(null, "RequiredKey");
+            jceName = el.getAttributeNS(null, "JCEName");
+            algorithmClass = el.getAttributeNS(null, "AlgorithmClass");
             if (el.hasAttribute("KeyLength")) {
-                keyLength = Integer.parseInt(el.getAttribute("KeyLength"));
+                keyLength = Integer.parseInt(el.getAttributeNS(null, "KeyLength"));
             } else {
                 keyLength = 0;
             }

Modified: santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java
URL: http://svn.apache.org/viewvc/santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java?rev=1458908&r1=1458907&r2=1458908&view=diff
==============================================================================
--- santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java (original)
+++ santuario/xml-security-java/trunk/src/main/java/org/apache/xml/security/encryption/XMLCipher.java Wed Mar 20 16:06:11 2013
@@ -2444,7 +2444,7 @@ public class XMLCipher {
                         EncryptionConstants.EncryptionSpecNS, 
                         EncryptionConstants._TAG_DATAREFERENCE);
                 for (int i = 0; i < list.getLength() ; i++) {
-                    String uri = ((Element) list.item(i)).getAttribute("URI");
+                    String uri = ((Element) list.item(i)).getAttributeNS(null, "URI");
                     result.add(result.newDataReference(uri));
                 }
                 break;
@@ -2454,7 +2454,7 @@ public class XMLCipher {
                         EncryptionConstants.EncryptionSpecNS, 
                         EncryptionConstants._TAG_KEYREFERENCE);
                 for (int i = 0; i < list.getLength() ; i++) {
-                    String uri = ((Element) list.item(i)).getAttribute("URI");
+                    String uri = ((Element) list.item(i)).getAttributeNS(null, "URI");
                     result.add(result.newKeyReference(uri));
                 }
             }
@@ -3497,7 +3497,7 @@ public class XMLCipher {
                             EncryptionConstants.EncryptionSpecNS,
                             tagName
                         );
-                    result.setAttribute(EncryptionConstants._ATT_URI, uri);
+                    result.setAttributeNS(null, EncryptionConstants._ATT_URI, uri);
 
                     // TODO: Need to martial referenceInformation
                     // Figure out how to make this work..