Canonicalizer20010315Excl.java revision 661
0N/A * reserved comment block 0N/A * DO NOT REMOVE OR ALTER! 0N/A * Copyright 1999-2004 The Apache Software Foundation. 0N/A * Licensed under the Apache License, Version 2.0 (the "License"); you may not 0N/A * use this file except in compliance with the License. You may obtain a copy of 0N/A * Unless required by applicable law or agreed to in writing, software 0N/A * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 0N/A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 0N/A * License for the specific language governing permissions and limitations under 0N/A * Implements " <A 0N/A * Canonicalization, Version 1.0 </A>" <BR /> 0N/A * Credits: During restructuring of the Canonicalizer framework, Ren?? 0N/A * Kollmorgen from Software AG submitted an implementation of ExclC14n which 0N/A * fitted into the old architecture and which based heavily on my old (and slow) 0N/A * implementation of "Canonical XML". A big "thank you" to Ren?? for this. 0N/A * <i>THIS </i> implementation is a complete rewrite of the algorithm. 0N/A * @author Christian Geuer-Pollmann <geuerp@apache.org> 661N/A * @version $Revision: 1.5 $ 0N/A * XML Canonicalization, Version 1.0</a> 0N/A * This Set contains the names (Strings like "xmlns" or "xmlns:foo") of 0N/A * the inclusive namespaces. 0N/A * Constructor Canonicalizer20010315Excl 0N/A * @param includeComments 0N/A * Method engineCanonicalizeSubTree 0N/A * @throws CanonicalizationException 0N/A * Method engineCanonicalizeSubTree 0N/A * @param inclusiveNamespaces 0N/A * @throws CanonicalizationException 0N/A * Method engineCanonicalizeSubTree 0N/A * @param inclusiveNamespaces 0N/A * @param excl A element to exclude from the c14n process. 0N/A * @return the rootNode c14n. 0N/A * @throws CanonicalizationException 0N/A * @param inclusiveNamespaces 0N/A * @return the rootNode c14n. 0N/A * @throws CanonicalizationException 0N/A * Method handleAttributesSubtree 0N/A * @throws CanonicalizationException 0N/A // System.out.println("During the traversal, I encountered " + 0N/A // XMLUtils.getXPath(E)); 0N/A // result will contain the attrs which have to be outputted 0N/A //The prefix visibly utilized(in the attribute or in the name) in the element 0N/A //Not a namespace definition. 0N/A //The Element is output element, add his prefix(if used) to visibyUtilized 0N/A //Add to the result. 0N/A //New definition check if it is relative. 0N/A "c14n.Canonicalizer.RelativeNamespace",
exArgs);
0N/A //This can be optimezed by I don't have time 0N/A * Method engineCanonicalizeXPathNodeSet 0N/A * @param xpathNodeSet 0N/A * @param inclusiveNamespaces 0N/A * @throws CanonicalizationException 0N/A * @throws CanonicalizationException 0N/A // result will contain the attrs which have to be outputted 0N/A //The prefix visibly utilized(in the attribute or in the name) in the element 0N/A //It's the output selected. 661N/A //The node is not in the nodeset(if there is a nodeset) 0N/A //Not a namespace definition. 0N/A //The Element is output element, add his prefix(if used) to visibyUtilized 0N/A //Add to the result. 0N/A //New definiton check if it is relative 0N/A "c14n.Canonicalizer.RelativeNamespace",
exArgs);
0N/A //The element is visible, handle the xmlns definition 0N/A //There is a definition but the xmlns is not selected by the xpath. 0N/A //This can be optimezed by I don't have time 0N/A //visiblyUtilized.addAll(this._inclusiveNSSet);