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