286N/A * reserved comment block 286N/A * DO NOT REMOVE OR ALTER! 286N/A * The Apache Software License, Version 1.1 286N/A * Copyright (c) 1999-2004 The Apache Software Foundation. 286N/A * Redistribution and use in source and binary forms, with or without 286N/A * modification, are permitted provided that the following conditions 286N/A * 1. Redistributions of source code must retain the above copyright 286N/A * notice, this list of conditions and the following disclaimer. 286N/A * 2. Redistributions in binary form must reproduce the above copyright 286N/A * notice, this list of conditions and the following disclaimer in 286N/A * the documentation and/or other materials provided with the 286N/A * 3. The end-user documentation included with the redistribution, 286N/A * if any, must include the following acknowledgment: 286N/A * "This product includes software developed by the 286N/A * Alternately, this acknowledgment may appear in the software itself, 286N/A * if and wherever such third-party acknowledgments normally appear. 286N/A * 4. The names "Xerces" and "Apache Software Foundation" must 286N/A * not be used to endorse or promote products derived from this 286N/A * software without prior written permission. For written 286N/A * permission, please contact apache@apache.org. 286N/A * 5. Products derived from this software may not be called "Apache", 286N/A * nor may "Apache" appear in their name, without prior written 286N/A * permission of the Apache Software Foundation. 286N/A * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 286N/A * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 286N/A * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 286N/A * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR 286N/A * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 286N/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 286N/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 286N/A * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 286N/A * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 286N/A * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 286N/A * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 286N/A * ==================================================================== 286N/A * This software consists of voluntary contributions made by many 286N/A * individuals on behalf of the Apache Software Foundation and was 286N/A * originally based on software copyright (c) 1999, International 286N/A * information on the Apache Software Foundation, please see 286N/A * This class is a common element of all parser configurations and is 286N/A * used to report errors that occur. This component can be queried by 286N/A * parser components from the component manager using the following 286N/A * Errors are separated into domains that categorize a class of errors. 286N/A * In a parser configuration, the parser would register a 286N/A * <code>MessageFormatter</code> for each domain that is capable of 286N/A * localizing error messages and formatting them based on information 286N/A * about the error. Any parser component can invent new error domains 286N/A * and register additional message formatters to localize messages in 286N/A * This component requires the following features and properties from the 286N/A * component manager that uses it: 286N/A * This component can use the following features and properties but they 286N/A * @see MessageFormatter 286N/A * @author Andy Clark, IBM 286N/A * Severity: warning. Warnings represent informational messages only 286N/A * that should not be considered serious enough to stop parsing or 286N/A * indicate an error in the document's validity. 286N/A * Severity: error. Common causes of errors are document structure and/or 286N/A * content that that does not conform to the grammar rules specified for 286N/A * the document. These are typically validation errors. 286N/A * Severity: fatal error. Fatal errors are errors in the syntax of the 286N/A * XML document or invalid byte sequences for a given encoding. The 286N/A * XML 1.0 Specification mandates that errors of this type are not 286N/A * <strong>Note:</strong> The parser does have a "continue after fatal 286N/A * error" feature but it should be used with extreme caution and care. 286N/A /** Feature identifier: continue after fatal error. */ 286N/A // property identifiers 286N/A /** Property identifier: error handler. */ 286N/A // recognized features and properties 286N/A /** Recognized features. */ 286N/A /** Feature defaults. */ 286N/A /** Recognized properties. */ 286N/A /** Property defaults. */ 286N/A /** The locale to be used to format error messages. */ 286N/A /** Mapping of Message formatters for domains. */ 286N/A /** Document locator. */ 286N/A /** Continue after fatal error feature. */ 286N/A * Default error handler. This error handler is only used in the 286N/A * absence of a registered error handler so that errors are not 286N/A * "swallowed" silently. This is one of the most common "problems" 286N/A * reported by users of the parser. 286N/A /** A SAX proxy to the error handler contained in this error reporter. */ 286N/A /** Constructs an error reporter with a locator. */ 286N/A // REVISIT: [Q] Should the locator be passed to the reportError 286N/A // method? Otherwise, there is no way for a parser 286N/A // component to store information about where an 286N/A // error occurred so as to report it later. 286N/A // An example would be to record the location of 286N/A // IDREFs so that, at the end of the document, if 286N/A // there is no associated ID declared, the error 286N/A // could report the location information of the 286N/A // NOTE: I added another reportError method that allows the 286N/A // caller to specify the location of the error being 286N/A * Sets the current locale. 286N/A * @param locale The new locale. 286N/A * Gets the current locale. 286N/A * @return the current Locale 286N/A }
// getLocale(): Locale 286N/A * Sets the document locator. 286N/A * @param locator The locator. 286N/A }
// setDocumentLocator(XMLLocator) 286N/A * Registers a message formatter for the specified domain. 286N/A * <strong>Note:</strong> Registering a message formatter for a domain 286N/A * when there is already a formatter registered will cause the previous 286N/A * formatter to be lost. This method replaces any previously registered 286N/A * message formatter for the specified domain. 286N/A * @param messageFormatter 286N/A }
// putMessageFormatter(String,MessageFormatter) 286N/A * Returns the message formatter associated with the specified domain, 286N/A * or null if no message formatter is registered for that domain. 286N/A * @param domain The domain of the message formatter. 286N/A }
// getMessageFormatter(String):MessageFormatter 286N/A * Removes the message formatter for the specified domain and 286N/A * returns the removed message formatter. 286N/A * @param domain The domain of the message formatter. 286N/A }
// removeMessageFormatter(String):MessageFormatter 286N/A * Reports an error. The error message passed to the error handler 286N/A * is formatted for the locale by the message formatter installed 286N/A * for the specified error domain. 286N/A * @param domain The error domain. 286N/A * @param key The key of the error message. 286N/A * @param arguments The replacement arguments for the error message, 286N/A * @param severity The severity of the error. 286N/A * @return The formatted error message. 286N/A * @see #SEVERITY_WARNING 286N/A * @see #SEVERITY_FATAL_ERROR 286N/A }
// reportError(String,String,Object[],short):String 286N/A * Reports an error. The error message passed to the error handler 286N/A * is formatted for the locale by the message formatter installed 286N/A * for the specified error domain. 286N/A * @param domain The error domain. 286N/A * @param key The key of the error message. 286N/A * @param arguments The replacement arguments for the error message, 286N/A * @param severity The severity of the error. 286N/A * @param exception The exception to wrap. 286N/A * @return The formatted error message. 286N/A * @see #SEVERITY_WARNING 286N/A * @see #SEVERITY_FATAL_ERROR 286N/A }
// reportError(String,String,Object[],short,Exception):String 286N/A * Reports an error at a specific location. 286N/A * @param location The error location. 286N/A * @param domain The error domain. 286N/A * @param key The key of the error message. 286N/A * @param arguments The replacement arguments for the error message, 286N/A * @param severity The severity of the error. 286N/A * @return The formatted error message. 286N/A * @see #SEVERITY_WARNING 286N/A * @see #SEVERITY_FATAL_ERROR 286N/A }
// reportError(XMLLocator,String,String,Object[],short):String 286N/A * Reports an error at a specific location. 286N/A * @param location The error location. 286N/A * @param domain The error domain. 286N/A * @param key The key of the error message. 286N/A * @param arguments The replacement arguments for the error message, 286N/A * @param severity The severity of the error. 286N/A * @param exception The exception to wrap. 286N/A * @return The formatted error message. 286N/A * @see #SEVERITY_WARNING 286N/A * @see #SEVERITY_FATAL_ERROR 286N/A // REVISIT: [Q] Should we do anything about invalid severity 286N/A // format error message and create parse exception 286N/A }
// reportError(XMLLocator,String,String,Object[],short,Exception):String 286N/A // XMLComponent methods 286N/A * Resets the component. The component can query the component manager 286N/A * about any features and properties that affect the operation of the 286N/A * @param componentManager The component manager. 286N/A * @throws SAXException Thrown by component on initialization error. 286N/A * For example, if a feature or property is 286N/A * required for the operation of the component, the 286N/A * component manager may throw a 286N/A * SAXNotRecognizedException or a 286N/A * SAXNotSupportedException. 286N/A }
// reset(XMLComponentManager) 286N/A * Returns a list of feature identifiers that are recognized by 286N/A * this component. This method may return null if no features 286N/A * are recognized by this component. 286N/A }
// getRecognizedFeatures():String[] 286N/A * Sets the state of a feature. This method is called by the component 286N/A * manager any time after reset when a feature changes state. 286N/A * <strong>Note:</strong> Components should silently ignore features 286N/A * that do not affect the operation of the component. 286N/A * @param featureId The feature identifier. 286N/A * @param state The state of the feature. 286N/A * @throws SAXNotRecognizedException The component should not throw 286N/A * @throws SAXNotSupportedException The component should not throw 286N/A // Allows the parser to continue after a fatal error. 286N/A // Normally, a fatal error would stop the parse. 286N/A }
// setFeature(String,boolean) 286N/A // return state of given feature or false if unsupported. 286N/A // Allows the parser to continue after a fatal error. 286N/A // Normally, a fatal error would stop the parse. 286N/A }
// setFeature(String,boolean) 286N/A * Returns a list of property identifiers that are recognized by 286N/A * this component. This method may return null if no properties 286N/A * are recognized by this component. 286N/A }
// getRecognizedProperties():String[] 286N/A * Sets the value of a property. This method is called by the component 286N/A * manager any time after reset when a property changes value. 286N/A * <strong>Note:</strong> Components should silently ignore properties 286N/A * that do not affect the operation of the component. 286N/A * @param propertyId The property identifier. 286N/A * @param value The value of the property. 286N/A * @throws SAXNotRecognizedException The component should not throw 286N/A * @throws SAXNotSupportedException The component should not throw 286N/A }
// setProperty(String,Object) 286N/A * Returns the default state for a feature, or null if this 286N/A * component does not want to report a default value for this 286N/A * @param featureId The feature identifier. 286N/A }
// getFeatureDefault(String):Boolean 286N/A * Returns the default state for a property, or null if this 286N/A * component does not want to report a default value for this 286N/A * @param propertyId The property identifier. 286N/A }
// getPropertyDefault(String):Object 286N/A * Get the internal XMLErrrorHandler. 286N/A * Gets the internal XMLErrorHandler 286N/A}
// class XMLErrorReporter