You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by we...@apache.org on 2006/03/05 21:58:56 UTC

svn commit: r383399 - /webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java

Author: werner
Date: Sun Mar  5 12:58:53 2006
New Revision: 383399

URL: http://svn.apache.org/viewcvs?rev=383399&view=rev
Log:
Remove unused code.

Modified:
    webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java

Modified: webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java
URL: http://svn.apache.org/viewcvs/webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java?rev=383399&r1=383398&r2=383399&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java (original)
+++ webservices/wss4j/trunk/src/org/apache/ws/security/message/EnvelopeIdResolver.java Sun Mar  5 12:58:53 2006
@@ -163,76 +163,4 @@
         String uriNodeValue = uri.getNodeValue();
         return uriNodeValue.startsWith("#");
     }
-
-    /**
-     * Dereferences a same-document URI fragment.
-     *
-     * @param node the node (document or element) referenced by the
-     *             URI fragment. If null, returns an empty set.
-     * @return a set of nodes (minus any comment nodes)
-     */
-    private Set dereferenceSameDocumentURI(Node node) {
-        Set nodeSet = new HashSet();
-        if (node != null) {
-            nodeSetMinusCommentNodes(node, nodeSet, null);
-        }
-        return nodeSet;
-    }
-
-    /**
-     * Recursively traverses the subtree, and returns an XPath-equivalent
-     * node-set of all nodes traversed, excluding any comment nodes.
-     *
-     * @param node    the node to traverse
-     * @param nodeSet the set of nodes traversed so far
-     * @param the     previous sibling node
-     */
-    private void nodeSetMinusCommentNodes(Node node,
-                                          Set nodeSet,
-                                          Node prevSibling) {
-        if (doDebug) {
-            log.debug("Tag: "
-                    + node.getNodeName()
-                    + ", '"
-                    + node.getNodeValue()
-                    + "'");
-        }
-        switch (node.getNodeType()) {
-            case Node.ELEMENT_NODE:
-                NamedNodeMap attrs = node.getAttributes();
-                if (attrs != null) {
-                    for (int i = 0; i < attrs.getLength(); i++) {
-                        if (doDebug) {
-                            log.debug("Attr: "
-                                    + attrs.item(i).getNodeName()
-                                    + ", '"
-                                    + attrs.item(i).getNodeValue()
-                                    + "'");
-                        }
-                        nodeSet.add(attrs.item(i));
-                    }
-                }
-                nodeSet.add(node);
-                Node pSibling = null;
-                for (Node child = node.getFirstChild();
-                     child != null;
-                     child = child.getNextSibling()) {
-                    nodeSetMinusCommentNodes(child, nodeSet, pSibling);
-                    pSibling = child;
-                }
-                break;
-            case Node.TEXT_NODE:
-            case Node.CDATA_SECTION_NODE:
-                // emulate XPath which only returns the first node in
-                // contiguous text/cdata nodes
-                if (prevSibling != null
-                        && (prevSibling.getNodeType() == Node.TEXT_NODE
-                        || prevSibling.getNodeType()
-                        == Node.CDATA_SECTION_NODE)) {
-                    return;
-                }
-            case Node.PROCESSING_INSTRUCTION_NODE:
-                nodeSet.add(node);
-        }
-    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org