CanonicalizerSpi.java revision 6159
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. 0N/A * Base class which all Caninicalization algorithms extend. 0N/A * $todo$ cange JavaDoc 0N/A * @author Christian Geuer-Pollmann 0N/A * Method canonicalize 0N/A * @return the c14n bytes. 0N/A * @throws CanonicalizationException 0N/A * @throws java.io.IOException 0N/A * @throws javax.xml.parsers.ParserConfigurationException 0N/A * @throws org.xml.sax.SAXException 0N/A // needs to validate for ID attribute nomalization 0N/A * for some of the test vectors from the specification, 0N/A * there has to be a validatin parser for ID attributes, default 0N/A * attribute values, NMTOKENS, etc. 0N/A * Unfortunaltely, the test vectors do use different DTDs or 0N/A * even no DTD. So Xerces 1.3.1 fires many warnings about using 0N/A * Text from the spec: 0N/A * The input octet stream MUST contain a well-formed XML document, 0N/A * but the input need not be validated. However, the attribute 0N/A * value normalization and entity reference resolution MUST be 0N/A * performed in accordance with the behaviors of a validating 0N/A * XML processor. As well, nodes for default attributes (declared 0N/A * in the ATTLIST with an AttValue but not specified) are created 0N/A * in each element. Thus, the declarations in the document type 0N/A * declaration are used to help create the canonical form, even 0N/A * though the document type declaration is not retained in the 0N/A // ErrorHandler eh = new C14NErrorHandler(); 0N/A // db.setErrorHandler(eh); 0N/A * Method engineCanonicalizeXPathNodeSet 0N/A * @param xpathNodeSet 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A * Method engineCanonicalizeXPathNodeSet 0N/A * @param xpathNodeSet 0N/A * @param inclusiveNamespaces 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A /** Returns the URI of this engine. 0N/A /** Returns the URI if include comments 0N/A * @return true if include. 0N/A * @param xpathNodeSet 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A * @param xpathNodeSet 0N/A * @param inclusiveNamespaces 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A * @param inclusiveNamespaces 0N/A * @return the c14n bytes 0N/A * @throws CanonicalizationException 0N/A * Sets the writter where the cannocalization ends. ByteArrayOutputStream if 0N/A /** Reset the writter after a c14n */