FileDocCategorySizeDatePackage
XSLTErrorResources_it.javaAPI DocJava SE 5 API96952Fri Aug 26 14:55:32 BST 2005com.sun.org.apache.xalan.internal.res

XSLTErrorResources_it

public class XSLTErrorResources_it extends ListResourceBundle
Set up error messages. We build a two dimensional array of message keys and message strings. In order to add a new message here, you need to first add a String constant. And you need to enter key , value pair as part of contents Array. You also need to update MAX_CODE for error strings and MAX_WARNING for warnings ( Needed for only information purpose )

Fields Summary
public static final int
MAX_CODE
Maximum error messages, this is needed to keep track of the number of messages.
public static final int
MAX_WARNING
Maximum warnings, this is needed to keep track of the number of warnings.
public static final int
MAX_OTHERS
Maximum misc strings.
public static final int
MAX_MESSAGES
Maximum total warnings and error messages.
public static final String
ER_NO_CURLYBRACE
public static final String
ER_ILLEGAL_ATTRIBUTE
public static final String
ER_NULL_SOURCENODE_APPLYIMPORTS
public static final String
ER_CANNOT_ADD
public static final String
ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES
public static final String
ER_NO_NAME_ATTRIB
public static final String
ER_TEMPLATE_NOT_FOUND
public static final String
ER_CANT_RESOLVE_NAME_AVT
public static final String
ER_REQUIRES_ATTRIB
public static final String
ER_MUST_HAVE_TEST_ATTRIB
public static final String
ER_BAD_VAL_ON_LEVEL_ATTRIB
public static final String
ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML
public static final String
ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME
public static final String
ER_NEED_MATCH_ATTRIB
public static final String
ER_NEED_NAME_OR_MATCH_ATTRIB
public static final String
ER_CANT_RESOLVE_NSPREFIX
public static final String
ER_ILLEGAL_VALUE
public static final String
ER_NO_OWNERDOC
public static final String
ER_ELEMTEMPLATEELEM_ERR
public static final String
ER_NULL_CHILD
public static final String
ER_NEED_SELECT_ATTRIB
public static final String
ER_NEED_TEST_ATTRIB
public static final String
ER_NEED_NAME_ATTRIB
public static final String
ER_NO_CONTEXT_OWNERDOC
public static final String
ER_COULD_NOT_CREATE_XML_PROC_LIAISON
public static final String
ER_PROCESS_NOT_SUCCESSFUL
public static final String
ER_NOT_SUCCESSFUL
public static final String
ER_ENCODING_NOT_SUPPORTED
public static final String
ER_COULD_NOT_CREATE_TRACELISTENER
public static final String
ER_KEY_REQUIRES_NAME_ATTRIB
public static final String
ER_KEY_REQUIRES_MATCH_ATTRIB
public static final String
ER_KEY_REQUIRES_USE_ATTRIB
public static final String
ER_REQUIRES_ELEMENTS_ATTRIB
public static final String
ER_MISSING_PREFIX_ATTRIB
public static final String
ER_BAD_STYLESHEET_URL
public static final String
ER_FILE_NOT_FOUND
public static final String
ER_IOEXCEPTION
public static final String
ER_NO_HREF_ATTRIB
public static final String
ER_STYLESHEET_INCLUDES_ITSELF
public static final String
ER_PROCESSINCLUDE_ERROR
public static final String
ER_MISSING_LANG_ATTRIB
public static final String
ER_MISSING_CONTAINER_ELEMENT_COMPONENT
public static final String
ER_CAN_ONLY_OUTPUT_TO_ELEMENT
public static final String
ER_PROCESS_ERROR
public static final String
ER_UNIMPLNODE_ERROR
public static final String
ER_NO_SELECT_EXPRESSION
public static final String
ER_CANNOT_SERIALIZE_XSLPROCESSOR
public static final String
ER_NO_INPUT_STYLESHEET
public static final String
ER_FAILED_PROCESS_STYLESHEET
public static final String
ER_COULDNT_PARSE_DOC
public static final String
ER_COULDNT_FIND_FRAGMENT
public static final String
ER_NODE_NOT_ELEMENT
public static final String
ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB
public static final String
ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB
public static final String
ER_NO_CLONE_OF_DOCUMENT_FRAG
public static final String
ER_CANT_CREATE_ITEM
public static final String
ER_XMLSPACE_ILLEGAL_VALUE
public static final String
ER_NO_XSLKEY_DECLARATION
public static final String
ER_CANT_CREATE_URL
public static final String
ER_XSLFUNCTIONS_UNSUPPORTED
public static final String
ER_PROCESSOR_ERROR
public static final String
ER_NOT_ALLOWED_INSIDE_STYLESHEET
public static final String
ER_RESULTNS_NOT_SUPPORTED
public static final String
ER_DEFAULTSPACE_NOT_SUPPORTED
public static final String
ER_INDENTRESULT_NOT_SUPPORTED
public static final String
ER_ILLEGAL_ATTRIB
public static final String
ER_UNKNOWN_XSL_ELEM
public static final String
ER_BAD_XSLSORT_USE
public static final String
ER_MISPLACED_XSLWHEN
public static final String
ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE
public static final String
ER_MISPLACED_XSLOTHERWISE
public static final String
ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE
public static final String
ER_NOT_ALLOWED_INSIDE_TEMPLATE
public static final String
ER_UNKNOWN_EXT_NS_PREFIX
public static final String
ER_IMPORTS_AS_FIRST_ELEM
public static final String
ER_IMPORTING_ITSELF
public static final String
ER_XMLSPACE_ILLEGAL_VAL
public static final String
ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL
public static final String
ER_SAX_EXCEPTION
public static final String
ER_XSLT_ERROR
public static final String
ER_CURRENCY_SIGN_ILLEGAL
public static final String
ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM
public static final String
ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER
public static final String
ER_REDIRECT_COULDNT_GET_FILENAME
public static final String
ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT
public static final String
ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX
public static final String
ER_MISSING_NS_URI
public static final String
ER_MISSING_ARG_FOR_OPTION
public static final String
ER_INVALID_OPTION
public static final String
ER_MALFORMED_FORMAT_STRING
public static final String
ER_STYLESHEET_REQUIRES_VERSION_ATTRIB
public static final String
ER_ILLEGAL_ATTRIBUTE_VALUE
public static final String
ER_CHOOSE_REQUIRES_WHEN
public static final String
ER_NO_APPLY_IMPORT_IN_FOR_EACH
public static final String
ER_CANT_USE_DTM_FOR_OUTPUT
public static final String
ER_CANT_USE_DTM_FOR_INPUT
public static final String
ER_CALL_TO_EXT_FAILED
public static final String
ER_PREFIX_MUST_RESOLVE
public static final String
ER_INVALID_UTF16_SURROGATE
public static final String
ER_XSLATTRSET_USED_ITSELF
public static final String
ER_CANNOT_MIX_XERCESDOM
public static final String
ER_TOO_MANY_LISTENERS
public static final String
ER_IN_ELEMTEMPLATEELEM_READOBJECT
public static final String
ER_DUPLICATE_NAMED_TEMPLATE
public static final String
ER_INVALID_KEY_CALL
public static final String
ER_REFERENCING_ITSELF
public static final String
ER_ILLEGAL_DOMSOURCE_INPUT
public static final String
ER_CLASS_NOT_FOUND_FOR_OPTION
public static final String
ER_REQUIRED_ELEM_NOT_FOUND
public static final String
ER_INPUT_CANNOT_BE_NULL
public static final String
ER_URI_CANNOT_BE_NULL
public static final String
ER_FILE_CANNOT_BE_NULL
public static final String
ER_SOURCE_CANNOT_BE_NULL
public static final String
ER_CANNOT_INIT_BSFMGR
public static final String
ER_CANNOT_CMPL_EXTENSN
public static final String
ER_CANNOT_CREATE_EXTENSN
public static final String
ER_INSTANCE_MTHD_CALL_REQUIRES
public static final String
ER_INVALID_ELEMENT_NAME
public static final String
ER_ELEMENT_NAME_METHOD_STATIC
public static final String
ER_EXTENSION_FUNC_UNKNOWN
public static final String
ER_MORE_MATCH_CONSTRUCTOR
public static final String
ER_MORE_MATCH_METHOD
public static final String
ER_MORE_MATCH_ELEMENT
public static final String
ER_INVALID_CONTEXT_PASSED
public static final String
ER_POOL_EXISTS
public static final String
ER_NO_DRIVER_NAME
public static final String
ER_NO_URL
public static final String
ER_POOL_SIZE_LESSTHAN_ONE
public static final String
ER_INVALID_DRIVER
public static final String
ER_NO_STYLESHEETROOT
public static final String
ER_ILLEGAL_XMLSPACE_VALUE
public static final String
ER_PROCESSFROMNODE_FAILED
public static final String
ER_RESOURCE_COULD_NOT_LOAD
public static final String
ER_BUFFER_SIZE_LESSTHAN_ZERO
public static final String
ER_UNKNOWN_ERROR_CALLING_EXTENSION
public static final String
ER_NO_NAMESPACE_DECL
public static final String
ER_ELEM_CONTENT_NOT_ALLOWED
public static final String
ER_STYLESHEET_DIRECTED_TERMINATION
public static final String
ER_ONE_OR_TWO
public static final String
ER_TWO_OR_THREE
public static final String
ER_COULD_NOT_LOAD_RESOURCE
public static final String
ER_CANNOT_INIT_DEFAULT_TEMPLATES
public static final String
ER_RESULT_NULL
public static final String
ER_RESULT_COULD_NOT_BE_SET
public static final String
ER_NO_OUTPUT_SPECIFIED
public static final String
ER_CANNOT_TRANSFORM_TO_RESULT_TYPE
public static final String
ER_CANNOT_TRANSFORM_SOURCE_TYPE
public static final String
ER_NULL_CONTENT_HANDLER
public static final String
ER_NULL_ERROR_HANDLER
public static final String
ER_CANNOT_CALL_PARSE
public static final String
ER_NO_PARENT_FOR_FILTER
public static final String
ER_NO_STYLESHEET_IN_MEDIA
public static final String
ER_NO_STYLESHEET_PI
public static final String
ER_NOT_SUPPORTED
public static final String
ER_PROPERTY_VALUE_BOOLEAN
public static final String
ER_COULD_NOT_FIND_EXTERN_SCRIPT
public static final String
ER_RESOURCE_COULD_NOT_FIND
public static final String
ER_OUTPUT_PROPERTY_NOT_RECOGNIZED
public static final String
ER_FAILED_CREATING_ELEMLITRSLT
public static final String
ER_VALUE_SHOULD_BE_NUMBER
public static final String
ER_VALUE_SHOULD_EQUAL
public static final String
ER_FAILED_CALLING_METHOD
public static final String
ER_FAILED_CREATING_ELEMTMPL
public static final String
ER_CHARS_NOT_ALLOWED
public static final String
ER_ATTR_NOT_ALLOWED
public static final String
ER_BAD_VALUE
public static final String
ER_ATTRIB_VALUE_NOT_FOUND
public static final String
ER_ATTRIB_VALUE_NOT_RECOGNIZED
public static final String
ER_NULL_URI_NAMESPACE
public static final String
ER_NUMBER_TOO_BIG
public static final String
ER_CANNOT_FIND_SAX1_DRIVER
public static final String
ER_SAX1_DRIVER_NOT_LOADED
public static final String
ER_SAX1_DRIVER_NOT_INSTANTIATED
public static final String
ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER
public static final String
ER_PARSER_PROPERTY_NOT_SPECIFIED
public static final String
ER_PARSER_ARG_CANNOT_BE_NULL
public static final String
ER_FEATURE
public static final String
ER_PROPERTY
public static final String
ER_NULL_ENTITY_RESOLVER
public static final String
ER_NULL_DTD_HANDLER
public static final String
ER_NO_DRIVER_NAME_SPECIFIED
public static final String
ER_NO_URL_SPECIFIED
public static final String
ER_POOLSIZE_LESS_THAN_ONE
public static final String
ER_INVALID_DRIVER_NAME
public static final String
ER_ERRORLISTENER
public static final String
ER_ASSERT_NO_TEMPLATE_PARENT
public static final String
ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR
public static final String
ER_NOT_ALLOWED_IN_POSITION
public static final String
ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION
public static final String
INVALID_TCHAR
public static final String
INVALID_QNAME
public static final String
INVALID_ENUM
public static final String
INVALID_NMTOKEN
public static final String
INVALID_NCNAME
public static final String
INVALID_BOOLEAN
public static final String
INVALID_NUMBER
public static final String
ER_ARG_LITERAL
public static final String
ER_DUPLICATE_GLOBAL_VAR
public static final String
ER_DUPLICATE_VAR
public static final String
ER_TEMPLATE_NAME_MATCH
public static final String
ER_INVALID_PREFIX
public static final String
ER_NO_ATTRIB_SET
public static final String
WG_FOUND_CURLYBRACE
public static final String
WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR
public static final String
WG_EXPR_ATTRIB_CHANGED_TO_SELECT
public static final String
WG_NO_LOCALE_IN_FORMATNUMBER
public static final String
WG_LOCALE_NOT_FOUND
public static final String
WG_CANNOT_MAKE_URL_FROM
public static final String
WG_CANNOT_LOAD_REQUESTED_DOC
public static final String
WG_CANNOT_FIND_COLLATOR
public static final String
WG_FUNCTIONS_SHOULD_USE_URL
public static final String
WG_ENCODING_NOT_SUPPORTED_USING_UTF8
public static final String
WG_ENCODING_NOT_SUPPORTED_USING_JAVA
public static final String
WG_SPECIFICITY_CONFLICTS
public static final String
WG_PARSING_AND_PREPARING
public static final String
WG_ATTR_TEMPLATE
public static final String
WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE
public static final String
WG_ATTRIB_NOT_HANDLED
public static final String
WG_NO_DECIMALFORMAT_DECLARATION
public static final String
WG_OLD_XSLT_NS
public static final String
WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED
public static final String
WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE
public static final String
WG_ILLEGAL_ATTRIBUTE
public static final String
WG_COULD_NOT_RESOLVE_PREFIX
public static final String
WG_STYLESHEET_REQUIRES_VERSION_ATTRIB
public static final String
WG_ILLEGAL_ATTRIBUTE_NAME
public static final String
WG_ILLEGAL_ATTRIBUTE_VALUE
public static final String
WG_EMPTY_SECOND_ARG
public static final String
WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML
public static final String
WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME
public static final String
WG_ILLEGAL_ATTRIBUTE_POSITION
public static final Object[]
contents
The lookup table for error messages.
public static final String
BAD_CODE
String for use when a bad error code was encountered.
public static final String
FORMAT_FAILED
String for use when formatting of the error string failed.
public static final String
ERROR_STRING
General error string.
public static final String
ERROR_HEADER
String to prepend to error messages.
public static final String
WARNING_HEADER
String to prepend to warning messages.
public static final String
XSL_HEADER
String to specify the XSLT module.
public static final String
XML_HEADER
String to specify the XML parser module.
public static final String
QUERY_HEADER
I don't think this is used any more.
Constructors Summary
Methods Summary
public java.lang.Object[][]getContents()
Get the lookup table.

return
The int to message lookup table.


                
    
  
    return contents;
  
private static final java.lang.StringgetResourceSuffix(java.util.Locale locale)
Return the resource file suffic for the indicated locale For most locales, this will be based the language code. However for Chinese, we do distinguish between Taiwan and PRC

param
locale the locale
return
an String suffix which canbe appended to a resource name


    String suffix = "_" + locale.getLanguage();
    String country = locale.getCountry();

    if (country.equals("TW"))
      suffix += "_" + country;

    return suffix;
  
public static final com.sun.org.apache.xalan.internal.res.XSLTErrorResourcesloadResourceBundle(java.lang.String className)
Return a named ResourceBundle for a particular locale. This method mimics the behavior of ResourceBundle.getBundle().

param
className the name of the class that implements the resource bundle.
return
the ResourceBundle
throws
MissingResourceException


    Locale locale = Locale.getDefault();
    String suffix = getResourceSuffix(locale);

    try
    {

      // first try with the given locale
      return (XSLTErrorResources) ResourceBundle.getBundle(className
              + suffix, locale);
    }
    catch (MissingResourceException e)
    {
      try  // try to fall back to en_US if we can't load
      {

        // Since we can't find the localized property file,
        // fall back to en_US.
        return (XSLTErrorResources) ResourceBundle.getBundle(className,
                new Locale("it", "IT"));
      }
      catch (MissingResourceException e2)
      {

        // Now we are really in trouble.
        // very bad, definitely very bad...not going to get very far
        throw new MissingResourceException(
          "Could not load any resource bundles.", className, "");
      }
    }