CanonicalizerSpi.java revision 0
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"); 0N/A * you may not use this file except in compliance with the License. 0N/A * You may obtain a copy of the License at 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, 0N/A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0N/A * See the License for the specific language governing permissions and 0N/A * limitations under the License. * Base class which all Caninicalization algorithms extend. * @author Christian Geuer-Pollmann * @return the c14n bytes. * @throws CanonicalizationException * @throws java.io.IOException * @throws javax.xml.parsers.ParserConfigurationException * @throws org.xml.sax.SAXException // needs to validate for ID attribute nomalization * for some of the test vectors from the specification, * there has to be a validatin parser for ID attributes, default * attribute values, NMTOKENS, etc. * Unfortunaltely, the test vectors do use different DTDs or * even no DTD. So Xerces 1.3.1 fires many warnings about using * The input octet stream MUST contain a well-formed XML document, * but the input need not be validated. However, the attribute * value normalization and entity reference resolution MUST be * performed in accordance with the behaviors of a validating * XML processor. As well, nodes for default attributes (declared * in the ATTLIST with an AttValue but not specified) are created * in each element. Thus, the declarations in the document type * declaration are used to help create the canonical form, even * though the document type declaration is not retained in the // ErrorHandler eh = new C14NErrorHandler(); // db.setErrorHandler(eh); * Method engineCanonicalizeXPathNodeSet * @throws CanonicalizationException * Method engineCanonicalizeXPathNodeSet * @param inclusiveNamespaces * @throws CanonicalizationException /** Returns the URI of this engine. /** Returns the URI if include comments * @return true if include. * @throws CanonicalizationException * @param inclusiveNamespaces * @throws CanonicalizationException * @throws CanonicalizationException * @param inclusiveNamespaces * @throws CanonicalizationException * Sets the writter where the cannocalization ends. ByteArrayOutputStream if /** Reset the writter after a c14n */ protected boolean reset=
false;