# HG changeset patch # User andrew # Date 1335961956 -3600 # Node ID b3301c9b17f3bde579a5313e9ff076b1c46ae34a # Parent 9b7a2f21b8a8204d7f6568c20c0efa4a3edfaf8d Sync JAXP 1.4.5 update 1 for 7u4 to existing sources diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/Version.java --- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/Version.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/Version.java Wed May 02 13:32:36 2012 +0100 @@ -26,10 +26,10 @@ * Administrative class to keep track of the version number of * the Xalan release. *
This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information. This class will replace the older + * org.apache.project-name.Version.getVersion() be a standard way + * to get version information. This class will replace the older * com.sun.org.apache.xalan.internal.processor.Version class.
- *See also: com/sun/org/apache/xalan/internal/res/XSLTInfo.properties for + *
See also: com/sun/org/apache/xalan/internal/res/XSLTInfo.properties for * information about the version of the XSLT spec we support.
* @xsl.usage general */ @@ -38,7 +38,7 @@ /** * Get the basic version string for the current Xalan release. - * Version String formatted like + * Version String formatted like *"Xalan Java v.r[.dd| Dnn]"
.
*
* Futurework: have this read version info from jar manifest.
@@ -49,8 +49,8 @@
{
return getProduct()+" "+getImplementationLanguage()+" "
+getMajorVersionNum()+"."+getReleaseVersionNum()+"."
- +( (getDevelopmentVersionNum() > 0) ?
- ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum()));
+ +( (getDevelopmentVersionNum() > 0) ?
+ ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum()));
}
/**
@@ -62,7 +62,7 @@
{
System.out.println(getVersion());
}
-
+
/**
* Name of product: Xalan.
*/
@@ -78,8 +78,8 @@
{
return "Java";
}
-
-
+
+
/**
* Major version number.
* Version number. This changes only when there is a
@@ -94,8 +94,8 @@
public static int getMajorVersionNum()
{
return 2;
-
- }
+
+ }
/**
* Release Number.
@@ -109,7 +109,7 @@
{
return 7;
}
-
+
/**
* Maintenance Drop Number.
* Optional identifier used to designate maintenance
@@ -142,14 +142,14 @@
* the final releases.
*/
public static int getDevelopmentVersionNum()
- {
- try {
+ {
+ try {
if ((new String("")).length() == 0)
return 0;
- else
+ else
return Integer.parseInt("");
} catch (NumberFormatException nfe) {
return 0;
- }
- }
+ }
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/XalanConstants.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/XalanConstants.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.org.apache.xalan.internal;
+
+import com.sun.org.apache.xerces.internal.impl.*;
+import java.util.Enumeration;
+import java.util.NoSuchElementException;
+
+/**
+ * Commonly used constants.
+ *
+ * @author Huizhe Wang, Oracle
+ *
+ * @version $Id: Constants.java,v 1.14 2011-06-07 04:39:40 joehw Exp $
+ */
+public final class XalanConstants {
+
+ //
+ // Constants
+ //
+ // Oracle Feature:
+ /**
+ * Use Service Mechanism
+ * + *true
instructs the implementation to use service mechanism to find implementation.
+ * This is the default behavior.
+ * false
instructs the implementation to skip service mechanism and use the default implementation.
+ * * This code is designed to implement the JAXP 1.1 spec pluggability * feature and is designed to run on JDK version 1.1 and - * later, and to compile on JDK 1.2 and onward. + * later, and to compile on JDK 1.2 and onward. * The code also runs both as part of an unbundled jar file and * when bundled as part of the JDK. *
* This class was moved from the
+ * This code is designed to implement the JAXP 1.1 spec pluggability
+ * feature and is designed to run on JDK version 1.1 and
+ * later, and to compile on JDK 1.2 and onward.
+ * The code also runs both as part of an unbundled jar file and
+ * when bundled as part of the JDK.
+ *
+ * This class was moved from the Usage-command line:
+ * Usage-command line:
* Usage-from program:
+ *
+ * Usage-from program:
* Usage-from stylesheet:
+ * Usage-from stylesheet:
* Xalan users reporting problems are encouraged to use this class
- * to see if there are potential problems with their actual
- * Java environment before reporting a bug. Note that you
- * should both check from the JVM/JRE's command line as well as
- * temporarily calling checkEnvironment() directly from your code,
+ *
+ * Xalan users reporting problems are encouraged to use this class
+ * to see if there are potential problems with their actual
+ * Java environment before reporting a bug. Note that you
+ * should both check from the JVM/JRE's command line as well as
+ * temporarily calling checkEnvironment() directly from your code,
* since the classpath may differ (especially for servlets, etc). Also see http://xml.apache.org/xalan-j/faq.html Note: This class is pretty simplistic:
- * results are not necessarily definitive nor will it find all
- * problems related to environment setup. Also, you should avoid
- * calling this in deployed production code, both because it is
+ * Note: This class is pretty simplistic:
+ * results are not necessarily definitive nor will it find all
+ * problems related to environment setup. Also, you should avoid
+ * calling this in deployed production code, both because it is
* quite slow and because it forces classes to get loaded. Note: This class explicitly has very limited compile-time
- * dependencies to enable easy compilation and usage even when
+ * Note: This class explicitly has very limited compile-time
+ * dependencies to enable easy compilation and usage even when
* Xalan, DOM/SAX/JAXP, etc. are not present. Note: for an improved version of this utility, please see
- * the xml-commons' project Which utility which does the same kind
+ *
+ * Note: for an improved version of this utility, please see
+ * the xml-commons' project Which utility which does the same kind
* of thing but in a much simpler manner. Command line entrypoint; Sets output and calls
+ * Command line entrypoint; Sets output and calls
* {@link #checkEnvironment(PrintWriter)}. Note that this class is not advanced enough to tell you
- * everything about the environment that affects Xalan, and
- * sometimes reports errors that will not actually affect
- * Xalan's behavior. Currently, it very simplistically
- * checks the JVM's environment for some basic properties and
- * logs them out; it will report a problem if it finds a setting
+ * Note that this class is not advanced enough to tell you
+ * everything about the environment that affects Xalan, and
+ * sometimes reports errors that will not actually affect
+ * Xalan's behavior. Currently, it very simplistically
+ * checks the JVM's environment for some basic properties and
+ * logs them out; it will report a problem if it finds a setting
* or .jar file that is likely to cause problems. Advanced users can peruse the code herein to help them
- * investigate potential environment problems found; other users
- * may simply send the output from this tool along with any bugs
+ * Advanced users can peruse the code herein to help them
+ * investigate potential environment problems found; other users
+ * may simply send the output from this tool along with any bugs
* they submit to help us in the debugging process. Worker method called from various places. Various system and CLASSPATH, etc. properties are put into
- * the hash as keys with a brief description of the current state
- * of that item as the value. Any serious problems will be put in
+ * Various system and CLASSPATH, etc. properties are put into
+ * the hash as keys with a brief description of the current state
+ * of that item as the value. Any serious problems will be put in
* with a key that is prefixed with {@link #ERROR 'ERROR.'} so it
- * stands out in any resulting report; also a key with just that
+ * stands out in any resulting report; also a key with just that
* constant will be set as well for any error. Note that some legitimate cases are flaged as potential
- * errors - namely when a developer recompiles xalan.jar on their
- * own - and even a non-error state doesn't guaruntee that
- * everything in the environment is correct. But this will help
+ * Note that some legitimate cases are flaged as potential
+ * errors - namely when a developer recompiles xalan.jar on their
+ * own - and even a non-error state doesn't guaruntee that
+ * everything in the environment is correct. But this will help
* point out the most common classpath and system property
- * problems that we've seen.javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:40:59 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -392,7 +392,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -448,7 +448,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -472,11 +472,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -486,11 +486,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -582,7 +582,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -599,7 +599,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -624,7 +624,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -7640369932165775029L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Error: Can not have '{' within expression"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} has an illegal attribute: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"Can not add {0} to {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode is null in handleApplyTemplatesInstruction!"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} must have a name attribute."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} requires attribute: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} must have a ''test'' attribute."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Bad value on level attribute: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction name can not be 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"Had IO Exception with stylesheet file: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) Could not find href attribute for {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} is directly or indirectly including itself!"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Error! Did not find xpath select expression (-select)."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"Can not serialize an XSLProcessor!"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Failed to process stylesheet!"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"Could not parse {0} document!"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each must have either a match or name attribute"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"templates must have either a match or name attribute"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"There is no xsl:key declaration for {0}!"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Error! Cannot create url for: {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions is unsupported"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory Error"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} not allowed inside a stylesheet!"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns no longer supported! Use xsl:output instead."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space no longer supported! Use xsl:strip-space or xsl:preserve-space instead."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} is not allowed inside a template!"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) {0} extension namespace prefix {1} unknown"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Imports can only occur as the first elements in the stylesheet!"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet not succesfull!"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX Exception"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Function not supported!"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"Prefix in exclude-result-prefixes is not valid: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"Missing namespace URI for specified prefix"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"The input node can not be null for a DOMSource for newTemplates!"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "Class file not found for option {0}"},
+ "Class file not found for option {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "Required Element not found: {0}"},
+ "Required Element not found: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream cannot be null"},
+ "InputStream cannot be null"},
{ ER_URI_CANNOT_BE_NULL,
- "URI cannot be null"},
+ "URI cannot be null"},
{ ER_FILE_CANNOT_BE_NULL,
- "File cannot be null"},
+ "File cannot be null"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource cannot be null"},
+ "InputSource cannot be null"},
{ ER_CANNOT_INIT_BSFMGR,
- "Could not initialize BSF Manager"},
+ "Could not initialize BSF Manager"},
{ ER_CANNOT_CMPL_EXTENSN,
- "Could not compile extension"},
+ "Could not compile extension"},
{ ER_CANNOT_CREATE_EXTENSN,
"Could not create extension: {0} because of: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"Value for {0} should contain a parsable number"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"attribute-set named {0} does not exist"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"The feature name cannot be null in TransformerFactory.setFeature(String name, boolean value)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"The feature name cannot be null in TransformerFactory.getFeature(String name)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"Cannot set the feature ''{0}'' on this TransformerFactory."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "Use of the extension element ''{0}'' is not allowed when the secure processing feature is set to true."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "Use of the extension element ''{0}'' is not allowed when the secure processing feature is set to true."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"Cannot get the prefix for a null namespace uri."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"Cannot get the namespace uri for null prefix."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"The function name cannot be null."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"The arity cannot be negative."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_de.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Fehler: \"{\" darf nicht im Ausdruck enthalten sein"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} hat ein ung\u00FCltiges Attribut: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"{0} kann nicht zu {1} hinzugef\u00FCgt werden"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode ist null in handleApplyTemplatesInstruction."},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} muss \u00FCber ein \"name\"-Attribut verf\u00FCgen."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} erfordert Attribut: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} muss \u00FCber ein \"test\"-Attribut verf\u00FCgen."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Ung\u00FCltiger Wert bei Ebenenattribut: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction-Name darf nicht \"xml\" lauten"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"IO-Ausnahme bei Stylesheet-Datei: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) \"href\"-Attribut f\u00FCr {0} konnte nicht gefunden werden"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} schlie\u00DFt sich direkt oder indirekt selbst mit ein."},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Fehler. xpath-Auswahlausdruck (-select) nicht gefunden."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"XSLProcessor kann nicht serialisiert werden."},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Verarbeitung des Stylesheet nicht erfolgreich."},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"{0}-Dokument konnte nicht geparst werden."},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each muss entweder ein \"match\"- oder ein \"name\"-Attribut haben"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"Vorlagen m\u00FCssen entweder ein \"match\"- oder ein \"name\"-Attribut haben"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"Keine xsl:key-Deklaration f\u00FCr {0} vorhanden."},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Fehler. URL f\u00FCr {0} kann nicht erstellt werden"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions nicht unterst\u00FCtzt"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT-TransformerFactory-Fehler"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} nicht zul\u00E4ssig in einem Stylesheet."},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns wird nicht mehr unterst\u00FCtzt. Verwenden Sie stattdessen xsl:output."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space wird nicht mehr unterst\u00FCtzt. Verwenden Sie stattdessen xsl:strip-space oder xsl:preserve-space."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} nicht zul\u00E4ssig in einer Vorlage."},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) {0}: Erweiterung des Namespace-Pr\u00E4fixes {1} ist unbekannt"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Importe k\u00F6nnen nur als erste Elemente in einem Stylesheet auftreten."},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet nicht erfolgreich."},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX-Ausnahme"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funktion nicht unterst\u00FCtzt."},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"Pr\u00E4fix in exclude-result-prefixes ist nicht g\u00FCltig: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"Fehlender Namespace-URI f\u00FCr angegebenes Pr\u00E4fix"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"Der Eingabeknoten darf nicht null sein f\u00FCr eine DOMSource f\u00FCr newTemplates."},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "Klassendatei nicht gefunden f\u00FCr Option {0}"},
+ "Klassendatei nicht gefunden f\u00FCr Option {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "Erforderliches Element nicht gefunden: {0}"},
+ "Erforderliches Element nicht gefunden: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream darf nicht null sein"},
+ "InputStream darf nicht null sein"},
{ ER_URI_CANNOT_BE_NULL,
- "URI darf nicht null sein"},
+ "URI darf nicht null sein"},
{ ER_FILE_CANNOT_BE_NULL,
- "Datei darf nicht null sein"},
+ "Datei darf nicht null sein"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource darf nicht null sein"},
+ "InputSource darf nicht null sein"},
{ ER_CANNOT_INIT_BSFMGR,
- "BSF-Manager konnte nicht initialisiert werden"},
+ "BSF-Manager konnte nicht initialisiert werden"},
{ ER_CANNOT_CMPL_EXTENSN,
- "Erweiterung konnte nicht kompiliert werden"},
+ "Erweiterung konnte nicht kompiliert werden"},
{ ER_CANNOT_CREATE_EXTENSN,
"Erweiterung {0} konnte nicht erstellt werden; Grund: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"Wert f\u00FCr {0} sollte eine parsef\u00E4hige Zahl enthalten"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"attribute-set mit Namen {0} ist nicht vorhanden"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"Der Featurename darf nicht null in TransformerFactory.setFeature(Zeichenfolgenname, boolescher Wert) sein."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"Der Featurename darf nicht null in TransformerFactory.getFeature(Zeichenfolgenname) sein."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"Das Feature \"{0}\" kann nicht f\u00FCr diese TransformerFactory festgelegt werden."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "Verwendung des Erweiterungselements \"{0}\" ist nicht zul\u00E4ssig, wenn das Feature f\u00FCr die sichere Verarbeitung auf \"true\" gesetzt ist."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "Verwendung des Erweiterungselements \"{0}\" ist nicht zul\u00E4ssig, wenn das Feature f\u00FCr die sichere Verarbeitung auf \"true\" gesetzt ist."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"Pr\u00E4fix f\u00FCr Null-Namespace-URI kann nicht abgerufen werden."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"Namespace-URI f\u00FCr Nullpr\u00E4fix kann nicht abgerufen werden."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"Funktionsname darf nicht null sein."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"Anzahl von Argumenten darf nicht negativ sein."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_es.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Error: no puede haber'{' en la expresi\u00F3n"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} tiene un atributo no permitido: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"No se puede agregar {0} a {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode es nulo en handleApplyTemplatesInstruction"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} debe tener un atributo name."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} necesita el atributo: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} debe tener un atributo ''test''."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Valor err\u00F3neo en el atributo level: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"el nombre de instrucci\u00F3n de procesamiento no puede ser 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"Ten\u00EDa una excepci\u00F3n de E/S con el archivo de hoja de estilo: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) No se ha encontrado el atributo href para {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} se incluye directa o indirectamente."},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"\u00A1Error! No se ha encontrado la expresi\u00F3n de selecci\u00F3n xpath (-select)."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"No se puede serializar un procesador XSL."},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Fallo al procesar la hoja de estilo."},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"No se ha podido analizar el documento {0}."},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each debe tener un atributo name o match."},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"las plantillas deben tener un atributo name o match."},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"No hay ninguna declaraci\u00F3n xsl:key para {0}."},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Error. No se puede crear la URL para: {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions no est\u00E1 soportado"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"Error de TransformerFactory de XSLT"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} no permitido en una hoja de estilo."},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns ya no est\u00E1 soportado. Utilice xsl:output en su lugar."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space ya no est\u00E1 soportado. Utilice xsl:strip-space o xsl:preserve-space en su lugar."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} no est\u00E1 permitido en una plantilla."},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) prefijo {1} de espacio de nombres de extensi\u00F3n {0} desconocido"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Las importaciones s\u00F3lo se pueden realizar como los primeros elementos en la hoja de estilo."},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet no se ha realizado correctamente."},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"Excepci\u00F3n SAX"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funci\u00F3n no soportada."},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"El prefijo en exclude-result-prefixes no es v\u00E1lido: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"Falta el URI del espacio de nombres para el prefijo especificado"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"El nodo de entrada no puede ser nulo para un DOMSource de nuevas plantillas."},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "No se ha encontrado el archivo de clase para la opci\u00F3n {0}"},
+ "No se ha encontrado el archivo de clase para la opci\u00F3n {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "No se ha encontrado el elemento necesario: {0}"},
+ "No se ha encontrado el elemento necesario: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream no puede ser nulo"},
+ "InputStream no puede ser nulo"},
{ ER_URI_CANNOT_BE_NULL,
- "El URI no puede ser nulo"},
+ "El URI no puede ser nulo"},
{ ER_FILE_CANNOT_BE_NULL,
- "El archivo no puede ser nulo"},
+ "El archivo no puede ser nulo"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource no puede ser nulo"},
+ "InputSource no puede ser nulo"},
{ ER_CANNOT_INIT_BSFMGR,
- "No se ha podido inicializar el gestor de BSF"},
+ "No se ha podido inicializar el gestor de BSF"},
{ ER_CANNOT_CMPL_EXTENSN,
- "No se ha podido compilar la extensi\u00F3n"},
+ "No se ha podido compilar la extensi\u00F3n"},
{ ER_CANNOT_CREATE_EXTENSN,
"No se ha podido crear la extensi\u00F3n: {0} debido a: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"El valor para {0} no debe contener un n\u00FAmero que pueda analizarse"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"El juego de atributos con el nombre {0} no existe"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.setFeature (nombre de cadena, valor booleano)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"El nombre de funci\u00F3n no puede ser nulo en TransformerFactory.getFeature (nombre de cadena)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"No se puede definir la funci\u00F3n ''{0}''en esta f\u00E1brica del transformador."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "La utilizaci\u00F3n del elemento de extensi\u00F3n ''{0}'' no est\u00E1 permitida cuando la funci\u00F3n de procesamiento seguro se ha definido en true."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "La utilizaci\u00F3n del elemento de extensi\u00F3n ''{0}'' no est\u00E1 permitida cuando la funci\u00F3n de procesamiento seguro se ha definido en true."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"No se puede obtener el prefijo para un URI de espacio de nombres nulo."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"No se puede obtener el URI de espacio de nombres para un prefijo nulo."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"El nombre de la funci\u00F3n no puede ser nulo."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"El n\u00FAmero de argumentos no puede ser negativo."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_fr.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Erreur : l'expression ne peut pas contenir le caract\u00E8re '{'"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} a un attribut non admis : {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"Impossible d''ajouter {0} \u00E0 {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"La valeur de sourceNode est NULL dans handleApplyTemplatesInstruction."},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} doit avoir un attribut ''name''."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} exige l''attribut : {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} doit avoir un attribut ''test''."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Valeur incorrecte sur l''attribut de niveau : {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"Le nom de processing-instruction ne peut pas \u00EAtre 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"Exception d''E/S avec le fichier de feuille de style : {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) Attribut href introuvable pour {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} s''inclut directement ou indirectement lui-m\u00EAme."},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Erreur : expression de s\u00E9lection Xpath introuvable (-select)."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"Impossible de s\u00E9rialiser un processeur XSL."},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Echec du traitement de la feuille de style."},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"Impossible d''analyser le document {0}."},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"l'\u00E9l\u00E9ment for-each doit avoir un attribut de nom ou de correspondance"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"les mod\u00E8les doivent avoir un attribut de nom ou de correspondance"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"Il n''existe aucune d\u00E9claration xsl:key pour {0}."},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Erreur : impossible de cr\u00E9er l''URL pour : {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions n'est pas pris en charge"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"Erreur TransformerFactory XSLT"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} non autoris\u00E9 dans une feuille de style."},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"\u00E9l\u00E9ment result-ns plus pris en charge. Utilisez plut\u00F4t xsl:output."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"\u00E9l\u00E9ment default-space plus pris en charge. Utilisez plut\u00F4t xsl:strip-space ou xsl:preserve-space."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} n''est pas autoris\u00E9 dans un mod\u00E8le."},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) Pr\u00E9fixe {1} de l''espace de noms de l''extension {0} inconnu"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Les imports ne peuvent s'appliquer que sur les premiers \u00E9l\u00E9ments de la feuille de style."},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"Echec de processStylesheet."},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"Exception SAX"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Fonction non prise en charge."},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"Le pr\u00E9fixe de l''\u00E9l\u00E9ment exclude-result-prefixes n''est pas valide : {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"URI d'espace de noms manquant pour le pr\u00E9fixe sp\u00E9cifi\u00E9"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"Le noeud d'entr\u00E9e ne peut pas \u00EAtre NULL pour un \u00E9l\u00E9ment DOMSource de newTemplates."},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "Fichier de classe introuvable pour l''option {0}"},
+ "Fichier de classe introuvable pour l''option {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "El\u00E9ment obligatoire introuvable : {0}"},
+ "El\u00E9ment obligatoire introuvable : {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream ne peut pas \u00EAtre NULL"},
+ "InputStream ne peut pas \u00EAtre NULL"},
{ ER_URI_CANNOT_BE_NULL,
- "L'URI ne peut pas \u00EAtre NULL"},
+ "L'URI ne peut pas \u00EAtre NULL"},
{ ER_FILE_CANNOT_BE_NULL,
- "Le fichier ne peut pas \u00EAtre NULL"},
+ "Le fichier ne peut pas \u00EAtre NULL"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource ne peut pas \u00EAtre NULL"},
+ "InputSource ne peut pas \u00EAtre NULL"},
{ ER_CANNOT_INIT_BSFMGR,
- "Impossible d'initialiser le gestionnaire BSF"},
+ "Impossible d'initialiser le gestionnaire BSF"},
{ ER_CANNOT_CMPL_EXTENSN,
- "Impossible de compiler l'extension"},
+ "Impossible de compiler l'extension"},
{ ER_CANNOT_CREATE_EXTENSN,
"Impossible de cr\u00E9er l''extension {0}. Cause : {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"La valeur de {0} doit contenir un nombre pouvant \u00EAtre analys\u00E9"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"L''ensemble d''attributs nomm\u00E9 {0} n''existe pas"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.setFeature (cha\u00EEne pour le nom, valeur bool\u00E9enne)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"Le nom de la fonctionnalit\u00E9 ne peut pas \u00EAtre NULL dans TransformerFactory.getFeature (cha\u00EEne pour le nom)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"Impossible de d\u00E9finir la fonctionnalit\u00E9 ''{0}'' sur cette propri\u00E9t\u00E9 TransformerFactory."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "L''utilisation de l''\u00E9l\u00E9ment d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "L''utilisation de l''\u00E9l\u00E9ment d''extension ''{0}'' n''est pas autoris\u00E9e lorsque la fonctionnalit\u00E9 de traitement s\u00E9curis\u00E9 est d\u00E9finie sur True."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"Impossible d'obtenir le pr\u00E9fixe pour un URI d'espace de noms NULL."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"Impossible d'obtenir l'URI d'espace de noms pour le pr\u00E9fixe NULL."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"Le nom de fonction ne peut pas \u00EAtre NULL."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"Le nombre d'arguments ne peut pas \u00EAtre n\u00E9gatif."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_it.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Errore: '{' non pu\u00F2 esistere nell'espressione"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} ha un attributo non valido: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"Impossibile aggiungere {0} a {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode nullo in handleApplyTemplatesInstruction."},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} deve avere un attributo name."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} richiede l''attributo: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} deve avere un attributo \"test\"."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Valore non valido per l''attributo level: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"il nome processing-instruction non pu\u00F2 essere 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"Eccezione IO con il file foglio di stile: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) Impossibile trovare l''attributo href per {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} include s\u00E9 stesso direttamente o indirettamente."},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Errore. L'espressione di selezione dell'xpath (-select) non \u00E8 stata trovata."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"Impossibile serializzare un XSLProcessor."},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Elaborazione del foglio di stile non riuscita."},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"Impossibile analizzare il documento {0}"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each deve avere un attributo match o name"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"templates deve avere un attributo match o name"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"Nessuna dichiarazione xsl:key per {0}."},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Errore. Impossibile creare l''URL per {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions non supportato"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"Errore di TransformerFactory XSLT"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} non consentito in un foglio di stile."},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns non pi\u00F9 supportato. Utilizzare xsl:output."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space non pi\u00F9 supportato. Utilizzare xsl:strip-space o xsl:preserve-space."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} non consentito in un modello."},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) {0} prefisso spazio di nomi estensione {1} sconosciuto"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Le importazioni possono essere eseguite solo come primi elementi nel foglio di stile."},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet non riuscito."},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"Eccezione SAX"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funzione non supportata."},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"Il prefisso in exclude-result-prefixes non \u00E8 valido: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"URI dello spazio di nomi mancante per il prefisso specificato"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"Il nodo di input non pu\u00F2 essere nullo per un DOMSource per newTemplates."},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "File di classe non trovato per l''opzione {0}"},
+ "File di classe non trovato per l''opzione {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "Elemento richiesto non trovato: {0}"},
+ "Elemento richiesto non trovato: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream non pu\u00F2 essere nullo"},
+ "InputStream non pu\u00F2 essere nullo"},
{ ER_URI_CANNOT_BE_NULL,
- "L'URI non pu\u00F2 essere nullo"},
+ "L'URI non pu\u00F2 essere nullo"},
{ ER_FILE_CANNOT_BE_NULL,
- "Il file non pu\u00F2 essere nullo"},
+ "Il file non pu\u00F2 essere nullo"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource non pu\u00F2 essere nullo"},
+ "InputSource non pu\u00F2 essere nullo"},
{ ER_CANNOT_INIT_BSFMGR,
- "Impossibile inizializzare BSF Manager"},
+ "Impossibile inizializzare BSF Manager"},
{ ER_CANNOT_CMPL_EXTENSN,
- "Impossibile compilare l'estensione"},
+ "Impossibile compilare l'estensione"},
{ ER_CANNOT_CREATE_EXTENSN,
"Impossibile creare l''estensione {0}. Motivo: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"Il valore per {0} deve contenere un numero analizzabile"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"il set di attributi denominato {0} non esiste"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.setFeature (nome stringa, valore booleano)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"Il nome funzione non pu\u00F2 essere nullo in TransformerFactory.getFeature (nome stringa)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"Impossibile impostare la funzione ''{0}'' in questo TransformerFactory."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "Non \u00E8 consentito utilizzare l''elemento di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "Non \u00E8 consentito utilizzare l''elemento di estensione ''{0}'' se la funzione di elaborazione sicura \u00E8 impostata su true."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"Impossibile recuperare il prefisso per un URI di spazio di nomi nullo."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"Impossibile recuperare l'URI di spazio di nomi per un prefisso nullo."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"Il nome funzione non pu\u00F2 essere nullo."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"L'arity non pu\u00F2 essere negativa."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ja.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"\u30A8\u30E9\u30FC: \u5F0F\u5185\u306B'{'\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0}\u306B\u4E0D\u6B63\u306A\u5C5E\u6027\u304C\u3042\u308A\u307E\u3059: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"{0}\u3092{1}\u306B\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode\u306FhandleApplyTemplatesInstruction\u5185\u3067null\u3067\u3059\u3002"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0}\u306B\u306Fname\u5C5E\u6027\u304C\u5FC5\u8981\u3067\u3059\u3002"},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0}\u306F\u5C5E\u6027{1}\u304C\u5FC5\u8981\u3067\u3059"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0}\u306F''test''\u5C5E\u6027\u3092\u6301\u3064\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002"},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"level\u5C5E\u6027\u306E\u5024\u304C\u4E0D\u6B63\u3067\u3059: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction\u540D\u306F'xml'\u306B\u3067\u304D\u307E\u305B\u3093"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u30FB\u30D5\u30A1\u30A4\u30EB\u306B\u5165\u51FA\u529B\u4F8B\u5916\u304C\u3042\u308A\u307E\u3059: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) {0}\u306Ehref\u5C5E\u6027\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0}\u306F\u305D\u308C\u81EA\u4F53\u3092\u76F4\u63A5\u7684\u307E\u305F\u306F\u9593\u63A5\u7684\u306B\u542B\u3093\u3067\u3044\u307E\u3059\u3002"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"\u30A8\u30E9\u30FC\u3002xpath\u9078\u629E\u5F0F(-select)\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"XSLProcessor\u3092\u30B7\u30EA\u30A2\u30E9\u30A4\u30BA\u3067\u304D\u307E\u305B\u3093\u3002"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u306E\u51E6\u7406\u306B\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"{0}\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u89E3\u6790\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each\u306Fmatch\u307E\u305F\u306Fname\u5C5E\u6027\u3092\u6301\u3064\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u306Fmatch\u307E\u305F\u306Fname\u5C5E\u6027\u3092\u6301\u3064\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"{0}\u306Exsl:key\u5BA3\u8A00\u304C\u3042\u308A\u307E\u305B\u3093\u3002"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"\u30A8\u30E9\u30FC\u3002{0}\u306EURL\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory\u30A8\u30E9\u30FC"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0}\u306F\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u5185\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns\u306F\u73FE\u5728\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u304B\u308F\u308A\u306Bxsl:output\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space\u306F\u73FE\u5728\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u304B\u308F\u308A\u306Bxsl:strip-space\u307E\u305F\u306Fxsl:preserve-space\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002"},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0}\u306F\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u5185\u3067\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) \u4E0D\u660E\u306A{0}\u62E1\u5F35\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9\u306E\u63A5\u982D\u8F9E{1}\u3067\u3059"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) \u30A4\u30F3\u30DD\u30FC\u30C8\u306F\u30B9\u30BF\u30A4\u30EB\u30B7\u30FC\u30C8\u306E\u6700\u521D\u306E\u8981\u7D20\u3068\u3057\u3066\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet\u306F\u5931\u6557\u3057\u307E\u3057\u305F\u3002"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX\u4F8B\u5916"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u95A2\u6570\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"exclude-result-prefixes\u306E\u63A5\u982D\u8F9E\u304C\u7121\u52B9\u3067\u3059: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"\u6307\u5B9A\u3057\u305F\u63A5\u982D\u8F9E\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u304C\u3042\u308A\u307E\u305B\u3093"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"newTemplates\u306EDOMSource\u306B\u3064\u3044\u3066\u5165\u529B\u30CE\u30FC\u30C9\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u3064\u3044\u3066\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
+ "\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u3064\u3044\u3066\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "\u5FC5\u9808\u8981\u7D20\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}"},
+ "\u5FC5\u9808\u8981\u7D20\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
+ "InputStream\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
{ ER_URI_CANNOT_BE_NULL,
- "URI\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
+ "URI\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
{ ER_FILE_CANNOT_BE_NULL,
- "\u30D5\u30A1\u30A4\u30EB\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
+ "\u30D5\u30A1\u30A4\u30EB\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
+ "InputSource\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
{ ER_CANNOT_INIT_BSFMGR,
- "BSF\u30DE\u30CD\u30FC\u30B8\u30E3\u3092\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"},
+ "BSF\u30DE\u30CD\u30FC\u30B8\u30E3\u3092\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"},
{ ER_CANNOT_CMPL_EXTENSN,
- "\u62E1\u5F35\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"},
+ "\u62E1\u5F35\u3092\u30B3\u30F3\u30D1\u30A4\u30EB\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"},
{ ER_CANNOT_CREATE_EXTENSN,
"{1}\u304C\u539F\u56E0\u3067\u62E1\u5F35{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"{0}\u306E\u5024\u306B\u306F\u89E3\u6790\u53EF\u80FD\u306A\u6570\u5024\u304C\u542B\u307E\u308C\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"{0}\u3068\u3044\u3046\u540D\u524D\u306Eattribute-set\u306F\u5B58\u5728\u3057\u307E\u305B\u3093"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"\u6A5F\u80FD\u540D\u306FTransformerFactory.setFeature(String name, boolean value)\u5185\u3067null\u306B\u3067\u304D\u307E\u305B\u3093\u3002"},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"\u6A5F\u80FD\u540D\u306FTransformerFactory.getFeature(String name)\u5185\u3067null\u306B\u3067\u304D\u307E\u305B\u3093\u3002"},
-
+
{ ER_UNSUPPORTED_FEATURE,
"\u6A5F\u80FD''{0}''\u3092\u3053\u306ETransformerFactory\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093\u3002"},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "\u30BB\u30AD\u30E5\u30A2\u51E6\u7406\u6A5F\u80FD\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u3001\u62E1\u5F35\u8981\u7D20''{0}''\u306E\u4F7F\u7528\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002"},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "\u30BB\u30AD\u30E5\u30A2\u51E6\u7406\u6A5F\u80FD\u304Ctrue\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u308B\u3068\u304D\u3001\u62E1\u5F35\u8981\u7D20''{0}''\u306E\u4F7F\u7528\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093\u3002"},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"null\u306E\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u306B\u3064\u3044\u3066\u63A5\u982D\u8F9E\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002"},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"null\u306E\u63A5\u982D\u8F9E\u306B\u3064\u3044\u3066\u30CD\u30FC\u30E0\u30B9\u30DA\u30FC\u30B9URI\u3092\u53D6\u5F97\u3067\u304D\u307E\u305B\u3093\u3002"},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"\u6A5F\u80FD\u540D\u3092null\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002"},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"arity\u3092\u8CA0\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002"},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_ko.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"\uC624\uB958: \uD45C\uD604\uC2DD\uC5D0\uB294 '{'\uAC00 \uD3EC\uD568\uB420 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0}\uC5D0 \uC798\uBABB\uB41C \uC18D\uC131\uC774 \uC788\uC74C: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"{1}\uC5D0 {0}\uC744(\uB97C) \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"handleApplyTemplatesInstruction\uC758 sourceNode\uAC00 \uB110\uC785\uB2C8\uB2E4!"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0}\uC5D0\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0}\uC5D0 \uC18D\uC131\uC774 \uD544\uC694\uD568: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0}\uC5D0\uB294 ''test'' \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"level \uC18D\uC131\uC5D0 \uC798\uBABB\uB41C \uAC12\uC774 \uC788\uC74C: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction \uC774\uB984\uC740 'xml'\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uD30C\uC77C\uC5D0 IO \uC608\uC678 \uC0AC\uD56D \uBC1C\uC0DD: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) {0}\uC5D0 \uB300\uD55C href \uC18D\uC131\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0}\uC5D0 \uC9C1\uC811 \uB610\uB294 \uAC04\uC811\uC801\uC73C\uB85C \uC790\uC2E0\uC774 \uD3EC\uD568\uB418\uC5B4 \uC788\uC2B5\uB2C8\uB2E4!"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"\uC624\uB958: xpath select \uD45C\uD604\uC2DD(-select)\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"XSLProcessor\uB97C \uC9C1\uB82C\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"\uC2A4\uD0C0\uC77C\uC2DC\uD2B8 \uCC98\uB9AC\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4!"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"{0} \uBB38\uC11C\uC758 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each\uC5D0\uB294 match \uB610\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"templates\uC5D0\uB294 match \uB610\uB294 name \uC18D\uC131\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"{0}\uC5D0 \uB300\uD55C xsl:key \uC120\uC5B8\uC774 \uC5C6\uC2B5\uB2C8\uB2E4!"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"\uC624\uB958: {0}\uC5D0 \uB300\uD55C URL\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions\uB294 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory \uC624\uB958"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC5D0\uC11C\uB294 {0}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC2E0 xsl:output\uC744 \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space\uB294 \uB354 \uC774\uC0C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4! \uB300\uC2E0 xsl:strip-space \uB610\uB294 xsl:preserve-space\uB97C \uC0AC\uC6A9\uD558\uC2ED\uC2DC\uC624."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) \uD15C\uD50C\uB9AC\uD2B8\uC5D0\uC11C\uB294 {0}\uC774(\uAC00) \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) {0} \uD655\uC7A5 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 \uC811\uB450\uC5B4 {1}\uC744(\uB97C) \uC54C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) \uC2A4\uD0C0\uC77C\uC2DC\uD2B8\uC758 \uCCAB\uBC88\uC9F8 \uC694\uC18C\uB85C\uB9CC \uC784\uD3EC\uD2B8\uB97C \uC218\uD589\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4!"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet\uB97C \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4!"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX \uC608\uC678 \uC0AC\uD56D"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"\uD568\uC218\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"exclude-result-prefixes\uC758 \uC811\uB450\uC5B4\uAC00 \uBD80\uC801\uD569\uD568: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"\uC9C0\uC815\uB41C \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uAC00 \uB204\uB77D\uB418\uC5C8\uC2B5\uB2C8\uB2E4."},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"newTemplates\uC758 DOMSource\uC5D0 \uB300\uD55C \uC785\uB825 \uB178\uB4DC\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4!"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "{0} \uC635\uC158\uC5D0 \uB300\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "{0} \uC635\uC158\uC5D0 \uB300\uD55C \uD074\uB798\uC2A4 \uD30C\uC77C\uC744 \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "\uD544\uC218 \uC694\uC18C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"},
+ "\uD544\uC218 \uC694\uC18C\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "InputStream\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_URI_CANNOT_BE_NULL,
- "URI\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "URI\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_FILE_CANNOT_BE_NULL,
- "\uD30C\uC77C\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "\uD30C\uC77C\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "InputSource\uB294 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_CANNOT_INIT_BSFMGR,
- "BSF \uAD00\uB9AC\uC790\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "BSF \uAD00\uB9AC\uC790\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_CANNOT_CMPL_EXTENSN,
- "\uD655\uC7A5\uC744 \uCEF4\uD30C\uC77C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+ "\uD655\uC7A5\uC744 \uCEF4\uD30C\uC77C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_CANNOT_CREATE_EXTENSN,
"{0} \uD655\uC7A5\uC744 \uC0DD\uC131\uD560 \uC218 \uC5C6\uB294 \uC6D0\uC778: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"{0}\uC5D0 \uB300\uD55C \uAC12\uC5D0\uB294 \uAD6C\uBB38\uC744 \uBD84\uC11D\uD560 \uC218 \uC788\uB294 \uC22B\uC790\uAC00 \uD3EC\uD568\uB418\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"\uC774\uB984\uC774 {0}\uC778 attribute-set\uAC00 \uC874\uC7AC\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.setFeature(\uBB38\uC790\uC5F4 \uC774\uB984, \uBD80\uC6B8 \uAC12)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"\uAE30\uB2A5 \uC774\uB984\uC740 TransformerFactory.getFeature(\uBB38\uC790\uC5F4 \uC774\uB984)\uC5D0\uC11C \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"\uC774 TransformerFactory\uC5D0\uC11C ''{0}'' \uAE30\uB2A5\uC744 \uC124\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uC694\uC18C ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "\uBCF4\uC548 \uCC98\uB9AC \uAE30\uB2A5\uC774 true\uB85C \uC124\uC815\uB41C \uACBD\uC6B0 \uD655\uC7A5 \uC694\uC18C ''{0}''\uC744(\uB97C) \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"\uB110 \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uC5D0 \uB300\uD55C \uC811\uB450\uC5B4\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"\uB110 \uC811\uB450\uC5B4\uC5D0 \uB300\uD55C \uB124\uC784\uC2A4\uD398\uC774\uC2A4 URI\uB97C \uAC00\uC838\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"\uD568\uC218 \uC774\uB984\uC740 \uB110\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"\uC778\uC790 \uC218\uB294 \uC74C\uC218\uC77C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_pt_BR.java Wed May 02 13:32:36 2012 +0100
@@ -32,7 +32,7 @@
* 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 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
@@ -79,20 +79,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -100,16 +100,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -118,274 +118,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -399,69 +399,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -477,10 +477,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Erro: N\u00E3o \u00E9 poss\u00EDvel utilizar ''{'' na express\u00E3o"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} tem um atributo inv\u00E1lido: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -489,10 +489,10 @@
{ER_CANNOT_ADD,
"N\u00E3o \u00E9 poss\u00EDvel adicionar {0} a {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode \u00E9 nulo em handleApplyTemplatesInstruction!"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} deve ter um atributo de nome."},
{ER_TEMPLATE_NOT_FOUND,
@@ -504,13 +504,13 @@
{ER_REQUIRES_ATTRIB,
"{0} requer o atributo: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} deve ter um atributo ''test''."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Valor inv\u00E1lido no atributo de n\u00EDvel: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"o nome da instru\u00E7\u00E3o de processamento n\u00E3o pode ser 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -588,10 +588,10 @@
{ ER_IOEXCEPTION,
"Exce\u00E7\u00E3o de E/S com o arquivo de folha de estilos: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) N\u00E3o foi poss\u00EDvel encontrar o atributo href para {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) A folha de estilos {0} est\u00E1 incluindo a si mesma direta ou indiretamente!"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -615,7 +615,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Erro! N\u00E3o foi poss\u00EDvel localizar a express\u00E3o de sele\u00E7\u00E3o xpath (-select)."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"N\u00E3o \u00E9 poss\u00EDvel serializar um XSLProcessor!"},
{ ER_NO_INPUT_STYLESHEET,
@@ -624,7 +624,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Falha ao processar a folha de estilos!"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"N\u00E3o foi poss\u00EDvel fazer parse do documento {0}!"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -636,7 +636,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each deve ter um atributo de correspond\u00EAncia ou de nome"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"os modelos devem ter um atributo de correspond\u00EAncia ou de nome"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -651,22 +651,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"N\u00E3o h\u00E1 uma declara\u00E7\u00E3o de xsl:key para {0}!"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Erro! N\u00E3o \u00E9 poss\u00EDvel criar o url para: {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions n\u00E3o \u00E9 suportado"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"Erro de TransformerFactory XSLT"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} n\u00E3o \u00E9 permitido em uma folha de estilos!"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns n\u00E3o \u00E9 mais suportado! Em vez disso, use xsl:output."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space n\u00E3o \u00E9 mais suportado! Em vez disso, use xsl:strip-space ou xsl:preserve-space."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -696,10 +696,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} n\u00E3o \u00E9 permitido em um modelo!"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) prefixo {1} de namespace da extens\u00E3o de {0} desconhecido"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) As importa\u00E7\u00F5es s\u00F3 podem ocorrer como os primeiros elementos na folha de estilos!"},
{ ER_IMPORTING_ITSELF,
@@ -711,11 +711,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet malsucedido!"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"Exce\u00E7\u00E3o de SAX"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Fun\u00E7\u00E3o n\u00E3o suportada!"},
{ ER_XSLT_ERROR,
@@ -739,7 +739,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"O prefixo em exclude-result-prefixes n\u00E3o \u00E9 v\u00E1lido: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"URI do namespace n\u00E3o encontrado para o prefixo especificado"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -803,28 +803,28 @@
"O n\u00F3 de entrada n\u00E3o pode ser nulo para um DOMSource para newTemplates!"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "O arquivo de classe n\u00E3o foi encontrado para a op\u00E7\u00E3o {0}"},
+ "O arquivo de classe n\u00E3o foi encontrado para a op\u00E7\u00E3o {0}"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "Elemento Obrigat\u00F3rio n\u00E3o encontrado: {0}"},
+ "Elemento Obrigat\u00F3rio n\u00E3o encontrado: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream n\u00E3o pode ser nulo"},
+ "InputStream n\u00E3o pode ser nulo"},
{ ER_URI_CANNOT_BE_NULL,
- "O URI n\u00E3o pode ser nulo"},
+ "O URI n\u00E3o pode ser nulo"},
{ ER_FILE_CANNOT_BE_NULL,
- "O arquivo n\u00E3o pode ser nulo"},
+ "O arquivo n\u00E3o pode ser nulo"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource n\u00E3o pode ser nulo"},
+ "InputSource n\u00E3o pode ser nulo"},
{ ER_CANNOT_INIT_BSFMGR,
- "N\u00E3o foi poss\u00EDvel inicializar o Gerenciador de BSF"},
+ "N\u00E3o foi poss\u00EDvel inicializar o Gerenciador de BSF"},
{ ER_CANNOT_CMPL_EXTENSN,
- "N\u00E3o foi poss\u00EDvel compilar a extens\u00E3o"},
+ "N\u00E3o foi poss\u00EDvel compilar a extens\u00E3o"},
{ ER_CANNOT_CREATE_EXTENSN,
"N\u00E3o foi poss\u00EDvel criar a extens\u00E3o: {0} em decorr\u00EAncia de: {1}"},
@@ -961,7 +961,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"O valor para {0} deve conter um n\u00FAmero pass\u00EDvel de parse"},
@@ -1162,7 +1162,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"o conjunto de atributos com o nome {0} n\u00E3o existe"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1188,26 +1188,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.setFeature(Nome da string, valor booliano)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"O nome do recurso n\u00E3o pode ser nulo em TransformerFactory.getFeature(Nome da string)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"N\u00E3o \u00E9 poss\u00EDvel definir o recurso ''{0}'' nesta TransformerFactory."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "O uso do elemento da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "O uso do elemento da extens\u00E3o ''{0}'' n\u00E3o ser\u00E1 permitido quando o recurso de processamento seguro for definido como verdadeiro."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"N\u00E3o \u00E9 poss\u00EDvel obter o prefixo de um uri de namespace nulo."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"N\u00E3o \u00E9 poss\u00EDvel obter o uri do namespace do prefixo nulo."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"O nome da fun\u00E7\u00E3o n\u00E3o pode ser nulo."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"A aridade n\u00E3o pode ser negativa."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_sv.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"Fel: Uttryck kan inte inneh\u00E5lla '{'"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} har ett otill\u00E5tet attribut: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"Kan inte addera {0} till {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode \u00E4r null i handleApplyTemplatesInstruction!"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} m\u00E5ste ha ett namnattribut."},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} kr\u00E4ver attribut: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} m\u00E5ste ha ett ''test''-attribut."},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"Felaktigt v\u00E4rde i niv\u00E5attribut: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"Namn p\u00E5 processing-instruction kan inte vara 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"Fick IO-undantag med formatmallfil: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) Kunde inte hitta href-attribut f\u00F6r {0}"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} inkluderar, direkt eller indirekt, sig sj\u00E4lv!"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"Fel! Hittade inte xpath select-uttryck (-select)."},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"Kan inte serialisera en XSLProcessor!"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"Kunde inte behandla formatmall!"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"Kunde inte tolka dokumentet {0}!"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each kr\u00E4ver antingen en matchning eller ett namnattribut"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"templates kr\u00E4ver antingen en matchning eller ett namnattribut"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"Det finns ingen xsl:key-deklaration f\u00F6r {0}!"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"Fel! Kan inte skapa URL f\u00F6r: {0}"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"xsl:functions st\u00F6ds inte"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory-fel"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) {0} \u00E4r inte till\u00E5ten inne i en formatmall!"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"result-ns st\u00F6ds inte l\u00E4ngre! Anv\u00E4nd xsl:output ist\u00E4llet."},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"default-space st\u00F6ds inte l\u00E4ngre! Anv\u00E4nd xsl:strip-space eller xsl:preserve-space ist\u00E4llet."},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) {0} \u00E4r inte till\u00E5ten inne i en mall!"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) ok\u00E4nt namnrymdsprefix {1} f\u00F6r till\u00E4gg {0}"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) Imports kan endast f\u00F6rekomma som de f\u00F6rsta elementen i formatmallen!"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet utf\u00F6rdes inte!"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX-undantag"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funktionen st\u00F6ds inte!"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"Prefix i exclude-result-prefixes \u00E4r inte giltigt: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"Namnrymds-URI saknas f\u00F6r angivna prefix"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"Indatanoden till en DOMSource f\u00F6r newTemplates f\u00E5r inte vara null!"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "Klassfil f\u00F6r alternativ {0} saknas"},
+ "Klassfil f\u00F6r alternativ {0} saknas"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "Obligatoriska element hittades inte: {0}"},
+ "Obligatoriska element hittades inte: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream kan inte vara null"},
+ "InputStream kan inte vara null"},
{ ER_URI_CANNOT_BE_NULL,
- "URI kan inte vara null"},
+ "URI kan inte vara null"},
{ ER_FILE_CANNOT_BE_NULL,
- "Fil kan inte vara null"},
+ "Fil kan inte vara null"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource kan inte vara null"},
+ "InputSource kan inte vara null"},
{ ER_CANNOT_INIT_BSFMGR,
- "Kunde inte initiera BSF Manager"},
+ "Kunde inte initiera BSF Manager"},
{ ER_CANNOT_CMPL_EXTENSN,
- "Kunde inte kompilera till\u00E4gg"},
+ "Kunde inte kompilera till\u00E4gg"},
{ ER_CANNOT_CREATE_EXTENSN,
"Kunde inte skapa till\u00E4gg: {0} p\u00E5 grund av: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"V\u00E4rdet f\u00F6r {0} b\u00F6r inneh\u00E5lla ett tal som kan tolkas"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"attributserien {0} finns inte"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"Funktionsnamnet kan inte vara null i TransformerFactory.setFeature(namn p\u00E5 str\u00E4ng, booleskt v\u00E4rde)."},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"Funktionsnamnet kan inte vara null i TransformerFactory.getFeature(namn p\u00E5 str\u00E4ng)."},
-
+
{ ER_UNSUPPORTED_FEATURE,
"Kan inte st\u00E4lla in funktionen ''{0}'' i denna TransformerFactory."},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "Anv\u00E4ndning av till\u00E4ggselementet ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "Anv\u00E4ndning av till\u00E4ggselementet ''{0}'' \u00E4r inte till\u00E5tet n\u00E4r s\u00E4ker bearbetning till\u00E4mpas."},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"Kan inte h\u00E4mta prefix f\u00F6r namnrymds-uri som \u00E4r null."},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"Kan inte h\u00E4mta namnrymds-uri f\u00F6r prefix som \u00E4r null."},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"Funktionsnamn f\u00E5r inte vara null."},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"Ariteten kan inte vara negativ."},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_CN.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"\u9519\u8BEF: \u8868\u8FBE\u5F0F\u4E2D\u4E0D\u80FD\u5305\u542B '{'"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0}\u5177\u6709\u975E\u6CD5\u5C5E\u6027: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"\u65E0\u6CD5\u5411{1}\u6DFB\u52A0{0}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode \u5728 handleApplyTemplatesInstruction \u4E2D\u4E3A\u7A7A\u503C!"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0}\u5FC5\u987B\u5177\u6709 name \u5C5E\u6027\u3002"},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0}\u9700\u8981\u5C5E\u6027: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0}\u5FC5\u987B\u5177\u6709 ''test'' \u5C5E\u6027\u3002"},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"level \u5C5E\u6027\u7684\u503C\u9519\u8BEF: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction \u540D\u79F0\u4E0D\u80FD\u4E3A 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"\u6837\u5F0F\u8868\u6587\u4EF6\u51FA\u73B0 IO \u5F02\u5E38\u9519\u8BEF: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) \u627E\u4E0D\u5230{0}\u7684 href \u5C5E\u6027"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0}\u76F4\u63A5\u6216\u95F4\u63A5\u5305\u542B\u5176\u81EA\u8EAB!"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"\u9519\u8BEF! \u627E\u4E0D\u5230 xpath \u9009\u62E9\u8868\u8FBE\u5F0F (-select)\u3002"},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"\u65E0\u6CD5\u5E8F\u5217\u5316 XSLProcessor!"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"\u65E0\u6CD5\u5904\u7406\u6837\u5F0F\u8868!"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"\u65E0\u6CD5\u5BF9{0}\u6587\u6863\u8FDB\u884C\u8BED\u6CD5\u5206\u6790!"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each \u5FC5\u987B\u5177\u6709 match \u6216 name \u5C5E\u6027"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"templates \u5FC5\u987B\u5177\u6709 match \u6216 name \u5C5E\u6027"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"{0}\u6CA1\u6709 xsl:key \u58F0\u660E!"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"\u9519\u8BEF! \u65E0\u6CD5\u4E3A{0}\u521B\u5EFA url"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"\u4E0D\u652F\u6301 xsl:functions"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory \u9519\u8BEF"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) \u6837\u5F0F\u8868\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528{0}!"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u6301 result-ns! \u8BF7\u6539\u7528 xsl:output\u3002"},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u6301 default-space! \u8BF7\u6539\u7528 xsl:strip-space \u6216 xsl:preserve-space\u3002"},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) \u6A21\u677F\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528{0}!"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) {0}\u6269\u5C55\u540D\u79F0\u7A7A\u95F4\u524D\u7F00 {1} \u672A\u77E5"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) \u53EA\u80FD\u4F5C\u4E3A\u6837\u5F0F\u8868\u4E2D\u7684\u7B2C\u4E00\u4E2A\u5143\u7D20\u5BFC\u5165!"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet \u5931\u8D25!"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX \u5F02\u5E38\u9519\u8BEF"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u4E0D\u652F\u6301\u8BE5\u51FD\u6570!"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"exclude-result-prefixes \u4E2D\u7684\u524D\u7F00\u65E0\u6548: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"\u6307\u5B9A\u524D\u7F00\u7F3A\u5C11\u540D\u79F0\u7A7A\u95F4 URI"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"\u5BF9\u4E8E newTemplates \u7684 DOMSource, \u8F93\u5165\u8282\u70B9\u4E0D\u80FD\u4E3A\u7A7A\u503C!"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "\u627E\u4E0D\u5230\u9009\u9879{0}\u7684\u7C7B\u6587\u4EF6"},
+ "\u627E\u4E0D\u5230\u9009\u9879{0}\u7684\u7C7B\u6587\u4EF6"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "\u627E\u4E0D\u5230\u6240\u9700\u5143\u7D20: {0}"},
+ "\u627E\u4E0D\u5230\u6240\u9700\u5143\u7D20: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
+ "InputStream \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
{ ER_URI_CANNOT_BE_NULL,
- "URI \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
+ "URI \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
{ ER_FILE_CANNOT_BE_NULL,
- "File \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
+ "File \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
+ "InputSource \u4E0D\u80FD\u4E3A\u7A7A\u503C"},
{ ER_CANNOT_INIT_BSFMGR,
- "\u65E0\u6CD5\u521D\u59CB\u5316 BSF \u7BA1\u7406\u5668"},
+ "\u65E0\u6CD5\u521D\u59CB\u5316 BSF \u7BA1\u7406\u5668"},
{ ER_CANNOT_CMPL_EXTENSN,
- "\u65E0\u6CD5\u7F16\u8BD1\u6269\u5C55"},
+ "\u65E0\u6CD5\u7F16\u8BD1\u6269\u5C55"},
{ ER_CANNOT_CREATE_EXTENSN,
"\u65E0\u6CD5\u521B\u5EFA\u6269\u5C55: {0}, \u539F\u56E0: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"{0}\u7684\u503C\u5E94\u5305\u542B\u53EF\u8BED\u6CD5\u5206\u6790\u7684\u6570\u5B57"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"\u540D\u4E3A{0}\u7684\u5C5E\u6027\u96C6\u4E0D\u5B58\u5728"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"TransformerFactory.setFeature(String name, boolean value) \u4E2D\u7684\u529F\u80FD\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002"},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"TransformerFactory.getFeature(String name) \u4E2D\u7684\u529F\u80FD\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002"},
-
+
{ ER_UNSUPPORTED_FEATURE,
"\u65E0\u6CD5\u5BF9\u6B64 TransformerFactory \u8BBE\u7F6E\u529F\u80FD ''{0}''\u3002"},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "\u5F53\u5B89\u5168\u5904\u7406\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D\u65F6, \u4E0D\u5141\u8BB8\u4F7F\u7528\u6269\u5C55\u5143\u7D20 ''{0}''\u3002"},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "\u5F53\u5B89\u5168\u5904\u7406\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u771F\u201D\u65F6, \u4E0D\u5141\u8BB8\u4F7F\u7528\u6269\u5C55\u5143\u7D20 ''{0}''\u3002"},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"\u65E0\u6CD5\u83B7\u53D6\u7A7A\u540D\u79F0\u7A7A\u95F4 uri \u7684\u524D\u7F00\u3002"},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"\u65E0\u6CD5\u83B7\u53D6\u7A7A\u524D\u7F00\u7684\u540D\u79F0\u7A7A\u95F4 uri\u3002"},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"\u51FD\u6570\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u503C\u3002"},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"\u5143\u6570\u4E0D\u80FD\u4E3A\u8D1F\u6570\u3002"},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/res/XSLTErrorResources_zh_TW.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
* 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 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
@@ -78,20 +78,20 @@
*
*/
- /*
+ /*
* Static variables
*/
- public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
- "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
-
+ public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX =
+ "ER_INVALID_SET_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX";
+
public static final String ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT =
- "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
-
+ "ER_INVALID_NAMESPACE_URI_VALUE_FOR_RESULT_PREFIX_FOR_DEFAULT";
+
public static final String ER_NO_CURLYBRACE = "ER_NO_CURLYBRACE";
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIBUTE = "ER_ILLEGAL_ATTRIBUTE";
public static final String ER_NULL_SOURCENODE_APPLYIMPORTS = "ER_NULL_SOURCENODE_APPLYIMPORTS";
- public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
+ public static final String ER_CANNOT_ADD = "ER_CANNOT_ADD";
public static final String ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES="ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES";
public static final String ER_NO_NAME_ATTRIB = "ER_NO_NAME_ATTRIB";
public static final String ER_TEMPLATE_NOT_FOUND = "ER_TEMPLATE_NOT_FOUND";
@@ -99,16 +99,16 @@
public static final String ER_REQUIRES_ATTRIB = "ER_REQUIRES_ATTRIB";
public static final String ER_MUST_HAVE_TEST_ATTRIB = "ER_MUST_HAVE_TEST_ATTRIB";
public static final String ER_BAD_VAL_ON_LEVEL_ATTRIB =
- "ER_BAD_VAL_ON_LEVEL_ATTRIB";
+ "ER_BAD_VAL_ON_LEVEL_ATTRIB";
public static final String ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ "ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
public static final String ER_NEED_MATCH_ATTRIB = "ER_NEED_MATCH_ATTRIB";
- public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
- "ER_NEED_NAME_OR_MATCH_ATTRIB";
+ public static final String ER_NEED_NAME_OR_MATCH_ATTRIB =
+ "ER_NEED_NAME_OR_MATCH_ATTRIB";
public static final String ER_CANT_RESOLVE_NSPREFIX =
- "ER_CANT_RESOLVE_NSPREFIX";
+ "ER_CANT_RESOLVE_NSPREFIX";
public static final String ER_ILLEGAL_VALUE = "ER_ILLEGAL_VALUE";
public static final String ER_NO_OWNERDOC = "ER_NO_OWNERDOC";
public static final String ER_ELEMTEMPLATEELEM_ERR ="ER_ELEMTEMPLATEELEM_ERR";
@@ -117,274 +117,274 @@
public static final String ER_NEED_TEST_ATTRIB = "ER_NEED_TEST_ATTRIB";
public static final String ER_NEED_NAME_ATTRIB = "ER_NEED_NAME_ATTRIB";
public static final String ER_NO_CONTEXT_OWNERDOC = "ER_NO_CONTEXT_OWNERDOC";
- public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
- "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
- public static final String ER_PROCESS_NOT_SUCCESSFUL =
- "ER_PROCESS_NOT_SUCCESSFUL";
+ public static final String ER_COULD_NOT_CREATE_XML_PROC_LIAISON =
+ "ER_COULD_NOT_CREATE_XML_PROC_LIAISON";
+ public static final String ER_PROCESS_NOT_SUCCESSFUL =
+ "ER_PROCESS_NOT_SUCCESSFUL";
public static final String ER_NOT_SUCCESSFUL = "ER_NOT_SUCCESSFUL";
- public static final String ER_ENCODING_NOT_SUPPORTED =
- "ER_ENCODING_NOT_SUPPORTED";
- public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
- "ER_COULD_NOT_CREATE_TRACELISTENER";
- public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
- "ER_KEY_REQUIRES_NAME_ATTRIB";
- public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
- "ER_KEY_REQUIRES_MATCH_ATTRIB";
- public static final String ER_KEY_REQUIRES_USE_ATTRIB =
- "ER_KEY_REQUIRES_USE_ATTRIB";
- public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
- "ER_REQUIRES_ELEMENTS_ATTRIB";
- public static final String ER_MISSING_PREFIX_ATTRIB =
- "ER_MISSING_PREFIX_ATTRIB";
+ public static final String ER_ENCODING_NOT_SUPPORTED =
+ "ER_ENCODING_NOT_SUPPORTED";
+ public static final String ER_COULD_NOT_CREATE_TRACELISTENER =
+ "ER_COULD_NOT_CREATE_TRACELISTENER";
+ public static final String ER_KEY_REQUIRES_NAME_ATTRIB =
+ "ER_KEY_REQUIRES_NAME_ATTRIB";
+ public static final String ER_KEY_REQUIRES_MATCH_ATTRIB =
+ "ER_KEY_REQUIRES_MATCH_ATTRIB";
+ public static final String ER_KEY_REQUIRES_USE_ATTRIB =
+ "ER_KEY_REQUIRES_USE_ATTRIB";
+ public static final String ER_REQUIRES_ELEMENTS_ATTRIB =
+ "ER_REQUIRES_ELEMENTS_ATTRIB";
+ public static final String ER_MISSING_PREFIX_ATTRIB =
+ "ER_MISSING_PREFIX_ATTRIB";
public static final String ER_BAD_STYLESHEET_URL = "ER_BAD_STYLESHEET_URL";
public static final String ER_FILE_NOT_FOUND = "ER_FILE_NOT_FOUND";
public static final String ER_IOEXCEPTION = "ER_IOEXCEPTION";
public static final String ER_NO_HREF_ATTRIB = "ER_NO_HREF_ATTRIB";
- public static final String ER_STYLESHEET_INCLUDES_ITSELF =
- "ER_STYLESHEET_INCLUDES_ITSELF";
+ public static final String ER_STYLESHEET_INCLUDES_ITSELF =
+ "ER_STYLESHEET_INCLUDES_ITSELF";
public static final String ER_PROCESSINCLUDE_ERROR ="ER_PROCESSINCLUDE_ERROR";
public static final String ER_MISSING_LANG_ATTRIB = "ER_MISSING_LANG_ATTRIB";
- public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
- "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
- public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
- "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
+ public static final String ER_MISSING_CONTAINER_ELEMENT_COMPONENT =
+ "ER_MISSING_CONTAINER_ELEMENT_COMPONENT";
+ public static final String ER_CAN_ONLY_OUTPUT_TO_ELEMENT =
+ "ER_CAN_ONLY_OUTPUT_TO_ELEMENT";
public static final String ER_PROCESS_ERROR = "ER_PROCESS_ERROR";
public static final String ER_UNIMPLNODE_ERROR = "ER_UNIMPLNODE_ERROR";
public static final String ER_NO_SELECT_EXPRESSION ="ER_NO_SELECT_EXPRESSION";
- public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
- "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
+ public static final String ER_CANNOT_SERIALIZE_XSLPROCESSOR =
+ "ER_CANNOT_SERIALIZE_XSLPROCESSOR";
public static final String ER_NO_INPUT_STYLESHEET = "ER_NO_INPUT_STYLESHEET";
- public static final String ER_FAILED_PROCESS_STYLESHEET =
- "ER_FAILED_PROCESS_STYLESHEET";
+ public static final String ER_FAILED_PROCESS_STYLESHEET =
+ "ER_FAILED_PROCESS_STYLESHEET";
public static final String ER_COULDNT_PARSE_DOC = "ER_COULDNT_PARSE_DOC";
- public static final String ER_COULDNT_FIND_FRAGMENT =
- "ER_COULDNT_FIND_FRAGMENT";
+ public static final String ER_COULDNT_FIND_FRAGMENT =
+ "ER_COULDNT_FIND_FRAGMENT";
public static final String ER_NODE_NOT_ELEMENT = "ER_NODE_NOT_ELEMENT";
- public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
- "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
- public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
- "ER_NO_CLONE_OF_DOCUMENT_FRAG";
+ public static final String ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB =
+ "ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB";
+ public static final String ER_NO_CLONE_OF_DOCUMENT_FRAG =
+ "ER_NO_CLONE_OF_DOCUMENT_FRAG";
public static final String ER_CANT_CREATE_ITEM = "ER_CANT_CREATE_ITEM";
- public static final String ER_XMLSPACE_ILLEGAL_VALUE =
- "ER_XMLSPACE_ILLEGAL_VALUE";
- public static final String ER_NO_XSLKEY_DECLARATION =
- "ER_NO_XSLKEY_DECLARATION";
+ public static final String ER_XMLSPACE_ILLEGAL_VALUE =
+ "ER_XMLSPACE_ILLEGAL_VALUE";
+ public static final String ER_NO_XSLKEY_DECLARATION =
+ "ER_NO_XSLKEY_DECLARATION";
public static final String ER_CANT_CREATE_URL = "ER_CANT_CREATE_URL";
- public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
- "ER_XSLFUNCTIONS_UNSUPPORTED";
+ public static final String ER_XSLFUNCTIONS_UNSUPPORTED =
+ "ER_XSLFUNCTIONS_UNSUPPORTED";
public static final String ER_PROCESSOR_ERROR = "ER_PROCESSOR_ERROR";
- public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
- "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
- public static final String ER_RESULTNS_NOT_SUPPORTED =
- "ER_RESULTNS_NOT_SUPPORTED";
- public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
- "ER_DEFAULTSPACE_NOT_SUPPORTED";
- public static final String ER_INDENTRESULT_NOT_SUPPORTED =
- "ER_INDENTRESULT_NOT_SUPPORTED";
+ public static final String ER_NOT_ALLOWED_INSIDE_STYLESHEET =
+ "ER_NOT_ALLOWED_INSIDE_STYLESHEET";
+ public static final String ER_RESULTNS_NOT_SUPPORTED =
+ "ER_RESULTNS_NOT_SUPPORTED";
+ public static final String ER_DEFAULTSPACE_NOT_SUPPORTED =
+ "ER_DEFAULTSPACE_NOT_SUPPORTED";
+ public static final String ER_INDENTRESULT_NOT_SUPPORTED =
+ "ER_INDENTRESULT_NOT_SUPPORTED";
public static final String ER_ILLEGAL_ATTRIB = "ER_ILLEGAL_ATTRIB";
public static final String ER_UNKNOWN_XSL_ELEM = "ER_UNKNOWN_XSL_ELEM";
public static final String ER_BAD_XSLSORT_USE = "ER_BAD_XSLSORT_USE";
public static final String ER_MISPLACED_XSLWHEN = "ER_MISPLACED_XSLWHEN";
- public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_MISPLACED_XSLOTHERWISE =
- "ER_MISPLACED_XSLOTHERWISE";
- public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
- "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
- public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
- "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
- public static final String ER_UNKNOWN_EXT_NS_PREFIX =
- "ER_UNKNOWN_EXT_NS_PREFIX";
- public static final String ER_IMPORTS_AS_FIRST_ELEM =
- "ER_IMPORTS_AS_FIRST_ELEM";
+ public static final String ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLWHEN_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_MISPLACED_XSLOTHERWISE =
+ "ER_MISPLACED_XSLOTHERWISE";
+ public static final String ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE =
+ "ER_XSLOTHERWISE_NOT_PARENTED_BY_XSLCHOOSE";
+ public static final String ER_NOT_ALLOWED_INSIDE_TEMPLATE =
+ "ER_NOT_ALLOWED_INSIDE_TEMPLATE";
+ public static final String ER_UNKNOWN_EXT_NS_PREFIX =
+ "ER_UNKNOWN_EXT_NS_PREFIX";
+ public static final String ER_IMPORTS_AS_FIRST_ELEM =
+ "ER_IMPORTS_AS_FIRST_ELEM";
public static final String ER_IMPORTING_ITSELF = "ER_IMPORTING_ITSELF";
public static final String ER_XMLSPACE_ILLEGAL_VAL ="ER_XMLSPACE_ILLEGAL_VAL";
- public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
- "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
+ public static final String ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL =
+ "ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL";
public static final String ER_SAX_EXCEPTION = "ER_SAX_EXCEPTION";
public static final String ER_XSLT_ERROR = "ER_XSLT_ERROR";
public static final String ER_CURRENCY_SIGN_ILLEGAL=
- "ER_CURRENCY_SIGN_ILLEGAL";
- public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
- "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
- public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
- "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
- public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
- "ER_REDIRECT_COULDNT_GET_FILENAME";
- public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
- "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
- public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
- "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
+ "ER_CURRENCY_SIGN_ILLEGAL";
+ public static final String ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM =
+ "ER_DOCUMENT_FUNCTION_INVALID_IN_STYLESHEET_DOM";
+ public static final String ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER =
+ "ER_CANT_RESOLVE_PREFIX_OF_NON_PREFIX_RESOLVER";
+ public static final String ER_REDIRECT_COULDNT_GET_FILENAME =
+ "ER_REDIRECT_COULDNT_GET_FILENAME";
+ public static final String ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT =
+ "ER_CANNOT_BUILD_FORMATTERLISTENER_IN_REDIRECT";
+ public static final String ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX =
+ "ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX";
public static final String ER_MISSING_NS_URI = "ER_MISSING_NS_URI";
- public static final String ER_MISSING_ARG_FOR_OPTION =
- "ER_MISSING_ARG_FOR_OPTION";
+ public static final String ER_MISSING_ARG_FOR_OPTION =
+ "ER_MISSING_ARG_FOR_OPTION";
public static final String ER_INVALID_OPTION = "ER_INVALID_OPTION";
- public static final String ER_MALFORMED_FORMAT_STRING =
- "ER_MALFORMED_FORMAT_STRING";
- public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
- "ER_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String ER_MALFORMED_FORMAT_STRING =
+ "ER_MALFORMED_FORMAT_STRING";
+ public static final String ER_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "ER_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String ER_ILLEGAL_ATTRIBUTE_VALUE =
+ "ER_ILLEGAL_ATTRIBUTE_VALUE";
public static final String ER_CHOOSE_REQUIRES_WHEN ="ER_CHOOSE_REQUIRES_WHEN";
- public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
- "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
- public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
- "ER_CANT_USE_DTM_FOR_OUTPUT";
- public static final String ER_CANT_USE_DTM_FOR_INPUT =
- "ER_CANT_USE_DTM_FOR_INPUT";
+ public static final String ER_NO_APPLY_IMPORT_IN_FOR_EACH =
+ "ER_NO_APPLY_IMPORT_IN_FOR_EACH";
+ public static final String ER_CANT_USE_DTM_FOR_OUTPUT =
+ "ER_CANT_USE_DTM_FOR_OUTPUT";
+ public static final String ER_CANT_USE_DTM_FOR_INPUT =
+ "ER_CANT_USE_DTM_FOR_INPUT";
public static final String ER_CALL_TO_EXT_FAILED = "ER_CALL_TO_EXT_FAILED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
- public static final String ER_XSLATTRSET_USED_ITSELF =
- "ER_XSLATTRSET_USED_ITSELF";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_XSLATTRSET_USED_ITSELF =
+ "ER_XSLATTRSET_USED_ITSELF";
public static final String ER_CANNOT_MIX_XERCESDOM ="ER_CANNOT_MIX_XERCESDOM";
public static final String ER_TOO_MANY_LISTENERS = "ER_TOO_MANY_LISTENERS";
- public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
- "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
- public static final String ER_DUPLICATE_NAMED_TEMPLATE =
- "ER_DUPLICATE_NAMED_TEMPLATE";
+ public static final String ER_IN_ELEMTEMPLATEELEM_READOBJECT =
+ "ER_IN_ELEMTEMPLATEELEM_READOBJECT";
+ public static final String ER_DUPLICATE_NAMED_TEMPLATE =
+ "ER_DUPLICATE_NAMED_TEMPLATE";
public static final String ER_INVALID_KEY_CALL = "ER_INVALID_KEY_CALL";
public static final String ER_REFERENCING_ITSELF = "ER_REFERENCING_ITSELF";
- public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
- "ER_ILLEGAL_DOMSOURCE_INPUT";
- public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
- "ER_CLASS_NOT_FOUND_FOR_OPTION";
- public static final String ER_REQUIRED_ELEM_NOT_FOUND =
- "ER_REQUIRED_ELEM_NOT_FOUND";
+ public static final String ER_ILLEGAL_DOMSOURCE_INPUT =
+ "ER_ILLEGAL_DOMSOURCE_INPUT";
+ public static final String ER_CLASS_NOT_FOUND_FOR_OPTION =
+ "ER_CLASS_NOT_FOUND_FOR_OPTION";
+ public static final String ER_REQUIRED_ELEM_NOT_FOUND =
+ "ER_REQUIRED_ELEM_NOT_FOUND";
public static final String ER_INPUT_CANNOT_BE_NULL ="ER_INPUT_CANNOT_BE_NULL";
public static final String ER_URI_CANNOT_BE_NULL = "ER_URI_CANNOT_BE_NULL";
public static final String ER_FILE_CANNOT_BE_NULL = "ER_FILE_CANNOT_BE_NULL";
- public static final String ER_SOURCE_CANNOT_BE_NULL =
- "ER_SOURCE_CANNOT_BE_NULL";
+ public static final String ER_SOURCE_CANNOT_BE_NULL =
+ "ER_SOURCE_CANNOT_BE_NULL";
public static final String ER_CANNOT_INIT_BSFMGR = "ER_CANNOT_INIT_BSFMGR";
public static final String ER_CANNOT_CMPL_EXTENSN = "ER_CANNOT_CMPL_EXTENSN";
- public static final String ER_CANNOT_CREATE_EXTENSN =
- "ER_CANNOT_CREATE_EXTENSN";
- public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
- "ER_INSTANCE_MTHD_CALL_REQUIRES";
+ public static final String ER_CANNOT_CREATE_EXTENSN =
+ "ER_CANNOT_CREATE_EXTENSN";
+ public static final String ER_INSTANCE_MTHD_CALL_REQUIRES =
+ "ER_INSTANCE_MTHD_CALL_REQUIRES";
public static final String ER_INVALID_ELEMENT_NAME ="ER_INVALID_ELEMENT_NAME";
- public static final String ER_ELEMENT_NAME_METHOD_STATIC =
- "ER_ELEMENT_NAME_METHOD_STATIC";
- public static final String ER_EXTENSION_FUNC_UNKNOWN =
- "ER_EXTENSION_FUNC_UNKNOWN";
- public static final String ER_MORE_MATCH_CONSTRUCTOR =
- "ER_MORE_MATCH_CONSTRUCTOR";
+ public static final String ER_ELEMENT_NAME_METHOD_STATIC =
+ "ER_ELEMENT_NAME_METHOD_STATIC";
+ public static final String ER_EXTENSION_FUNC_UNKNOWN =
+ "ER_EXTENSION_FUNC_UNKNOWN";
+ public static final String ER_MORE_MATCH_CONSTRUCTOR =
+ "ER_MORE_MATCH_CONSTRUCTOR";
public static final String ER_MORE_MATCH_METHOD = "ER_MORE_MATCH_METHOD";
public static final String ER_MORE_MATCH_ELEMENT = "ER_MORE_MATCH_ELEMENT";
- public static final String ER_INVALID_CONTEXT_PASSED =
- "ER_INVALID_CONTEXT_PASSED";
+ public static final String ER_INVALID_CONTEXT_PASSED =
+ "ER_INVALID_CONTEXT_PASSED";
public static final String ER_POOL_EXISTS = "ER_POOL_EXISTS";
public static final String ER_NO_DRIVER_NAME = "ER_NO_DRIVER_NAME";
public static final String ER_NO_URL = "ER_NO_URL";
- public static final String ER_POOL_SIZE_LESSTHAN_ONE =
- "ER_POOL_SIZE_LESSTHAN_ONE";
+ public static final String ER_POOL_SIZE_LESSTHAN_ONE =
+ "ER_POOL_SIZE_LESSTHAN_ONE";
public static final String ER_INVALID_DRIVER = "ER_INVALID_DRIVER";
public static final String ER_NO_STYLESHEETROOT = "ER_NO_STYLESHEETROOT";
- public static final String ER_ILLEGAL_XMLSPACE_VALUE =
- "ER_ILLEGAL_XMLSPACE_VALUE";
- public static final String ER_PROCESSFROMNODE_FAILED =
- "ER_PROCESSFROMNODE_FAILED";
- public static final String ER_RESOURCE_COULD_NOT_LOAD =
- "ER_RESOURCE_COULD_NOT_LOAD";
- public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
- "ER_BUFFER_SIZE_LESSTHAN_ZERO";
- public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
- "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
+ public static final String ER_ILLEGAL_XMLSPACE_VALUE =
+ "ER_ILLEGAL_XMLSPACE_VALUE";
+ public static final String ER_PROCESSFROMNODE_FAILED =
+ "ER_PROCESSFROMNODE_FAILED";
+ public static final String ER_RESOURCE_COULD_NOT_LOAD =
+ "ER_RESOURCE_COULD_NOT_LOAD";
+ public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO =
+ "ER_BUFFER_SIZE_LESSTHAN_ZERO";
+ public static final String ER_UNKNOWN_ERROR_CALLING_EXTENSION =
+ "ER_UNKNOWN_ERROR_CALLING_EXTENSION";
public static final String ER_NO_NAMESPACE_DECL = "ER_NO_NAMESPACE_DECL";
- public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
- "ER_ELEM_CONTENT_NOT_ALLOWED";
- public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
- "ER_STYLESHEET_DIRECTED_TERMINATION";
+ public static final String ER_ELEM_CONTENT_NOT_ALLOWED =
+ "ER_ELEM_CONTENT_NOT_ALLOWED";
+ public static final String ER_STYLESHEET_DIRECTED_TERMINATION =
+ "ER_STYLESHEET_DIRECTED_TERMINATION";
public static final String ER_ONE_OR_TWO = "ER_ONE_OR_TWO";
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
- public static final String ER_COULD_NOT_LOAD_RESOURCE =
- "ER_COULD_NOT_LOAD_RESOURCE";
- public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
- "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
+ public static final String ER_COULD_NOT_LOAD_RESOURCE =
+ "ER_COULD_NOT_LOAD_RESOURCE";
+ public static final String ER_CANNOT_INIT_DEFAULT_TEMPLATES =
+ "ER_CANNOT_INIT_DEFAULT_TEMPLATES";
public static final String ER_RESULT_NULL = "ER_RESULT_NULL";
- public static final String ER_RESULT_COULD_NOT_BE_SET =
- "ER_RESULT_COULD_NOT_BE_SET";
+ public static final String ER_RESULT_COULD_NOT_BE_SET =
+ "ER_RESULT_COULD_NOT_BE_SET";
public static final String ER_NO_OUTPUT_SPECIFIED = "ER_NO_OUTPUT_SPECIFIED";
- public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
- "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
- public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
- "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_TO_RESULT_TYPE =
+ "ER_CANNOT_TRANSFORM_TO_RESULT_TYPE";
+ public static final String ER_CANNOT_TRANSFORM_SOURCE_TYPE =
+ "ER_CANNOT_TRANSFORM_SOURCE_TYPE";
public static final String ER_NULL_CONTENT_HANDLER ="ER_NULL_CONTENT_HANDLER";
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
public static final String ER_CANNOT_CALL_PARSE = "ER_CANNOT_CALL_PARSE";
public static final String ER_NO_PARENT_FOR_FILTER ="ER_NO_PARENT_FOR_FILTER";
- public static final String ER_NO_STYLESHEET_IN_MEDIA =
- "ER_NO_STYLESHEET_IN_MEDIA";
+ public static final String ER_NO_STYLESHEET_IN_MEDIA =
+ "ER_NO_STYLESHEET_IN_MEDIA";
public static final String ER_NO_STYLESHEET_PI = "ER_NO_STYLESHEET_PI";
public static final String ER_NOT_SUPPORTED = "ER_NOT_SUPPORTED";
- public static final String ER_PROPERTY_VALUE_BOOLEAN =
- "ER_PROPERTY_VALUE_BOOLEAN";
- public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
- "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
- public static final String ER_RESOURCE_COULD_NOT_FIND =
- "ER_RESOURCE_COULD_NOT_FIND";
- public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
- "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
- public static final String ER_FAILED_CREATING_ELEMLITRSLT =
- "ER_FAILED_CREATING_ELEMLITRSLT";
- public static final String ER_VALUE_SHOULD_BE_NUMBER =
- "ER_VALUE_SHOULD_BE_NUMBER";
+ public static final String ER_PROPERTY_VALUE_BOOLEAN =
+ "ER_PROPERTY_VALUE_BOOLEAN";
+ public static final String ER_COULD_NOT_FIND_EXTERN_SCRIPT =
+ "ER_COULD_NOT_FIND_EXTERN_SCRIPT";
+ public static final String ER_RESOURCE_COULD_NOT_FIND =
+ "ER_RESOURCE_COULD_NOT_FIND";
+ public static final String ER_OUTPUT_PROPERTY_NOT_RECOGNIZED =
+ "ER_OUTPUT_PROPERTY_NOT_RECOGNIZED";
+ public static final String ER_FAILED_CREATING_ELEMLITRSLT =
+ "ER_FAILED_CREATING_ELEMLITRSLT";
+ public static final String ER_VALUE_SHOULD_BE_NUMBER =
+ "ER_VALUE_SHOULD_BE_NUMBER";
public static final String ER_VALUE_SHOULD_EQUAL = "ER_VALUE_SHOULD_EQUAL";
- public static final String ER_FAILED_CALLING_METHOD =
- "ER_FAILED_CALLING_METHOD";
- public static final String ER_FAILED_CREATING_ELEMTMPL =
- "ER_FAILED_CREATING_ELEMTMPL";
+ public static final String ER_FAILED_CALLING_METHOD =
+ "ER_FAILED_CALLING_METHOD";
+ public static final String ER_FAILED_CREATING_ELEMTMPL =
+ "ER_FAILED_CREATING_ELEMTMPL";
public static final String ER_CHARS_NOT_ALLOWED = "ER_CHARS_NOT_ALLOWED";
public static final String ER_ATTR_NOT_ALLOWED = "ER_ATTR_NOT_ALLOWED";
public static final String ER_BAD_VALUE = "ER_BAD_VALUE";
- public static final String ER_ATTRIB_VALUE_NOT_FOUND =
- "ER_ATTRIB_VALUE_NOT_FOUND";
- public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
- "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
+ public static final String ER_ATTRIB_VALUE_NOT_FOUND =
+ "ER_ATTRIB_VALUE_NOT_FOUND";
+ public static final String ER_ATTRIB_VALUE_NOT_RECOGNIZED =
+ "ER_ATTRIB_VALUE_NOT_RECOGNIZED";
public static final String ER_NULL_URI_NAMESPACE = "ER_NULL_URI_NAMESPACE";
public static final String ER_NUMBER_TOO_BIG = "ER_NUMBER_TOO_BIG";
- public static final String ER_CANNOT_FIND_SAX1_DRIVER =
- "ER_CANNOT_FIND_SAX1_DRIVER";
- public static final String ER_SAX1_DRIVER_NOT_LOADED =
- "ER_SAX1_DRIVER_NOT_LOADED";
- public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
- "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
- public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
- "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
- public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
- "ER_PARSER_PROPERTY_NOT_SPECIFIED";
- public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
- "ER_PARSER_ARG_CANNOT_BE_NULL" ;
+ public static final String ER_CANNOT_FIND_SAX1_DRIVER =
+ "ER_CANNOT_FIND_SAX1_DRIVER";
+ public static final String ER_SAX1_DRIVER_NOT_LOADED =
+ "ER_SAX1_DRIVER_NOT_LOADED";
+ public static final String ER_SAX1_DRIVER_NOT_INSTANTIATED =
+ "ER_SAX1_DRIVER_NOT_INSTANTIATED" ;
+ public static final String ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER =
+ "ER_SAX1_DRIVER_NOT_IMPLEMENT_PARSER";
+ public static final String ER_PARSER_PROPERTY_NOT_SPECIFIED =
+ "ER_PARSER_PROPERTY_NOT_SPECIFIED";
+ public static final String ER_PARSER_ARG_CANNOT_BE_NULL =
+ "ER_PARSER_ARG_CANNOT_BE_NULL" ;
public static final String ER_FEATURE = "ER_FEATURE";
public static final String ER_PROPERTY = "ER_PROPERTY" ;
public static final String ER_NULL_ENTITY_RESOLVER ="ER_NULL_ENTITY_RESOLVER";
public static final String ER_NULL_DTD_HANDLER = "ER_NULL_DTD_HANDLER" ;
- public static final String ER_NO_DRIVER_NAME_SPECIFIED =
- "ER_NO_DRIVER_NAME_SPECIFIED";
+ public static final String ER_NO_DRIVER_NAME_SPECIFIED =
+ "ER_NO_DRIVER_NAME_SPECIFIED";
public static final String ER_NO_URL_SPECIFIED = "ER_NO_URL_SPECIFIED";
- public static final String ER_POOLSIZE_LESS_THAN_ONE =
- "ER_POOLSIZE_LESS_THAN_ONE";
+ public static final String ER_POOLSIZE_LESS_THAN_ONE =
+ "ER_POOLSIZE_LESS_THAN_ONE";
public static final String ER_INVALID_DRIVER_NAME = "ER_INVALID_DRIVER_NAME";
public static final String ER_ERRORLISTENER = "ER_ERRORLISTENER";
- public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
- "ER_ASSERT_NO_TEMPLATE_PARENT";
- public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
- "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
- public static final String ER_NOT_ALLOWED_IN_POSITION =
- "ER_NOT_ALLOWED_IN_POSITION";
- public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
- "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_ASSERT_NO_TEMPLATE_PARENT =
+ "ER_ASSERT_NO_TEMPLATE_PARENT";
+ public static final String ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR =
+ "ER_ASSERT_REDUNDENT_EXPR_ELIMINATOR";
+ public static final String ER_NOT_ALLOWED_IN_POSITION =
+ "ER_NOT_ALLOWED_IN_POSITION";
+ public static final String ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION =
+ "ER_NONWHITESPACE_NOT_ALLOWED_IN_POSITION";
public static final String ER_NAMESPACE_CONTEXT_NULL_NAMESPACE =
- "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
+ "ER_NAMESPACE_CONTEXT_NULL_NAMESPACE";
public static final String ER_NAMESPACE_CONTEXT_NULL_PREFIX =
- "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
+ "ER_NAMESPACE_CONTEXT_NULL_PREFIX";
public static final String ER_XPATH_RESOLVER_NULL_QNAME =
- "ER_XPATH_RESOLVER_NULL_QNAME";
+ "ER_XPATH_RESOLVER_NULL_QNAME";
public static final String ER_XPATH_RESOLVER_NEGATIVE_ARITY =
- "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
+ "ER_XPATH_RESOLVER_NEGATIVE_ARITY";
public static final String INVALID_TCHAR = "INVALID_TCHAR";
public static final String INVALID_QNAME = "INVALID_QNAME";
public static final String INVALID_ENUM = "INVALID_ENUM";
@@ -398,69 +398,69 @@
public static final String ER_TEMPLATE_NAME_MATCH = "ER_TEMPLATE_NAME_MATCH";
public static final String ER_INVALID_PREFIX = "ER_INVALID_PREFIX";
public static final String ER_NO_ATTRIB_SET = "ER_NO_ATTRIB_SET";
- public static final String ER_FUNCTION_NOT_FOUND =
- "ER_FUNCTION_NOT_FOUND";
- public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
+ public static final String ER_FUNCTION_NOT_FOUND =
+ "ER_FUNCTION_NOT_FOUND";
+ public static final String ER_CANT_HAVE_CONTENT_AND_SELECT =
"ER_CANT_HAVE_CONTENT_AND_SELECT";
- public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
+ public static final String ER_INVALID_SET_PARAM_VALUE = "ER_INVALID_SET_PARAM_VALUE";
public static final String ER_SET_FEATURE_NULL_NAME =
- "ER_SET_FEATURE_NULL_NAME";
+ "ER_SET_FEATURE_NULL_NAME";
public static final String ER_GET_FEATURE_NULL_NAME =
- "ER_GET_FEATURE_NULL_NAME";
+ "ER_GET_FEATURE_NULL_NAME";
public static final String ER_UNSUPPORTED_FEATURE =
- "ER_UNSUPPORTED_FEATURE";
+ "ER_UNSUPPORTED_FEATURE";
public static final String ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING =
- "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
-
+ "ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING";
+
public static final String WG_FOUND_CURLYBRACE = "WG_FOUND_CURLYBRACE";
- public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
- "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
- public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
- "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
- public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
- "WG_NO_LOCALE_IN_FORMATNUMBER";
+ public static final String WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR =
+ "WG_COUNT_ATTRIB_MATCHES_NO_ANCESTOR";
+ public static final String WG_EXPR_ATTRIB_CHANGED_TO_SELECT =
+ "WG_EXPR_ATTRIB_CHANGED_TO_SELECT";
+ public static final String WG_NO_LOCALE_IN_FORMATNUMBER =
+ "WG_NO_LOCALE_IN_FORMATNUMBER";
public static final String WG_LOCALE_NOT_FOUND = "WG_LOCALE_NOT_FOUND";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
- "WG_CANNOT_LOAD_REQUESTED_DOC";
+ public static final String WG_CANNOT_LOAD_REQUESTED_DOC =
+ "WG_CANNOT_LOAD_REQUESTED_DOC";
public static final String WG_CANNOT_FIND_COLLATOR ="WG_CANNOT_FIND_COLLATOR";
- public static final String WG_FUNCTIONS_SHOULD_USE_URL =
- "WG_FUNCTIONS_SHOULD_USE_URL";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
- "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
- public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
- "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
- public static final String WG_SPECIFICITY_CONFLICTS =
- "WG_SPECIFICITY_CONFLICTS";
- public static final String WG_PARSING_AND_PREPARING =
- "WG_PARSING_AND_PREPARING";
+ public static final String WG_FUNCTIONS_SHOULD_USE_URL =
+ "WG_FUNCTIONS_SHOULD_USE_URL";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_UTF8 =
+ "WG_ENCODING_NOT_SUPPORTED_USING_UTF8";
+ public static final String WG_ENCODING_NOT_SUPPORTED_USING_JAVA =
+ "WG_ENCODING_NOT_SUPPORTED_USING_JAVA";
+ public static final String WG_SPECIFICITY_CONFLICTS =
+ "WG_SPECIFICITY_CONFLICTS";
+ public static final String WG_PARSING_AND_PREPARING =
+ "WG_PARSING_AND_PREPARING";
public static final String WG_ATTR_TEMPLATE = "WG_ATTR_TEMPLATE";
public static final String WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESPACE = "WG_CONFLICT_BETWEEN_XSLSTRIPSPACE_AND_XSLPRESERVESP";
public static final String WG_ATTRIB_NOT_HANDLED = "WG_ATTRIB_NOT_HANDLED";
- public static final String WG_NO_DECIMALFORMAT_DECLARATION =
- "WG_NO_DECIMALFORMAT_DECLARATION";
+ public static final String WG_NO_DECIMALFORMAT_DECLARATION =
+ "WG_NO_DECIMALFORMAT_DECLARATION";
public static final String WG_OLD_XSLT_NS = "WG_OLD_XSLT_NS";
- public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
- "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
- public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
- "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
+ public static final String WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED =
+ "WG_ONE_DEFAULT_XSLDECIMALFORMAT_ALLOWED";
+ public static final String WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE =
+ "WG_XSLDECIMALFORMAT_NAMES_MUST_BE_UNIQUE";
public static final String WG_ILLEGAL_ATTRIBUTE = "WG_ILLEGAL_ATTRIBUTE";
- public static final String WG_COULD_NOT_RESOLVE_PREFIX =
- "WG_COULD_NOT_RESOLVE_PREFIX";
- public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
- "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
- public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
- "WG_ILLEGAL_ATTRIBUTE_NAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
- "WG_ILLEGAL_ATTRIBUTE_VALUE";
+ public static final String WG_COULD_NOT_RESOLVE_PREFIX =
+ "WG_COULD_NOT_RESOLVE_PREFIX";
+ public static final String WG_STYLESHEET_REQUIRES_VERSION_ATTRIB =
+ "WG_STYLESHEET_REQUIRES_VERSION_ATTRIB";
+ public static final String WG_ILLEGAL_ATTRIBUTE_NAME =
+ "WG_ILLEGAL_ATTRIBUTE_NAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_VALUE =
+ "WG_ILLEGAL_ATTRIBUTE_VALUE";
public static final String WG_EMPTY_SECOND_ARG = "WG_EMPTY_SECOND_ARG";
- public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
- "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
- public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
- "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
- public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
- "WG_ILLEGAL_ATTRIBUTE_POSITION";
- public static final String NO_MODIFICATION_ALLOWED_ERR =
+ public static final String WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML =
+ "WG_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML";
+ public static final String WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME =
+ "WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME";
+ public static final String WG_ILLEGAL_ATTRIBUTE_POSITION =
+ "WG_ILLEGAL_ATTRIBUTE_POSITION";
+ public static final String NO_MODIFICATION_ALLOWED_ERR =
"NO_MODIFICATION_ALLOWED_ERR";
/*
@@ -476,10 +476,10 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
- { ER_NO_CURLYBRACE,
+ { ER_NO_CURLYBRACE,
"\u932F\u8AA4: \u8868\u793A\u5F0F\u4E2D\u4E0D\u53EF\u6709 '{'"},
- { ER_ILLEGAL_ATTRIBUTE ,
+ { ER_ILLEGAL_ATTRIBUTE ,
"{0} \u5177\u6709\u7121\u6548\u5C6C\u6027: {1}"},
{ER_NULL_SOURCENODE_APPLYIMPORTS ,
@@ -488,10 +488,10 @@
{ER_CANNOT_ADD,
"\u7121\u6CD5\u65B0\u589E {0} \u81F3 {1}"},
- { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
+ { ER_NULL_SOURCENODE_HANDLEAPPLYTEMPLATES,
"sourceNode \u5728 handleApplyTemplatesInstruction \u4E2D\u662F\u7A7A\u503C\uFF01"},
- { ER_NO_NAME_ATTRIB,
+ { ER_NO_NAME_ATTRIB,
"{0} \u5FC5\u9808\u6709\u540D\u7A31\u5C6C\u6027\u3002"},
{ER_TEMPLATE_NOT_FOUND,
@@ -503,13 +503,13 @@
{ER_REQUIRES_ATTRIB,
"{0} \u9700\u8981\u5C6C\u6027: {1}"},
- { ER_MUST_HAVE_TEST_ATTRIB,
+ { ER_MUST_HAVE_TEST_ATTRIB,
"{0} \u5FC5\u9808\u6709 ''test'' \u5C6C\u6027\u3002"},
{ER_BAD_VAL_ON_LEVEL_ATTRIB,
"\u932F\u8AA4\u7684\u503C\u4F4D\u65BC\u5C64\u6B21\u5C6C\u6027: {0}"},
- {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
+ {ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML,
"processing-instruction \u540D\u7A31\u4E0D\u53EF\u70BA 'xml'"},
{ ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME,
@@ -587,10 +587,10 @@
{ ER_IOEXCEPTION,
"\u6A23\u5F0F\u8868\u6A94\u6848\u767C\u751F IO \u7570\u5E38\u72C0\u6CC1: {0}"},
- { ER_NO_HREF_ATTRIB,
+ { ER_NO_HREF_ATTRIB,
"(StylesheetHandler) \u627E\u4E0D\u5230 {0} \u7684 href \u5C6C\u6027"},
- { ER_STYLESHEET_INCLUDES_ITSELF,
+ { ER_STYLESHEET_INCLUDES_ITSELF,
"(StylesheetHandler) {0} \u76F4\u63A5\u6216\u9593\u63A5\u5730\u5305\u542B\u672C\u8EAB\uFF01"},
{ ER_PROCESSINCLUDE_ERROR,
@@ -614,7 +614,7 @@
{ ER_NO_SELECT_EXPRESSION,
"\u932F\u8AA4\uFF01\u627E\u4E0D\u5230 xpath \u9078\u53D6\u8868\u793A\u5F0F (-select)\u3002"},
- { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
+ { ER_CANNOT_SERIALIZE_XSLPROCESSOR,
"\u7121\u6CD5\u5E8F\u5217\u5316 XSLProcessor\uFF01"},
{ ER_NO_INPUT_STYLESHEET,
@@ -623,7 +623,7 @@
{ ER_FAILED_PROCESS_STYLESHEET,
"\u7121\u6CD5\u8655\u7406\u6A23\u5F0F\u8868\uFF01"},
- { ER_COULDNT_PARSE_DOC,
+ { ER_COULDNT_PARSE_DOC,
"\u7121\u6CD5\u5256\u6790 {0} \u6587\u4EF6\uFF01"},
{ ER_COULDNT_FIND_FRAGMENT,
@@ -635,7 +635,7 @@
{ ER_FOREACH_NEED_MATCH_OR_NAME_ATTRIB,
"for-each \u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"},
- { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
+ { ER_TEMPLATES_NEED_MATCH_OR_NAME_ATTRIB,
"\u6A23\u677F\u5FC5\u9808\u6709\u914D\u5C0D\u6216\u540D\u7A31\u5C6C\u6027"},
{ ER_NO_CLONE_OF_DOCUMENT_FRAG,
@@ -650,22 +650,22 @@
{ ER_NO_XSLKEY_DECLARATION,
"{0} \u6C92\u6709 xsl:key \u5BA3\u544A\uFF01"},
- { ER_CANT_CREATE_URL,
+ { ER_CANT_CREATE_URL,
"\u932F\u8AA4\uFF01\u7121\u6CD5\u70BA {0} \u5EFA\u7ACB url"},
{ ER_XSLFUNCTIONS_UNSUPPORTED,
"\u4E0D\u652F\u63F4 xsl:functions"},
- { ER_PROCESSOR_ERROR,
+ { ER_PROCESSOR_ERROR,
"XSLT TransformerFactory \u932F\u8AA4"},
{ ER_NOT_ALLOWED_INSIDE_STYLESHEET,
"(StylesheetHandler) \u6A23\u5F0F\u8868\u5167\u4E0D\u5141\u8A31 {0}\uFF01"},
- { ER_RESULTNS_NOT_SUPPORTED,
+ { ER_RESULTNS_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u63F4 result-ns\uFF01\u8ACB\u6539\u7528 xsl:output\u3002"},
- { ER_DEFAULTSPACE_NOT_SUPPORTED,
+ { ER_DEFAULTSPACE_NOT_SUPPORTED,
"\u4E0D\u518D\u652F\u63F4 default-space\uFF01\u8ACB\u6539\u7528 xsl:strip-space \u6216 xsl:preserve-space\u3002"},
{ ER_INDENTRESULT_NOT_SUPPORTED,
@@ -695,10 +695,10 @@
{ ER_NOT_ALLOWED_INSIDE_TEMPLATE,
"(StylesheetHandler) \u6A23\u677F\u5167\u4E0D\u5141\u8A31 {0}\uFF01"},
- { ER_UNKNOWN_EXT_NS_PREFIX,
+ { ER_UNKNOWN_EXT_NS_PREFIX,
"(StylesheetHandler) \u4E0D\u660E\u7684 {0} \u64F4\u5145\u5957\u4EF6\u547D\u540D\u7A7A\u9593\u524D\u7F6E\u78BC {1}"},
- { ER_IMPORTS_AS_FIRST_ELEM,
+ { ER_IMPORTS_AS_FIRST_ELEM,
"(StylesheetHandler) \u532F\u5165\u53EA\u80FD\u767C\u751F\u65BC\u6A23\u5F0F\u8868\u4E2D\u7684\u7B2C\u4E00\u500B\u5143\u7D20\uFF01"},
{ ER_IMPORTING_ITSELF,
@@ -710,11 +710,11 @@
{ ER_PROCESSSTYLESHEET_NOT_SUCCESSFUL,
"processStylesheet \u5931\u6557\uFF01"},
- { ER_SAX_EXCEPTION,
+ { ER_SAX_EXCEPTION,
"SAX \u7570\u5E38\u72C0\u6CC1"},
// add this message to fix bug 21478
- { ER_FUNCTION_NOT_SUPPORTED,
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4\u51FD\u6578\uFF01"},
{ ER_XSLT_ERROR,
@@ -738,7 +738,7 @@
{ ER_INVALID_PREFIX_IN_EXCLUDERESULTPREFIX,
"exclude-result-prefixes \u4E2D\u7684\u524D\u7F6E\u78BC\u7121\u6548: {0}"},
- { ER_MISSING_NS_URI,
+ { ER_MISSING_NS_URI,
"\u907A\u6F0F\u6307\u5B9A\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 URI"},
{ ER_MISSING_ARG_FOR_OPTION,
@@ -802,28 +802,28 @@
"newTemplates \u4E4B DOMSource \u7684\u8F38\u5165\u7BC0\u9EDE\u4E0D\u53EF\u70BA\u7A7A\u503C\uFF01"},
{ ER_CLASS_NOT_FOUND_FOR_OPTION,
- "\u627E\u4E0D\u5230\u9078\u9805 {0} \u7684\u985E\u5225\u6A94\u6848"},
+ "\u627E\u4E0D\u5230\u9078\u9805 {0} \u7684\u985E\u5225\u6A94\u6848"},
{ ER_REQUIRED_ELEM_NOT_FOUND,
- "\u627E\u4E0D\u5230\u9700\u8981\u7684\u5143\u7D20: {0}"},
+ "\u627E\u4E0D\u5230\u9700\u8981\u7684\u5143\u7D20: {0}"},
{ ER_INPUT_CANNOT_BE_NULL,
- "InputStream \u4E0D\u53EF\u70BA\u7A7A\u503C"},
+ "InputStream \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_URI_CANNOT_BE_NULL,
- "URI \u4E0D\u53EF\u70BA\u7A7A\u503C"},
+ "URI \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_FILE_CANNOT_BE_NULL,
- "File \u4E0D\u53EF\u70BA\u7A7A\u503C"},
+ "File \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_SOURCE_CANNOT_BE_NULL,
- "InputSource \u4E0D\u53EF\u70BA\u7A7A\u503C"},
+ "InputSource \u4E0D\u53EF\u70BA\u7A7A\u503C"},
{ ER_CANNOT_INIT_BSFMGR,
- "\u7121\u6CD5\u8D77\u59CB BSF \u7BA1\u7406\u7A0B\u5F0F"},
+ "\u7121\u6CD5\u8D77\u59CB BSF \u7BA1\u7406\u7A0B\u5F0F"},
{ ER_CANNOT_CMPL_EXTENSN,
- "\u7121\u6CD5\u7DE8\u8B6F\u64F4\u5145\u5957\u4EF6"},
+ "\u7121\u6CD5\u7DE8\u8B6F\u64F4\u5145\u5957\u4EF6"},
{ ER_CANNOT_CREATE_EXTENSN,
"\u7121\u6CD5\u5EFA\u7ACB\u64F4\u5145\u5957\u4EF6: {0}\uFF0C\u56E0\u70BA: {1}"},
@@ -960,7 +960,7 @@
//Earlier (JDK 1.4 XALAN 2.2-D11) at key code '204' the key name was ER_PRIORITY_NOT_PARSABLE
// In latest Xalan code base key name is ER_VALUE_SHOULD_BE_NUMBER. This should also be taken care
//in locale specific files like XSLTErrorResources_de.java, XSLTErrorResources_fr.java etc.
- //NOTE: Not only the key name but message has also been changed.
+ //NOTE: Not only the key name but message has also been changed.
{ ER_VALUE_SHOULD_BE_NUMBER,
"{0} \u7684\u503C\u61C9\u5305\u542B\u53EF\u5256\u6790\u7684\u6578\u5B57"},
@@ -1161,7 +1161,7 @@
// ER_NO_ATTRIB_SET - new error message for bugzilla #782
{ ER_NO_ATTRIB_SET,
"\u4E0D\u5B58\u5728\u540D\u7A31\u70BA {0} \u7684 attribute-set"},
-
+
// Note to translators: This message indicates that there was a reference
// to a function named {0} for which no function definition could be found.
{ ER_FUNCTION_NOT_FOUND,
@@ -1187,26 +1187,26 @@
{ ER_SET_FEATURE_NULL_NAME,
"TransformerFactory.setFeature(\u5B57\u4E32\u540D\u7A31, \u5E03\u6797\u503C) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
-
+
{ ER_GET_FEATURE_NULL_NAME,
"TransformerFactory.getFeature(\u5B57\u4E32\u540D\u7A31) \u4E2D\u7684\u529F\u80FD\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
-
+
{ ER_UNSUPPORTED_FEATURE,
"\u7121\u6CD5\u5728\u6B64 TransformerFactory \u4E0A\u8A2D\u5B9A\u529F\u80FD ''{0}''\u3002"},
-
+
{ ER_EXTENSION_ELEMENT_NOT_ALLOWED_IN_SECURE_PROCESSING,
- "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"},
-
- { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
+ "\u7576\u5B89\u5168\u8655\u7406\u529F\u80FD\u8A2D\u70BA\u771F\u6642\uFF0C\u4E0D\u5141\u8A31\u4F7F\u7528\u64F4\u5145\u5957\u4EF6\u5143\u7D20 ''{0}''\u3002"},
+
+ { ER_NAMESPACE_CONTEXT_NULL_NAMESPACE,
"\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u547D\u540D\u7A7A\u9593 uri \u7684\u524D\u7F6E\u78BC\u3002"},
- { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
+ { ER_NAMESPACE_CONTEXT_NULL_PREFIX,
"\u7121\u6CD5\u53D6\u5F97\u7A7A\u503C\u524D\u7F6E\u78BC\u7684\u547D\u540D\u7A7A\u9593 uri\u3002"},
- { ER_XPATH_RESOLVER_NULL_QNAME,
+ { ER_XPATH_RESOLVER_NULL_QNAME,
"\u51FD\u6578\u540D\u7A31\u4E0D\u53EF\u70BA\u7A7A\u503C\u3002"},
- { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
+ { ER_XPATH_RESOLVER_NEGATIVE_ARITY,
"Arity \u4E0D\u53EF\u70BA\u8CA0\u503C\u3002"},
// Warnings...
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/ConfigurationError.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,61 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: ObjectFactory.java,v 1.2.4.1 2005/09/15 02:39:54 jeffsuttor Exp $
+ */
+
+package com.sun.org.apache.xalan.internal.utils;
+
+/**
+ * A configuration error. This was an internal class in ObjectFactory previously
+ */
+public final class ConfigurationError
+ extends Error {
+
+ //
+ // Data
+ //
+
+ /** Exception. */
+ private Exception exception;
+
+ //
+ // Constructors
+ //
+
+ /**
+ * Construct a new instance with the specified detail string and
+ * exception.
+ */
+ ConfigurationError(String msg, Exception x) {
+ super(msg);
+ this.exception = x;
+ } // javax.xml.parsers.ObjectFactory
+ * class and modified to be used as a general utility for creating objects
+ * dynamically.
+ *
+ * @version $Id: ObjectFactory.java,v 1.11 2010-11-01 04:34:25 joehw Exp $
+ */
+public class ObjectFactory {
+
+ //
+ // Constants
+ //
+
+ // name of default properties file to look for in JDK's jre/lib directory
+ private static final String DEFAULT_PROPERTIES_FILENAME =
+ "xalan.properties";
+
+ private static final String SERVICES_PATH = "META-INF/services/";
+
+ /** Set to true for debugging */
+ private static final boolean DEBUG = false;
+
+ /** cache the contents of the xalan.properties file.
+ * Until an attempt has been made to read this file, this will
+ * be null; if the file does not exist or we encounter some other error
+ * during the read, this will be empty.
+ */
+ private static Properties fXalanProperties = null;
+
+ /***
+ * Cache the time stamp of the xalan.properties file so
+ * that we know if it's been modified and can invalidate
+ * the cache when necessary.
+ */
+ private static long fLastModified = -1;
+
+ //
+ // Public static methods
+ //
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ *
+ *
+ *
+ * @return instance of factory, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ public static Object createObject(String factoryId, String fallbackClassName)
+ throws ConfigurationError {
+ return createObject(factoryId, null, fallbackClassName);
+ } // createObject(String,String):Object
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ * System.getProperty
+ * META-INF/services/factoryId
file
+ *
+ *
+ *
+ * @return instance of factory, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param propertiesFilename The filename in the $java.home/lib directory
+ * of the properties file. If none specified,
+ * ${java.home}/lib/xalan.properties will be used.
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ static Object createObject(String factoryId,
+ String propertiesFilename,
+ String fallbackClassName)
+ throws ConfigurationError
+ {
+ Class factoryClass = lookUpFactoryClass(factoryId,
+ propertiesFilename,
+ fallbackClassName);
+
+ if (factoryClass == null) {
+ throw new ConfigurationError(
+ "Provider for " + factoryId + " cannot be found", null);
+ }
+
+ try{
+ Object instance = factoryClass.newInstance();
+ if (DEBUG) debugPrintln("created new instance of factory " + factoryId);
+ return instance;
+ } catch (Exception x) {
+ throw new ConfigurationError(
+ "Provider for factory " + factoryId
+ + " could not be instantiated: " + x, x);
+ }
+ } // createObject(String,String,String):Object
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ * System.getProperty
+ * $java.home/lib/propertiesFilename
file
+ * META-INF/services/factoryId
file
+ *
+ *
+ *
+ * @return Class object of factory, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param propertiesFilename The filename in the $java.home/lib directory
+ * of the properties file. If none specified,
+ * ${java.home}/lib/xalan.properties will be used.
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ public static Class lookUpFactoryClass(String factoryId)
+ throws ConfigurationError
+ {
+ return lookUpFactoryClass(factoryId, null, null);
+ } // lookUpFactoryClass(String):Class
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ * System.getProperty
+ * $java.home/lib/propertiesFilename
file
+ * META-INF/services/factoryId
file
+ *
+ *
+ *
+ * @return Class object that provides factory service, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param propertiesFilename The filename in the $java.home/lib directory
+ * of the properties file. If none specified,
+ * ${java.home}/lib/xalan.properties will be used.
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ public static Class lookUpFactoryClass(String factoryId,
+ String propertiesFilename,
+ String fallbackClassName)
+ throws ConfigurationError
+ {
+ String factoryClassName = lookUpFactoryClassName(factoryId,
+ propertiesFilename,
+ fallbackClassName);
+ ClassLoader cl = findClassLoader();
+
+ if (factoryClassName == null) {
+ factoryClassName = fallbackClassName;
+ }
+
+ // assert(className != null);
+ try{
+ Class providerClass = findProviderClass(factoryClassName,
+ cl,
+ true);
+ if (DEBUG) debugPrintln("created new instance of " + providerClass +
+ " using ClassLoader: " + cl);
+ return providerClass;
+ } catch (ClassNotFoundException x) {
+ throw new ConfigurationError(
+ "Provider " + factoryClassName + " not found", x);
+ } catch (Exception x) {
+ throw new ConfigurationError(
+ "Provider "+factoryClassName+" could not be instantiated: "+x,
+ x);
+ }
+ } // lookUpFactoryClass(String,String,String):Class
+
+ /**
+ * Finds the name of the required implementation class in the specified
+ * order. The specified order is the following:
+ * System.getProperty
+ * $java.home/lib/propertiesFilename
file
+ * META-INF/services/factoryId
file
+ *
+ *
+ *
+ * @return name of class that provides factory service, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param propertiesFilename The filename in the $java.home/lib directory
+ * of the properties file. If none specified,
+ * ${java.home}/lib/xalan.properties will be used.
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ static String lookUpFactoryClassName(String factoryId,
+ String propertiesFilename,
+ String fallbackClassName)
+ {
+ // Use the system property first
+ try {
+ String systemProp = SecuritySupport.getSystemProperty(factoryId);
+ if (systemProp != null) {
+ if (DEBUG) debugPrintln("found system property, value=" + systemProp);
+ return systemProp;
+ }
+ } catch (SecurityException se) {
+ // Ignore and continue w/ next location
+ }
+
+ // Try to read from propertiesFilename, or
+ // $java.home/lib/xalan.properties
+ String factoryClassName = null;
+ // no properties file name specified; use
+ // $JAVA_HOME/lib/xalan.properties:
+ if (propertiesFilename == null) {
+ File propertiesFile = null;
+ boolean propertiesFileExists = false;
+ try {
+ String javah = SecuritySupport.getSystemProperty("java.home");
+ propertiesFilename = javah + File.separator +
+ "lib" + File.separator + DEFAULT_PROPERTIES_FILENAME;
+ propertiesFile = new File(propertiesFilename);
+ propertiesFileExists = SecuritySupport.getFileExists(propertiesFile);
+ } catch (SecurityException e) {
+ // try again...
+ fLastModified = -1;
+ fXalanProperties = null;
+ }
+
+ synchronized (ObjectFactory.class) {
+ boolean loadProperties = false;
+ FileInputStream fis = null;
+ try {
+ // file existed last time
+ if(fLastModified >= 0) {
+ if(propertiesFileExists &&
+ (fLastModified < (fLastModified = SecuritySupport.getLastModified(propertiesFile)))) {
+ loadProperties = true;
+ } else {
+ // file has stopped existing...
+ if(!propertiesFileExists) {
+ fLastModified = -1;
+ fXalanProperties = null;
+ } // else, file wasn't modified!
+ }
+ } else {
+ // file has started to exist:
+ if(propertiesFileExists) {
+ loadProperties = true;
+ fLastModified = SecuritySupport.getLastModified(propertiesFile);
+ } // else, nothing's changed
+ }
+ if(loadProperties) {
+ // must never have attempted to read xalan.properties
+ // before (or it's outdeated)
+ fXalanProperties = new Properties();
+ fis = SecuritySupport.getFileInputStream(propertiesFile);
+ fXalanProperties.load(fis);
+ }
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
+ // assert(x instanceof FileNotFoundException
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
+ finally {
+ // try to close the input stream if one was opened.
+ if (fis != null) {
+ try {
+ fis.close();
+ }
+ // Ignore the exception.
+ catch (IOException exc) {}
+ }
+ }
+ }
+ if(fXalanProperties != null) {
+ factoryClassName = fXalanProperties.getProperty(factoryId);
+ }
+ } else {
+ FileInputStream fis = null;
+ try {
+ fis = SecuritySupport.getFileInputStream(new File(propertiesFilename));
+ Properties props = new Properties();
+ props.load(fis);
+ factoryClassName = props.getProperty(factoryId);
+ } catch (Exception x) {
+ // assert(x instanceof FileNotFoundException
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
+ finally {
+ // try to close the input stream if one was opened.
+ if (fis != null) {
+ try {
+ fis.close();
+ }
+ // Ignore the exception.
+ catch (IOException exc) {}
+ }
+ }
+ }
+ if (factoryClassName != null) {
+ if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
+ + factoryClassName);
+ return factoryClassName;
+ }
+
+ // Try Jar Service Provider Mechanism
+ return findJarServiceProviderName(factoryId);
+ } // lookUpFactoryClass(String,String):String
+
+ //
+ // Private static methods
+ //
+
+ /** Prints a message to standard error if debugging is enabled. */
+ private static void debugPrintln(String msg) {
+ if (DEBUG) {
+ System.err.println("JAXP: " + msg);
+ }
+ } // debugPrintln(String)
+
+ /**
+ * Figure out which ClassLoader to use. For JDK 1.2 and later use
+ * the context ClassLoader.
+ */
+ public static ClassLoader findClassLoader()
+ throws ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ //this will ensure bootclassloader is used
+ return null;
+ }
+
+ // Figure out which ClassLoader to use for loading the provider
+ // class. If there is a Context ClassLoader then use it.
+ ClassLoader context = SecuritySupport.getContextClassLoader();
+ ClassLoader system = SecuritySupport.getSystemClassLoader();
+
+ ClassLoader chain = system;
+ while (true) {
+ if (context == chain) {
+ // Assert: we are on JDK 1.1 or we have no Context ClassLoader
+ // or any Context ClassLoader in chain of system classloader
+ // (including extension ClassLoader) so extend to widest
+ // ClassLoader (always look in system ClassLoader if Xalan
+ // is in boot/extension/system classpath and in current
+ // ClassLoader otherwise); normal classloaders delegate
+ // back to system ClassLoader first so this widening doesn't
+ // change the fact that context ClassLoader will be consulted
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+
+ chain = system;
+ while (true) {
+ if (current == chain) {
+ // Assert: Current ClassLoader in chain of
+ // boot/extension/system ClassLoaders
+ return system;
+ }
+ if (chain == null) {
+ break;
+ }
+ chain = SecuritySupport.getParentClassLoader(chain);
+ }
+
+ // Assert: Current ClassLoader not in chain of
+ // boot/extension/system ClassLoaders
+ return current;
+ }
+
+ if (chain == null) {
+ // boot ClassLoader reached
+ break;
+ }
+
+ // Check for any extension ClassLoaders in chain up to
+ // boot ClassLoader
+ chain = SecuritySupport.getParentClassLoader(chain);
+ }
+
+ // Assert: Context ClassLoader not in chain of
+ // boot/extension/system ClassLoaders
+ return context;
+ } // findClassLoader():ClassLoader
+
+ /**
+ * Create an instance of a class using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static Object newInstance(String className, boolean doFallback)
+ throws ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ return newInstance(className, null, doFallback);
+ } else {
+ return newInstance(className,
+ findClassLoader (), doFallback);
+ }
+ }
+
+ /**
+ * Create an instance of a class using the specified ClassLoader
+ */
+ static Object newInstance(String className, ClassLoader cl,
+ boolean doFallback)
+ throws ConfigurationError
+ {
+ // assert(className != null);
+ try{
+ Class providerClass = findProviderClass(className, cl, doFallback);
+ Object instance = providerClass.newInstance();
+ if (DEBUG) debugPrintln("created new instance of " + providerClass +
+ " using ClassLoader: " + cl);
+ return instance;
+ } catch (ClassNotFoundException x) {
+ throw new ConfigurationError(
+ "Provider " + className + " not found", x);
+ } catch (Exception x) {
+ throw new ConfigurationError(
+ "Provider " + className + " could not be instantiated: " + x,
+ x);
+ }
+ }
+
+ /**
+ * Find a Class using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static Class findProviderClass(String className, boolean doFallback)
+ throws ClassNotFoundException, ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ return Class.forName(className);
+ } else {
+ return findProviderClass (className,
+ findClassLoader (), doFallback);
+ }
+ }
+
+ /**
+ * Find a Class using the specified ClassLoader
+ */
+ static Class findProviderClass(String className, ClassLoader cl,
+ boolean doFallback)
+ throws ClassNotFoundException, ConfigurationError
+ {
+ //throw security exception if the calling thread is not allowed to access the
+ //class. Restrict the access to the package classes as specified in java.security policy.
+ SecurityManager security = System.getSecurityManager();
+ try{
+ if (security != null){
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
+ }catch(SecurityException e){
+ throw e;
+ }
+
+ Class providerClass;
+ if (cl == null) {
+ // XXX Use the bootstrap ClassLoader. There is no way to
+ // load a class using the bootstrap ClassLoader that works
+ // in both JDK 1.1 and Java 2. However, this should still
+ // work b/c the following should be true:
+ //
+ // (cl == null) iff current ClassLoader == null
+ //
+ // Thus Class.forName(String) will use the current
+ // ClassLoader which will be the bootstrap ClassLoader.
+ providerClass = Class.forName(className);
+ } else {
+ try {
+ providerClass = cl.loadClass(className);
+ } catch (ClassNotFoundException x) {
+ if (doFallback) {
+ // Fall back to current classloader
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+ if (current == null) {
+ providerClass = Class.forName(className);
+ } else if (cl != current) {
+ cl = current;
+ providerClass = cl.loadClass(className);
+ } else {
+ throw x;
+ }
+ } else {
+ throw x;
+ }
+ }
+ }
+
+ return providerClass;
+ }
+
+ /**
+ * Find the name of service provider using Jar Service Provider Mechanism
+ *
+ * @return instance of provider class if found or null
+ */
+ private static String findJarServiceProviderName(String factoryId)
+ {
+ String serviceId = SERVICES_PATH + factoryId;
+ InputStream is = null;
+
+ // First try the Context ClassLoader
+ ClassLoader cl = findClassLoader();
+
+ is = SecuritySupport.getResourceAsStream(cl, serviceId);
+
+ // If no provider found then try the current ClassLoader
+ if (is == null) {
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+ if (cl != current) {
+ cl = current;
+ is = SecuritySupport.getResourceAsStream(cl, serviceId);
+ }
+ }
+
+ if (is == null) {
+ // No provider found
+ return null;
+ }
+
+ if (DEBUG) debugPrintln("found jar resource=" + serviceId +
+ " using ClassLoader: " + cl);
+
+ // Read the service provider name in UTF-8 as specified in
+ // the jar spec. Unfortunately this fails in Microsoft
+ // VJ++, which does not implement the UTF-8
+ // encoding. Theoretically, we should simply let it fail in
+ // that case, since the JVM is obviously broken if it
+ // doesn't support such a basic standard. But since there
+ // are still some users attempting to use VJ++ for
+ // development, we have dropped in a fallback which makes a
+ // second attempt using the platform's default encoding. In
+ // VJ++ this is apparently ASCII, which is a subset of
+ // UTF-8... and since the strings we'll be reading here are
+ // also primarily limited to the 7-bit ASCII range (at
+ // least, in English versions), this should work well
+ // enough to keep us on the air until we're ready to
+ // officially decommit from VJ++. [Edited comment from
+ // jkesselm]
+ BufferedReader rd;
+ try {
+ rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
+ } catch (java.io.UnsupportedEncodingException e) {
+ rd = new BufferedReader(new InputStreamReader(is));
+ }
+
+ String factoryClassName = null;
+ try {
+ // XXX Does not handle all possible input as specified by the
+ // Jar Service Provider specification
+ factoryClassName = rd.readLine();
+ } catch (IOException x) {
+ // No provider found
+ return null;
+ }
+ finally {
+ try {
+ // try to close the reader.
+ rd.close();
+ }
+ // Ignore the exception.
+ catch (IOException exc) {}
+ }
+
+ if (factoryClassName != null &&
+ ! "".equals(factoryClassName)) {
+ if (DEBUG) debugPrintln("found in resource, value="
+ + factoryClassName);
+
+ // Note: here we do not want to fall back to the current
+ // ClassLoader because we want to avoid the case where the
+ // resource file was found using one ClassLoader and the
+ // provider class was instantiated using a different one.
+ return factoryClassName;
+ }
+
+ // No provider found
+ return null;
+ }
+
+} // class ObjectFactory
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/utils/SecuritySupport.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,166 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2002-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+/*
+ * $Id: SecuritySupport.java,v 1.1.2.1 2005/08/01 02:08:48 jeffsuttor Exp $
+ */
+
+package com.sun.org.apache.xalan.internal.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * This class is duplicated for each subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of any API.
+ *
+ * @xerces.internal
+ */
+public final class SecuritySupport {
+
+ private static final SecuritySupport securitySupport = new SecuritySupport();
+
+ /**
+ * Return an instance of this class.
+ */
+ public static SecuritySupport getInstance() {
+ return securitySupport;
+ }
+
+ static ClassLoader getContextClassLoader() {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader cl = null;
+ try {
+ cl = Thread.currentThread().getContextClassLoader();
+ } catch (SecurityException ex) { }
+ return cl;
+ }
+ });
+ }
+
+ static ClassLoader getSystemClassLoader() {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader cl = null;
+ try {
+ cl = ClassLoader.getSystemClassLoader();
+ } catch (SecurityException ex) {}
+ return cl;
+ }
+ });
+ }
+
+ static ClassLoader getParentClassLoader(final ClassLoader cl) {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader parent = null;
+ try {
+ parent = cl.getParent();
+ } catch (SecurityException ex) {}
+
+ // eliminate loops in case of the boot
+ // ClassLoader returning itself as a parent
+ return (parent == cl) ? null : parent;
+ }
+ });
+ }
+
+ public static String getSystemProperty(final String propName) {
+ return (String)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return System.getProperty(propName);
+ }
+ });
+ }
+
+ static FileInputStream getFileInputStream(final File file)
+ throws FileNotFoundException
+ {
+ try {
+ return (FileInputStream)
+ AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws FileNotFoundException {
+ return new FileInputStream(file);
+ }
+ });
+ } catch (PrivilegedActionException e) {
+ throw (FileNotFoundException)e.getException();
+ }
+ }
+ /**
+ * Return resource using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static InputStream getResourceAsStream(final String name) {
+ if (System.getSecurityManager()!=null) {
+ return getResourceAsStream(null, name);
+ } else {
+ return getResourceAsStream(ObjectFactory.findClassLoader(), name);
+ }
+ }
+
+ public static InputStream getResourceAsStream(final ClassLoader cl,
+ final String name)
+ {
+ return (InputStream)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ InputStream ris;
+ if (cl == null) {
+ ris = Object.class.getResourceAsStream("/"+name);
+ } else {
+ ris = cl.getResourceAsStream(name);
+ }
+ return ris;
+ }
+ });
+ }
+
+ static boolean getFileExists(final File f) {
+ return ((Boolean)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return f.exists() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ })).booleanValue();
+ }
+
+ static long getLastModified(final File f) {
+ return ((Long)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return new Long(f.lastModified());
+ }
+ })).longValue();
+ }
+
+ private SecuritySupport () {}
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/EnvironmentCheck.java Wed May 02 13:32:36 2012 +0100
@@ -22,6 +22,8 @@
*/
package com.sun.org.apache.xalan.internal.xslt;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
@@ -38,21 +40,21 @@
/**
* Utility class to report simple information about the environment.
- * Simplistic reporting about certain classes found in your JVM may
+ * Simplistic reporting about certain classes found in your JVM may
* help answer some FAQs for simple problems.
*
- * System.getProperty
+ * $java.home/lib/propertiesFilename
file
+ * META-INF/services/factoryId
file
+ *
* java com.sun.org.apache.xalan.internal.xslt.EnvironmentCheck [-out outFile]
*
- * boolean environmentOK =
+ * boolean environmentOK =
* (new EnvironmentCheck()).checkEnvironment(yourPrintWriter);
*
* <?xml version="1.0"?>
* <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
@@ -64,28 +66,28 @@
* </xsl:template>
* </xsl:stylesheet>
*
This dumps a simple header and then each of the entries in - * the Hashtable to our PrintWriter; it does special processing + *
This dumps a simple header and then each of the entries in + * the Hashtable to our PrintWriter; it does special processing * for entries that are .jars found in the classpath.
* * @param h Hashtable of items to report on; presumably * filled in by our various check*() methods - * @return true if your environment appears to have no major + * @return true if your environment appears to have no major * problems; false if potential environment problems found * @see #appendEnvironmentReport(Node, Document, Hashtable) * for an equivalent that appends to a Node instead @@ -264,7 +266,7 @@ "#---- BEGIN writeEnvironmentReport($Revision: 1.10 $): Useful stuff found: ----"); // Fake the Properties-like output - for (Enumeration keys = h.keys(); + for (Enumeration keys = h.keys(); keys.hasMoreElements(); /* no increment portion */ ) @@ -282,8 +284,8 @@ // ..normal processing for all other entries else { - // Note: we could just check for the ERROR key by itself, - // since we now set that, but since we have to go + // Note: we could just check for the ERROR key by itself, + // since we now set that, but since we have to go // through the whole hash anyway, do it this way, // which is safer for maintenance if (keyStr.startsWith(ERROR)) @@ -333,24 +335,24 @@ "serializer.jar", // Serializer (shared between Xalan & Xerces) "xerces.jar", // Xerces-J 1.x "xercesImpl.jar", // Xerces-J 2.x - "testxsl.jar", - "crimson.jar", - "lotusxsl.jar", - "jaxp.jar", "parser.jar", "dom.jar", "sax.jar", "xml.jar", + "testxsl.jar", + "crimson.jar", + "lotusxsl.jar", + "jaxp.jar", "parser.jar", "dom.jar", "sax.jar", "xml.jar", "xml-apis.jar", "xsltc.jar" }; /** - * Print out report of .jars found in a classpath. + * Print out report of .jars found in a classpath. * - * Takes the information encoded from a checkPathForJars() + * Takes the information encoded from a checkPathForJars() * call and dumps it out to our PrintWriter. * * @param v Vector of Hashtables of .jar file info * @param desc description to print out in header * - * @return false if OK, true if any .jars were reported + * @return false if OK, true if any .jars were reported * as having errors * @see #checkPathForJars(String, String[]) */ @@ -368,7 +370,7 @@ { Hashtable subhash = (Hashtable) v.elementAt(i); - for (Enumeration keys = subhash.keys(); + for (Enumeration keys = subhash.keys(); keys.hasMoreElements(); /* no increment portion */ ) @@ -398,10 +400,10 @@ } /** - * Stylesheet extension entrypoint: Dump a basic Xalan - * environment report from getEnvironmentHash() to a Node. - * - *Copy of writeEnvironmentReport that creates a Node suitable + * Stylesheet extension entrypoint: Dump a basic Xalan + * environment report from getEnvironmentHash() to a Node. + * + *
Copy of writeEnvironmentReport that creates a Node suitable * for other processing instead of a properties-like text output. *
* @param container Node to append our report to @@ -416,7 +418,7 @@ { return; } - + try { Element envCheckNode = factory.createElement("EnvironmentCheck"); @@ -436,8 +438,8 @@ Element hashNode = factory.createElement("environment"); envCheckNode.appendChild(hashNode); - - for (Enumeration keys = h.keys(); + + for (Enumeration keys = h.keys(); keys.hasMoreElements(); /* no increment portion */ ) @@ -454,10 +456,10 @@ errors |= appendFoundJars(hashNode, factory, v, keyStr); } // ..normal processing for all other entries - else + else { - // Note: we could just check for the ERROR key by itself, - // since we now set that, but since we have to go + // Note: we could just check for the ERROR key by itself, + // since we now set that, but since we have to go // through the whole hash anyway, do it this way, // which is safer for maintenance if (keyStr.startsWith(ERROR)) @@ -489,12 +491,12 @@ System.err.println("appendEnvironmentReport threw: " + e2.toString()); e2.printStackTrace(); } - } + } /** - * Print out report of .jars found in a classpath. + * Print out report of .jars found in a classpath. * - * Takes the information encoded from a checkPathForJars() + * Takes the information encoded from a checkPathForJars() * call and dumps it out to our PrintWriter. * * @param container Node to append our report to @@ -502,11 +504,11 @@ * @param v Vector of Hashtables of .jar file info * @param desc description to print out in header * - * @return false if OK, true if any .jars were reported + * @return false if OK, true if any .jars were reported * as having errors * @see #checkPathForJars(String, String[]) */ - protected boolean appendFoundJars(Node container, Document factory, + protected boolean appendFoundJars(Node container, Document factory, Vector v, String desc) { @@ -519,7 +521,7 @@ { Hashtable subhash = (Hashtable) v.elementAt(i); - for (Enumeration keys = subhash.keys(); + for (Enumeration keys = subhash.keys(); keys.hasMoreElements(); /* no increment portion */ ) @@ -551,12 +553,12 @@ } /** - * Fillin hash with info about SystemProperties. + * Fillin hash with info about SystemProperties. * - * Logs java.class.path and other likely paths; then attempts + * Logs java.class.path and other likely paths; then attempts * to search those paths for .jar files with Xalan-related classes. * - * //@todo NOTE: We don't actually search java.ext.dirs for + * //@todo NOTE: We don't actually search java.ext.dirs for * // *.jar files therein! This should be updated * * @param h Hashtable to put information in @@ -613,7 +615,7 @@ h.put(FOUNDCLASSES + "sun.boot.class.path", classpathJars); } - //@todo NOTE: We don't actually search java.ext.dirs for + //@todo NOTE: We don't actually search java.ext.dirs for // *.jar files therein! This should be updated othercp = System.getProperty("java.ext.dirs"); @@ -641,11 +643,11 @@ } /** - * Cheap-o listing of specified .jars found in the classpath. + * Cheap-o listing of specified .jars found in the classpath. * - * cp should be separated by the usual File.pathSeparator. We - * then do a simplistic search of the path for any requested - * .jar filenames, and return a listing of their names and + * cp should be separated by the usual File.pathSeparator. We + * then do a simplistic search of the path for any requested + * .jar filenames, and return a listing of their names and * where (apparently) they came from. * * @param cp classpath to search @@ -682,20 +684,20 @@ if (f.exists()) { - // If any requested jarName exists, report on + // If any requested jarName exists, report on // the details of that .jar file try { Hashtable h = new Hashtable(2); // Note "-" char is looked for in appendFoundJars h.put(jars[i] + "-path", f.getAbsolutePath()); - + // We won't bother reporting on the xalan.jar apparent version // since this requires knowing the jar size of the xalan.jar - // before we build it. - // For other jars, eg. xml-apis.jar and xercesImpl.jar, we + // before we build it. + // For other jars, eg. xml-apis.jar and xercesImpl.jar, we // report the apparent version of the file we've found - if (!("xalan.jar".equalsIgnoreCase(jars[i]))) { + if (!("xalan.jar".equalsIgnoreCase(jars[i]))) { h.put(jars[i] + "-apparent.version", getApparentVersion(jars[i], f.length())); } @@ -711,7 +713,7 @@ { Hashtable h = new Hashtable(2); // Note "-" char is looked for in appendFoundJars - h.put(jars[i] + "-path", WARNING + " Classpath entry: " + h.put(jars[i] + "-path", WARNING + " Classpath entry: " + filename + " does not exist"); h.put(jars[i] + "-apparent.version", CLASS_NOTPRESENT); v.addElement(h); @@ -724,12 +726,12 @@ } /** - * Cheap-o method to determine the product version of a .jar. + * Cheap-o method to determine the product version of a .jar. * - * Currently does a lookup into a local table of some recent - * shipped Xalan builds to determine where the .jar probably - * came from. Note that if you recompile Xalan or Xerces - * yourself this will likely report a potential error, since + * Currently does a lookup into a local table of some recent + * shipped Xalan builds to determine where the .jar probably + * came from. Note that if you recompile Xalan or Xerces + * yourself this will likely report a potential error, since * we can't certify builds other than the ones we ship. * Only reports against selected posted Xalan-J builds. * @@ -738,12 +740,12 @@ * @param jarName base filename of the .jarfile * @param jarSize size of the .jarfile * - * @return String describing where the .jar file probably + * @return String describing where the .jar file probably * came from */ protected String getApparentVersion(String jarName, long jarSize) { - // If we found a matching size and it's for our + // If we found a matching size and it's for our // jar, then return it's description // Lookup in static jarVersions Hashtable String foundSize = (String) jarVersions.get(new Long(jarSize)); @@ -760,7 +762,7 @@ { // For xalan.jar and xerces.jar/xercesImpl.jar, which we ship together: - // The jar is not from a shipped copy of xalan-j, so + // The jar is not from a shipped copy of xalan-j, so // it's up to the user to ensure that it's compatible return jarName + " " + WARNING + CLASS_PRESENT; } @@ -776,8 +778,8 @@ /** * Report version information about JAXP interfaces. * - * Currently distinguishes between JAXP 1.0.1 and JAXP 1.1, - * and not found; only tests the interfaces, and does not + * Currently distinguishes between JAXP 1.0.1 and JAXP 1.1, + * and not found; only tests the interfaces, and does not * check for reference implementation versions. * * @param h Hashtable to put information in @@ -794,8 +796,7 @@ { final String JAXP1_CLASS = "javax.xml.stream.XMLStreamConstants"; - clazz = ObjectFactory.findProviderClass( - JAXP1_CLASS, ObjectFactory.findClassLoader(), true); + clazz = ObjectFactory.findProviderClass(JAXP1_CLASS, true); // If we succeeded, we have JAXP 1.4 available h.put(VERSION + "JAXP", "1.4"); @@ -825,8 +826,7 @@ final String XALAN1_VERSION_CLASS = "com.sun.org.apache.xalan.internal.xslt.XSLProcessorVersion"; - Class clazz = ObjectFactory.findProviderClass( - XALAN1_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(XALAN1_VERSION_CLASS, true); // Found Xalan-J 1.x, grab it's version fields StringBuffer buf = new StringBuffer(); @@ -853,13 +853,12 @@ try { - // NOTE: This is the old Xalan 2.0, 2.1, 2.2 version class, + // NOTE: This is the old Xalan 2.0, 2.1, 2.2 version class, // is being replaced by class below final String XALAN2_VERSION_CLASS = "com.sun.org.apache.xalan.internal.processor.XSLProcessorVersion"; - Class clazz = ObjectFactory.findProviderClass( - XALAN2_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(XALAN2_VERSION_CLASS, true); // Found Xalan-J 2.x, grab it's version fields StringBuffer buf = new StringBuffer(); @@ -880,8 +879,7 @@ final String XALAN2_2_VERSION_METHOD = "getVersion"; final Class noArgs[] = new Class[0]; - Class clazz = ObjectFactory.findProviderClass( - XALAN2_2_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(XALAN2_2_VERSION_CLASS, true); Method method = clazz.getMethod(XALAN2_2_VERSION_METHOD, noArgs); Object returnValue = method.invoke(null, new Object[0]); @@ -913,8 +911,7 @@ { final String XERCES1_VERSION_CLASS = "com.sun.org.apache.xerces.internal.framework.Version"; - Class clazz = ObjectFactory.findProviderClass( - XERCES1_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(XERCES1_VERSION_CLASS, true); // Found Xerces-J 1.x, grab it's version fields Field f = clazz.getField("fVersion"); @@ -932,8 +929,7 @@ { final String XERCES2_VERSION_CLASS = "com.sun.org.apache.xerces.internal.impl.Version"; - Class clazz = ObjectFactory.findProviderClass( - XERCES2_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(XERCES2_VERSION_CLASS, true); // Found Xerces-J 2.x, grab it's version fields Field f = clazz.getField("fVersion"); @@ -950,8 +946,7 @@ { final String CRIMSON_CLASS = "org.apache.crimson.parser.Parser2"; - Class clazz = ObjectFactory.findProviderClass( - CRIMSON_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(CRIMSON_CLASS, true); //@todo determine specific crimson version h.put(VERSION + "crimson", CLASS_PRESENT); @@ -979,8 +974,7 @@ final String ANT_VERSION_METHOD = "getAntVersion"; // noArgs final Class noArgs[] = new Class[0]; - Class clazz = ObjectFactory.findProviderClass( - ANT_VERSION_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(ANT_VERSION_CLASS, true); Method method = clazz.getMethod(ANT_VERSION_METHOD, noArgs); Object returnValue = method.invoke(null, new Object[0]); @@ -994,7 +988,7 @@ } /** - * Report version info from DOM interfaces. + * Report version info from DOM interfaces. * * @param h Hashtable to put information in */ @@ -1009,8 +1003,7 @@ try { - Class clazz = ObjectFactory.findProviderClass( - DOM_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(DOM_CLASS, true); Method method = clazz.getMethod(DOM_LEVEL3_METHOD, null); @@ -1026,10 +1019,10 @@ } /** - * Report version info from DOM interfaces. + * Report version info from DOM interfaces. * - * Currently distinguishes between pre-DOM level 2, the DOM - * level 2 working draft, the DOM level 2 final draft, + * Currently distinguishes between pre-DOM level 2, the DOM + * level 2 working draft, the DOM level 2 final draft, * and not found. * * @param h Hashtable to put information in @@ -1052,21 +1045,19 @@ try { - Class clazz = ObjectFactory.findProviderClass( - DOM_LEVEL2_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(DOM_LEVEL2_CLASS, true); Method method = clazz.getMethod(DOM_LEVEL2_METHOD, twoStringArgs); - // If we succeeded, we have loaded interfaces from a + // If we succeeded, we have loaded interfaces from a // level 2 DOM somewhere h.put(VERSION + "DOM", "2.0"); try { - // Check for the working draft version, which is + // Check for the working draft version, which is // commonly found, but won't work anymore - clazz = ObjectFactory.findProviderClass( - DOM_LEVEL2WD_CLASS, ObjectFactory.findClassLoader(), true); + clazz = ObjectFactory.findProviderClass(DOM_LEVEL2WD_CLASS, true); method = clazz.getMethod(DOM_LEVEL2WD_METHOD, twoStringArgs); @@ -1078,8 +1069,7 @@ try { // Check for the final draft version as well - clazz = ObjectFactory.findProviderClass( - DOM_LEVEL2FD_CLASS, ObjectFactory.findClassLoader(), true); + clazz = ObjectFactory.findProviderClass(DOM_LEVEL2FD_CLASS, true); method = clazz.getMethod(DOM_LEVEL2FD_METHOD, twoStringArgs); @@ -1100,15 +1090,15 @@ } //@todo load an actual DOM implmementation and query it as well - //@todo load an actual DOM implmementation and check if - // isNamespaceAware() == true, which is needed to parse + //@todo load an actual DOM implmementation and check if + // isNamespaceAware() == true, which is needed to parse // xsl stylesheet files into a DOM } /** - * Report version info from SAX interfaces. + * Report version info from SAX interfaces. * - * Currently distinguishes between SAX 2, SAX 2.0beta2, + * Currently distinguishes between SAX 2, SAX 2.0beta2, * SAX1, and not found. * * @param h Hashtable to put information in @@ -1131,14 +1121,13 @@ try { - // This method was only added in the final SAX 2.0 release; + // This method was only added in the final SAX 2.0 release; // see changes.html "Changes from SAX 2.0beta2 to SAX 2.0prerelease" - Class clazz = ObjectFactory.findProviderClass( - SAX_VERSION2BETA_CLASSNF, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(SAX_VERSION2BETA_CLASSNF, true); Method method = clazz.getMethod(SAX_VERSION2BETA_METHODNF, attributesArg); - // If we succeeded, we have loaded interfaces from a + // If we succeeded, we have loaded interfaces from a // real, final SAX version 2.0 somewhere h.put(VERSION + "SAX", "2.0"); } @@ -1148,17 +1137,16 @@ h.put(ERROR + VERSION + "SAX", "ERROR attempting to load SAX version 2 class: " + e.toString()); h.put(ERROR, ERROR_FOUND); - + try { - Class clazz = ObjectFactory.findProviderClass( - SAX_VERSION2_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(SAX_VERSION2_CLASS, true); Method method = clazz.getMethod(SAX_VERSION2_METHOD, oneStringArg); - // If we succeeded, we have loaded interfaces from a - // SAX version 2.0beta2 or earlier; these might work but - // you should really have the final SAX 2.0 + // If we succeeded, we have loaded interfaces from a + // SAX version 2.0beta2 or earlier; these might work but + // you should really have the final SAX 2.0 h.put(VERSION + "SAX-backlevel", "2.0beta2-or-earlier"); } catch (Exception e2) @@ -1167,16 +1155,15 @@ h.put(ERROR + VERSION + "SAX", "ERROR attempting to load SAX version 2 class: " + e.toString()); h.put(ERROR, ERROR_FOUND); - + try { - Class clazz = ObjectFactory.findProviderClass( - SAX_VERSION1_CLASS, ObjectFactory.findClassLoader(), true); + Class clazz = ObjectFactory.findProviderClass(SAX_VERSION1_CLASS, true); Method method = clazz.getMethod(SAX_VERSION1_METHOD, oneStringArg); - // If we succeeded, we have loaded interfaces from a - // SAX version 1.0 somewhere; which won't work very + // If we succeeded, we have loaded interfaces from a + // SAX version 1.0 somewhere; which won't work very // well for JAXP 1.1 or beyond! h.put(VERSION + "SAX-backlevel", "1.0"); } @@ -1186,14 +1173,14 @@ // Note that either 1.0 or no SAX are both errors h.put(ERROR + VERSION + "SAX-backlevel", "ERROR attempting to load SAX version 1 class: " + e3.toString()); - + } } } } - /** - * Manual table of known .jar sizes. + /** + * Manual table of known .jar sizes. * Only includes shipped versions of certain projects. * key=jarsize, value=jarname ' from ' distro name * Note assumption: two jars cannot have the same size! @@ -1202,13 +1189,13 @@ */ private static Hashtable jarVersions = new Hashtable(); - /** - * Static initializer for jarVersions table. + /** + * Static initializer for jarVersions table. * Doing this just once saves time and space. * * @see #getApparentVersion(String, long) */ - static + static { // Note: hackish Hashtable, this could use improvement jarVersions.put(new Long(857192), "xalan.jar from xalan-j_1_1"); @@ -1224,19 +1211,19 @@ jarVersions.put(new Long(905872), "xalan.jar from xalan-j_2_3_D1"); jarVersions.put(new Long(906122), "xalan.jar from xalan-j_2_3_0"); jarVersions.put(new Long(906248), "xalan.jar from xalan-j_2_3_1"); - jarVersions.put(new Long(983377), "xalan.jar from xalan-j_2_4_D1"); + jarVersions.put(new Long(983377), "xalan.jar from xalan-j_2_4_D1"); jarVersions.put(new Long(997276), "xalan.jar from xalan-j_2_4_0"); - jarVersions.put(new Long(1031036), "xalan.jar from xalan-j_2_4_1"); - // Stop recording xalan.jar sizes as of Xalan Java 2.5.0 + jarVersions.put(new Long(1031036), "xalan.jar from xalan-j_2_4_1"); + // Stop recording xalan.jar sizes as of Xalan Java 2.5.0 jarVersions.put(new Long(596540), "xsltc.jar from xalan-j_2_2_0"); jarVersions.put(new Long(590247), "xsltc.jar from xalan-j_2_3_D1"); jarVersions.put(new Long(589914), "xsltc.jar from xalan-j_2_3_0"); jarVersions.put(new Long(589915), "xsltc.jar from xalan-j_2_3_1"); - jarVersions.put(new Long(1306667), "xsltc.jar from xalan-j_2_4_D1"); + jarVersions.put(new Long(1306667), "xsltc.jar from xalan-j_2_4_D1"); jarVersions.put(new Long(1328227), "xsltc.jar from xalan-j_2_4_0"); jarVersions.put(new Long(1344009), "xsltc.jar from xalan-j_2_4_1"); - jarVersions.put(new Long(1348361), "xsltc.jar from xalan-j_2_5_D1"); + jarVersions.put(new Long(1348361), "xsltc.jar from xalan-j_2_5_D1"); // Stop recording xsltc.jar sizes as of Xalan Java 2.5.0 jarVersions.put(new Long(1268634), "xsltc.jar-bundled from xalan-j_2_3_0"); @@ -1249,7 +1236,7 @@ jarVersions.put(new Long(124724), "xml-apis.jar from tck-jaxp-1_2_0 branch of xml-commons, tag: xml-commons-external_1_2_01"); jarVersions.put(new Long(194205), "xml-apis.jar from head branch of xml-commons, tag: xml-commons-external_1_3_02"); - // If the below were more common I would update it to report + // If the below were more common I would update it to report // errors better; but this is so old hardly anyone has it jarVersions.put(new Long(424490), "xalan.jar from Xerces Tools releases - ERROR:DO NOT USE!"); @@ -1267,23 +1254,23 @@ jarVersions.put(new Long(1812019), "xerces.jar from xalan-j_2_2_0"); jarVersions.put(new Long(1720292), "xercesImpl.jar from xalan-j_2_3_D1"); jarVersions.put(new Long(1730053), "xercesImpl.jar from xalan-j_2_3_0 or xalan-j_2_3_1 from xerces-2_0_0"); - jarVersions.put(new Long(1728861), "xercesImpl.jar from xalan-j_2_4_D1 from xerces-2_0_1"); + jarVersions.put(new Long(1728861), "xercesImpl.jar from xalan-j_2_4_D1 from xerces-2_0_1"); jarVersions.put(new Long(972027), "xercesImpl.jar from xalan-j_2_4_0 from xerces-2_1"); - jarVersions.put(new Long(831587), "xercesImpl.jar from xalan-j_2_4_1 from xerces-2_2"); - jarVersions.put(new Long(891817), "xercesImpl.jar from xalan-j_2_5_D1 from xerces-2_3"); + jarVersions.put(new Long(831587), "xercesImpl.jar from xalan-j_2_4_1 from xerces-2_2"); + jarVersions.put(new Long(891817), "xercesImpl.jar from xalan-j_2_5_D1 from xerces-2_3"); jarVersions.put(new Long(895924), "xercesImpl.jar from xerces-2_4"); - jarVersions.put(new Long(1010806), "xercesImpl.jar from Xerces-J-bin.2.6.2"); - jarVersions.put(new Long(1203860), "xercesImpl.jar from Xerces-J-bin.2.7.1"); + jarVersions.put(new Long(1010806), "xercesImpl.jar from Xerces-J-bin.2.6.2"); + jarVersions.put(new Long(1203860), "xercesImpl.jar from Xerces-J-bin.2.7.1"); jarVersions.put(new Long(37485), "xalanj1compat.jar from xalan-j_2_0_0"); jarVersions.put(new Long(38100), "xalanj1compat.jar from xalan-j_2_0_1"); jarVersions.put(new Long(18779), "xalanservlet.jar from xalan-j_2_0_0"); jarVersions.put(new Long(21453), "xalanservlet.jar from xalan-j_2_0_1"); - jarVersions.put(new Long(24826), "xalanservlet.jar from xalan-j_2_3_1 or xalan-j_2_4_1"); + jarVersions.put(new Long(24826), "xalanservlet.jar from xalan-j_2_3_1 or xalan-j_2_4_1"); jarVersions.put(new Long(24831), "xalanservlet.jar from xalan-j_2_4_1"); // Stop recording xalanservlet.jar sizes as of Xalan Java 2.5.0; now a .war file - + // For those who've downloaded JAXP from sun jarVersions.put(new Long(5618), "jaxp.jar from jaxp1.0.1"); jarVersions.put(new Long(136133), "parser.jar from jaxp1.0.1"); @@ -1305,7 +1292,7 @@ protected PrintWriter outWriter = new PrintWriter(System.out, true); /** - * Bottleneck output: calls outWriter.println(s). + * Bottleneck output: calls outWriter.println(s). * @param s String to print */ protected void logMsg(String s) diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/ObjectFactory.java --- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/ObjectFactory.java Wed May 02 13:32:36 2012 +0100 @@ -39,12 +39,12 @@ ** This code is designed to implement the JAXP 1.1 spec pluggability * feature and is designed to run on JDK version 1.1 and - * later, and to compile on JDK 1.2 and onward. + * later, and to compile on JDK 1.2 and onward. * The code also runs both as part of an unbundled jar file and * when bundled as part of the JDK. *
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:41:00 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 2276082712114762609L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/Process.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/Process.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xslt/Process.java Wed May 02 13:32:36 2012 +0100
@@ -55,6 +55,8 @@
import com.sun.org.apache.xalan.internal.Version;
import com.sun.org.apache.xalan.internal.res.XSLMessages;
import com.sun.org.apache.xalan.internal.res.XSLTErrorResources;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import com.sun.org.apache.xalan.internal.utils.ConfigurationError;
//J2SE does not support Xalan interpretive
/*
@@ -457,12 +459,11 @@
{
try
{
- uriResolver = (URIResolver) ObjectFactory.newInstance(
- argv[++i], ObjectFactory.findClassLoader(), true);
+ uriResolver = (URIResolver) ObjectFactory.newInstance(argv[++i], true);
tfactory.setURIResolver(uriResolver);
}
- catch (ObjectFactory.ConfigurationError cnfe)
+ catch (ConfigurationError cnfe)
{
msg = XSLMessages.createMessage(
XSLTErrorResources.ER_CLASS_NOT_FOUND_FOR_OPTION,
@@ -486,10 +487,9 @@
{
try
{
- entityResolver = (EntityResolver) ObjectFactory.newInstance(
- argv[++i], ObjectFactory.findClassLoader(), true);
+ entityResolver = (EntityResolver) ObjectFactory.newInstance(argv[++i], true);
}
- catch (ObjectFactory.ConfigurationError cnfe)
+ catch (ConfigurationError cnfe)
{
msg = XSLMessages.createMessage(
XSLTErrorResources.ER_CLASS_NOT_FOUND_FOR_OPTION,
@@ -514,10 +514,9 @@
{
try
{
- contentHandler = (ContentHandler) ObjectFactory.newInstance(
- argv[++i], ObjectFactory.findClassLoader(), true);
+ contentHandler = (ContentHandler) ObjectFactory.newInstance(argv[++i], true);
}
- catch (ObjectFactory.ConfigurationError cnfe)
+ catch (ConfigurationError cnfe)
{
msg = XSLMessages.createMessage(
XSLTErrorResources.ER_CLASS_NOT_FOUND_FOR_OPTION,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/Translet.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/Translet.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/Translet.java Wed May 02 13:32:36 2012 +0100
@@ -51,4 +51,7 @@
public String[] getUrisArray();
public int[] getTypesArray();
public String[] getNamespaceArray();
+ public boolean useServicesMechnism();
+ public void setServicesMechnism(boolean flag);
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/TransletException.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/TransletException.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/TransletException.java Wed May 02 13:32:36 2012 +0100
@@ -34,15 +34,15 @@
static final long serialVersionUID = -878916829521217293L;
public TransletException() {
- super("Translet error");
+ super("Translet error");
}
-
+
public TransletException(Exception e) {
- super(e.toString());
+ super(e.toString());
initCause(e);
}
-
+
public TransletException(String message) {
- super(message);
+ super(message);
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Compile.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Compile.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Compile.java Wed May 02 13:32:36 2012 +0100
@@ -44,26 +44,25 @@
private static int VERSION_MAJOR = 1;
private static int VERSION_MINOR = 4;
private static int VERSION_DELTA = 0;
-
-
-
- // This variable should be set to false to prevent any methods in this
+
+
+
+ // This variable should be set to false to prevent any methods in this
// class from calling System.exit(). As this is a command-line tool,
// calling System.exit() is normally OK, but we also want to allow for
// this class being used in other ways as well.
- private static boolean _allowExit = true;
-
+ private static boolean _allowExit = true;
+
public static void printUsage() {
- StringBuffer vers = new StringBuffer("XSLTC version " +
- VERSION_MAJOR + "." + VERSION_MINOR +
- ((VERSION_DELTA > 0) ? ("."+VERSION_DELTA) : ("")));
- System.err.println(vers + "\n" +
- new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR));
- if (_allowExit) System.exit(-1);
+ System.err.println("XSLTC version " +
+ VERSION_MAJOR + "." + VERSION_MINOR +
+ ((VERSION_DELTA > 0) ? ("." + VERSION_DELTA) : ("")) + "\n" +
+ new ErrorMsg(ErrorMsg.COMPILE_USAGE_STR));
+ if (_allowExit) System.exit(-1);
}
- /**
+ /**
* This method implements the command line compiler. See the USAGE_STRING
* constant for a description. It may make sense to move the command-line
* handling to a separate package (ie. make one xsltc.cmdline.Compiler
@@ -71,101 +70,101 @@
* class that contains the DefaultRun stuff).
*/
public static void main(String[] args) {
- try {
- boolean inputIsURL = false;
- boolean useStdIn = false;
- boolean classNameSet = false;
- final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsinv");
- if (args.length < 1) printUsage();
+ try {
+ boolean inputIsURL = false;
+ boolean useStdIn = false;
+ boolean classNameSet = false;
+ final GetOpt getopt = new GetOpt(args, "o:d:j:p:uxhsinv");
+ if (args.length < 1) printUsage();
- final XSLTC xsltc = new XSLTC();
- xsltc.init();
+ final XSLTC xsltc = new XSLTC(true);
+ xsltc.init();
- int c;
- while ((c = getopt.getNextOption()) != -1) {
- switch(c) {
- case 'i':
- useStdIn = true;
- break;
- case 'o':
- xsltc.setClassName(getopt.getOptionArg());
- classNameSet = true;
- break;
- case 'd':
- xsltc.setDestDirectory(getopt.getOptionArg());
- break;
- case 'p':
- xsltc.setPackageName(getopt.getOptionArg());
- break;
- case 'j':
- xsltc.setJarFileName(getopt.getOptionArg());
- break;
- case 'x':
- xsltc.setDebug(true);
- break;
- case 'u':
- inputIsURL = true;
- break;
- case 's':
- _allowExit = false;
- break;
- case 'n':
- xsltc.setTemplateInlining(true); // used to be 'false'
- break;
- case 'v':
- // fall through to case h
- case 'h':
- default:
- printUsage();
- break;
- }
- }
+ int c;
+ while ((c = getopt.getNextOption()) != -1) {
+ switch(c) {
+ case 'i':
+ useStdIn = true;
+ break;
+ case 'o':
+ xsltc.setClassName(getopt.getOptionArg());
+ classNameSet = true;
+ break;
+ case 'd':
+ xsltc.setDestDirectory(getopt.getOptionArg());
+ break;
+ case 'p':
+ xsltc.setPackageName(getopt.getOptionArg());
+ break;
+ case 'j':
+ xsltc.setJarFileName(getopt.getOptionArg());
+ break;
+ case 'x':
+ xsltc.setDebug(true);
+ break;
+ case 'u':
+ inputIsURL = true;
+ break;
+ case 's':
+ _allowExit = false;
+ break;
+ case 'n':
+ xsltc.setTemplateInlining(true); // used to be 'false'
+ break;
+ case 'v':
+ // fall through to case h
+ case 'h':
+ default:
+ printUsage();
+ break;
+ }
+ }
- boolean compileOK;
+ boolean compileOK;
- if (useStdIn) {
- if (!classNameSet) {
- System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
+ if (useStdIn) {
+ if (!classNameSet) {
+ System.err.println(new ErrorMsg(ErrorMsg.COMPILE_STDIN_ERR));
if (_allowExit) System.exit(-1);
- }
- compileOK = xsltc.compile(System.in, xsltc.getClassName());
- }
- else {
- // Generate a vector containg URLs for all stylesheets specified
- final String[] stylesheetNames = getopt.getCmdArgs();
- final Vector stylesheetVector = new Vector();
- for (int i = 0; i < stylesheetNames.length; i++) {
- final String name = stylesheetNames[i];
- URL url;
- if (inputIsURL)
- url = new URL(name);
- else
- url = (new File(name)).toURI().toURL();
- stylesheetVector.addElement(url);
- }
- compileOK = xsltc.compile(stylesheetVector);
- }
+ }
+ compileOK = xsltc.compile(System.in, xsltc.getClassName());
+ }
+ else {
+ // Generate a vector containg URLs for all stylesheets specified
+ final String[] stylesheetNames = getopt.getCmdArgs();
+ final Vector stylesheetVector = new Vector();
+ for (int i = 0; i < stylesheetNames.length; i++) {
+ final String name = stylesheetNames[i];
+ URL url;
+ if (inputIsURL)
+ url = new URL(name);
+ else
+ url = (new File(name)).toURI().toURL();
+ stylesheetVector.addElement(url);
+ }
+ compileOK = xsltc.compile(stylesheetVector);
+ }
- // Compile the stylesheet and output class/jar file(s)
- if (compileOK) {
- xsltc.printWarnings();
- if (xsltc.getJarFileName() != null) xsltc.outputToJar();
- if (_allowExit) System.exit(0);
- }
- else {
- xsltc.printWarnings();
- xsltc.printErrors();
- if (_allowExit) System.exit(-1);
- }
- }
- catch (GetOptsException ex) {
- System.err.println(ex);
- printUsage(); // exits with code '-1'
- }
- catch (Exception e) {
- e.printStackTrace();
+ // Compile the stylesheet and output class/jar file(s)
+ if (compileOK) {
+ xsltc.printWarnings();
+ if (xsltc.getJarFileName() != null) xsltc.outputToJar();
+ if (_allowExit) System.exit(0);
+ }
+ else {
+ xsltc.printWarnings();
+ xsltc.printErrors();
+ if (_allowExit) System.exit(-1);
+ }
+ }
+ catch (GetOptsException ex) {
+ System.err.println(ex);
+ printUsage(); // exits with code '-1'
+ }
+ catch (Exception e) {
+ e.printStackTrace();
if (_allowExit) System.exit(-1);
- }
+ }
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability * feature and is designed to run on JDK version 1.1 and - * later, and to compile on JDK 1.2 and onward. + * later, and to compile on JDK 1.2 and onward. * The code also runs both as part of an unbundled jar file and * when bundled as part of the JDK. *
* This class was moved from the
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the The
+ * {@link MethodGen#addLocalVariable(String,Type,InstructionHandle,InstructionHandle)}
+ * and
+ * {@link MethodGen#addLocalVariable(String,Type,int,InstructionHandle,InstructionHandle)}
+ * methods of {@link MethodGen} will only keep track of
+ * {@link LocalVariableGen} object until it'ss removed by a call to
+ * {@link MethodGen#removeLocalVariable(LocalVariableGen)}. In order to support efficient copying of local variables to outlined
+ * methods by
+ * {@link #outline(InstructionHandle,InstructionHandle,String,ClassGenerator)},
+ * this class keeps track of all local variables defined by the method. A If only one registration of use of a particular slot occurs, the
+ * corresponding entry of Preconditions:
+ * Find which {@link LocalVariableGen}, if any, is registered for a
+ * particular JVM local stack frame slot at a particular position in the
+ * byte code for the method. Preconditions:
+ * javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:41:02 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -6072257854297546607L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Transform.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Transform.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/cmdline/Transform.java Wed May 02 13:32:36 2012 +0100
@@ -49,6 +49,7 @@
import com.sun.org.apache.xalan.internal.xsltc.StripFilter;
import com.sun.org.apache.xml.internal.dtm.DTMWSFilter;
import com.sun.org.apache.xalan.internal.xsltc.dom.DOMWSFilter;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
* @author Jacek Ambroziak
@@ -97,8 +98,7 @@
private void doTransform() {
try {
- final Class clazz = ObjectFactory.findProviderClass(
- _className, ObjectFactory.findClassLoader(), true);
+ final Class clazz = ObjectFactory.findProviderClass(_className, true);
final AbstractTranslet translet = (AbstractTranslet)clazz.newInstance();
translet.postInitialization();
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsoluteLocationPath.java Wed May 02 13:32:36 2012 +0100
@@ -106,13 +106,15 @@
LocalVariableGen relPathIterator
= methodGen.addLocalVariable("abs_location_path_tmp",
Util.getJCRefType(NODE_ITERATOR_SIG),
- il.getEnd(), null);
- il.append(new ASTORE(relPathIterator.getIndex()));
+ null, null);
+ relPathIterator.setStart(
+ il.append(new ASTORE(relPathIterator.getIndex())));
// Create new AbsoluteIterator
il.append(new NEW(cpg.addClass(ABSOLUTE_ITERATOR)));
il.append(DUP);
- il.append(new ALOAD(relPathIterator.getIndex()));
+ relPathIterator.setEnd(
+ il.append(new ALOAD(relPathIterator.getIndex())));
// Initialize AbsoluteIterator with iterator from the stack
il.append(new INVOKESPECIAL(initAI));
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AbsolutePathPattern.java Wed May 02 13:32:36 2012 +0100
@@ -87,9 +87,9 @@
// absolute path pattern temporary
methodGen.addLocalVariable2("apptmp",
Util.getJCRefType(NODE_SIG),
- il.getEnd());
+ null);
il.append(DUP);
- il.append(new ISTORE(local.getIndex()));
+ local.setStart(il.append(new ISTORE(local.getIndex())));
_left.translate(classGen, methodGen);
il.append(methodGen.loadDOM());
local.setEnd(il.append(new ILOAD(local.getIndex())));
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java Wed May 02 13:32:36 2012 +0100
@@ -192,11 +192,7 @@
final InstructionList il = methodGen.getInstructionList();
il.append(RETURN);
- methodGen.stripAttributes(true);
- methodGen.setMaxLocals();
- methodGen.setMaxStack();
- methodGen.removeNOPs();
- classGen.addMethod(methodGen.getMethod());
+ classGen.addMethod(methodGen);
}
public String toString() {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/CallTemplate.java Wed May 02 13:32:36 2012 +0100
@@ -64,14 +64,14 @@
private Template _calleeTemplate = null;
public void display(int indent) {
- indent(indent);
- System.out.print("CallTemplate");
- Util.println(" name " + _name);
- displayContents(indent + IndentIncrement);
+ indent(indent);
+ System.out.print("CallTemplate");
+ Util.println(" name " + _name);
+ displayContents(indent + IndentIncrement);
}
public boolean hasWithParams() {
- return elementCount() > 0;
+ return elementCount() > 0;
}
public void parseContents(Parser parser) {
@@ -86,72 +86,72 @@
else {
reportError(this, parser, ErrorMsg.REQUIRED_ATTR_ERR, "name");
}
- parseChildren(parser);
+ parseChildren(parser);
}
/**
* Verify that a template with this name exists.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
- final Template template = stable.lookupTemplate(_name);
- if (template != null) {
- typeCheckContents(stable);
- }
- else {
- ErrorMsg err = new ErrorMsg(ErrorMsg.TEMPLATE_UNDEF_ERR,_name,this);
- throw new TypeCheckError(err);
- }
- return Type.Void;
+ final Template template = stable.lookupTemplate(_name);
+ if (template != null) {
+ typeCheckContents(stable);
+ }
+ else {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.TEMPLATE_UNDEF_ERR,_name,this);
+ throw new TypeCheckError(err);
+ }
+ return Type.Void;
}
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
- final Stylesheet stylesheet = classGen.getStylesheet();
- final ConstantPoolGen cpg = classGen.getConstantPool();
- final InstructionList il = methodGen.getInstructionList();
+ final Stylesheet stylesheet = classGen.getStylesheet();
+ final ConstantPoolGen cpg = classGen.getConstantPool();
+ final InstructionList il = methodGen.getInstructionList();
// If there are Params in the stylesheet or WithParams in this call?
- if (stylesheet.hasLocalParams() || hasContents()) {
- _calleeTemplate = getCalleeTemplate();
+ if (stylesheet.hasLocalParams() || hasContents()) {
+ _calleeTemplate = getCalleeTemplate();
- // Build the parameter list if the called template is simple named
- if (_calleeTemplate != null) {
- buildParameterList();
- }
- // This is only needed when the called template is not
- // a simple named template.
- else {
- // Push parameter frame
- final int push = cpg.addMethodref(TRANSLET_CLASS,
- PUSH_PARAM_FRAME,
- PUSH_PARAM_FRAME_SIG);
- il.append(classGen.loadTranslet());
- il.append(new INVOKEVIRTUAL(push));
- translateContents(classGen, methodGen);
- }
- }
+ // Build the parameter list if the called template is simple named
+ if (_calleeTemplate != null) {
+ buildParameterList();
+ }
+ // This is only needed when the called template is not
+ // a simple named template.
+ else {
+ // Push parameter frame
+ final int push = cpg.addMethodref(TRANSLET_CLASS,
+ PUSH_PARAM_FRAME,
+ PUSH_PARAM_FRAME_SIG);
+ il.append(classGen.loadTranslet());
+ il.append(new INVOKEVIRTUAL(push));
+ translateContents(classGen, methodGen);
+ }
+ }
// Generate a valid Java method name
- final String className = stylesheet.getClassName();
+ final String className = stylesheet.getClassName();
String methodName = Util.escape(_name.toString());
// Load standard arguments
- il.append(classGen.loadTranslet());
- il.append(methodGen.loadDOM());
- il.append(methodGen.loadIterator());
- il.append(methodGen.loadHandler());
- il.append(methodGen.loadCurrentNode());
+ il.append(classGen.loadTranslet());
+ il.append(methodGen.loadDOM());
+ il.append(methodGen.loadIterator());
+ il.append(methodGen.loadHandler());
+ il.append(methodGen.loadCurrentNode());
// Initialize prefix of method signature
- StringBuffer methodSig = new StringBuffer("(" + DOM_INTF_SIG
+ StringBuffer methodSig = new StringBuffer("(" + DOM_INTF_SIG
+ NODE_ITERATOR_SIG + TRANSLET_OUTPUT_SIG + NODE_SIG);
// If calling a simply named template, push actual arguments
- if (_calleeTemplate != null) {
- Vector calleeParams = _calleeTemplate.getParameters();
- int numParams = _parameters.length;
+ if (_calleeTemplate != null) {
+ Vector calleeParams = _calleeTemplate.getParameters();
+ int numParams = _parameters.length;
- for (int i = 0; i < numParams; i++) {
- SyntaxTreeNode node = (SyntaxTreeNode)_parameters[i];
+ for (int i = 0; i < numParams; i++) {
+ SyntaxTreeNode node = (SyntaxTreeNode)_parameters[i];
methodSig.append(OBJECT_SIG); // append Object to signature
// Push 'null' if Param to indicate no actual parameter specified
@@ -165,21 +165,21 @@
}
// Complete signature and generate invokevirtual call
- methodSig.append(")V");
- il.append(new INVOKEVIRTUAL(cpg.addMethodref(className,
- methodName,
- methodSig.toString())));
+ methodSig.append(")V");
+ il.append(new INVOKEVIRTUAL(cpg.addMethodref(className,
+ methodName,
+ methodSig.toString())));
- // Do not need to call Translet.popParamFrame() if we are
- // calling a simple named template.
- if (_calleeTemplate == null && (stylesheet.hasLocalParams() || hasContents())) {
- // Pop parameter frame
- final int pop = cpg.addMethodref(TRANSLET_CLASS,
- POP_PARAM_FRAME,
- POP_PARAM_FRAME_SIG);
- il.append(classGen.loadTranslet());
- il.append(new INVOKEVIRTUAL(pop));
- }
+ // Do not need to call Translet.popParamFrame() if we are
+ // calling a simple named template.
+ if (_calleeTemplate == null && (stylesheet.hasLocalParams() || hasContents())) {
+ // Pop parameter frame
+ final int pop = cpg.addMethodref(TRANSLET_CLASS,
+ POP_PARAM_FRAME,
+ POP_PARAM_FRAME_SIG);
+ il.append(classGen.loadTranslet());
+ il.append(new INVOKEVIRTUAL(pop));
+ }
}
/**
@@ -188,7 +188,7 @@
* template is not a simple named template.
*/
public Template getCalleeTemplate() {
- Template foundTemplate
+ Template foundTemplate
= getXSLTC().getParser().getSymbolTable().lookupTemplate(_name);
return foundTemplate.isSimpleNamedTemplate() ? foundTemplate : null;
@@ -201,43 +201,42 @@
* the Param with a corresponding WithParam having the same name.
*/
private void buildParameterList() {
- // Put the parameters from the called template into the array first.
- // This is to ensure the order of the parameters.
- Vector defaultParams = _calleeTemplate.getParameters();
- int numParams = defaultParams.size();
- _parameters = new Object[numParams];
- for (int i = 0; i < numParams; i++) {
- _parameters[i] = defaultParams.elementAt(i);
- }
+ // Put the parameters from the called template into the array first.
+ // This is to ensure the order of the parameters.
+ Vector defaultParams = _calleeTemplate.getParameters();
+ int numParams = defaultParams.size();
+ _parameters = new Object[numParams];
+ for (int i = 0; i < numParams; i++) {
+ _parameters[i] = defaultParams.elementAt(i);
+ }
- // Replace a Param with a WithParam if they have the same name.
- int count = elementCount();
- for (int i = 0; i < count; i++) {
- Object node = elementAt(i);
+ // Replace a Param with a WithParam if they have the same name.
+ int count = elementCount();
+ for (int i = 0; i < count; i++) {
+ Object node = elementAt(i);
// Ignore if not WithParam
- if (node instanceof WithParam) {
- WithParam withParam = (WithParam)node;
- QName name = withParam.getName();
+ if (node instanceof WithParam) {
+ WithParam withParam = (WithParam)node;
+ QName name = withParam.getName();
// Search for a Param with the same name
- for (int k = 0; k < numParams; k++) {
- Object object = _parameters[k];
- if (object instanceof Param
- && ((Param)object).getName().equals(name)) {
- withParam.setDoParameterOptimization(true);
- _parameters[k] = withParam;
- break;
- }
- else if (object instanceof WithParam
- && ((WithParam)object).getName().equals(name)) {
- withParam.setDoParameterOptimization(true);
- _parameters[k] = withParam;
- break;
- }
- }
- }
- }
+ for (int k = 0; k < numParams; k++) {
+ Object object = _parameters[k];
+ if (object instanceof Param
+ && ((Param)object).getName().equals(name)) {
+ withParam.setDoParameterOptimization(true);
+ _parameters[k] = withParam;
+ break;
+ }
+ else if (object instanceof WithParam
+ && ((WithParam)object).getName().equals(name)) {
+ withParam.setDoParameterOptimization(true);
+ _parameters[k] = withParam;
+ break;
+ }
+ }
+ }
+ }
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/Copy.java Wed May 02 13:32:36 2012 +0100
@@ -49,111 +49,111 @@
*/
final class Copy extends Instruction {
private UseAttributeSets _useSets;
-
+
public void parseContents(Parser parser) {
- final String useSets = getAttribute("use-attribute-sets");
- if (useSets.length() > 0) {
+ final String useSets = getAttribute("use-attribute-sets");
+ if (useSets.length() > 0) {
if (!Util.isValidQNames(useSets)) {
ErrorMsg err = new ErrorMsg(ErrorMsg.INVALID_QNAME_ERR, useSets, this);
- parser.reportError(Constants.ERROR, err);
- }
- _useSets = new UseAttributeSets(useSets, parser);
- }
- parseChildren(parser);
+ parser.reportError(Constants.ERROR, err);
+ }
+ _useSets = new UseAttributeSets(useSets, parser);
+ }
+ parseChildren(parser);
}
-
+
public void display(int indent) {
- indent(indent);
- Util.println("Copy");
- indent(indent + IndentIncrement);
- displayContents(indent + IndentIncrement);
+ indent(indent);
+ Util.println("Copy");
+ indent(indent + IndentIncrement);
+ displayContents(indent + IndentIncrement);
}
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
- if (_useSets != null) {
- _useSets.typeCheck(stable);
- }
- typeCheckContents(stable);
- return Type.Void;
+ if (_useSets != null) {
+ _useSets.typeCheck(stable);
+ }
+ typeCheckContents(stable);
+ return Type.Void;
}
-
+
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
- final ConstantPoolGen cpg = classGen.getConstantPool();
- final InstructionList il = methodGen.getInstructionList();
+ final ConstantPoolGen cpg = classGen.getConstantPool();
+ final InstructionList il = methodGen.getInstructionList();
- final LocalVariableGen name =
- methodGen.addLocalVariable2("name",
- Util.getJCRefType(STRING_SIG),
- il.getEnd());
- final LocalVariableGen length =
- methodGen.addLocalVariable2("length",
- Util.getJCRefType("I"),
- il.getEnd());
+ final LocalVariableGen name =
+ methodGen.addLocalVariable2("name",
+ Util.getJCRefType(STRING_SIG),
+ null);
+ final LocalVariableGen length =
+ methodGen.addLocalVariable2("length",
+ Util.getJCRefType("I"),
+ null);
- // Get the name of the node to copy and save for later
- il.append(methodGen.loadDOM());
- il.append(methodGen.loadCurrentNode());
- il.append(methodGen.loadHandler());
- final int cpy = cpg.addInterfaceMethodref(DOM_INTF,
- "shallowCopy",
- "("
- + NODE_SIG
- + TRANSLET_OUTPUT_SIG
- + ")" + STRING_SIG);
- il.append(new INVOKEINTERFACE(cpy, 3));
- il.append(DUP);
- il.append(new ASTORE(name.getIndex()));
- final BranchHandle ifBlock1 = il.append(new IFNULL(null));
+ // Get the name of the node to copy and save for later
+ il.append(methodGen.loadDOM());
+ il.append(methodGen.loadCurrentNode());
+ il.append(methodGen.loadHandler());
+ final int cpy = cpg.addInterfaceMethodref(DOM_INTF,
+ "shallowCopy",
+ "("
+ + NODE_SIG
+ + TRANSLET_OUTPUT_SIG
+ + ")" + STRING_SIG);
+ il.append(new INVOKEINTERFACE(cpy, 3));
+ il.append(DUP);
+ name.setStart(il.append(new ASTORE(name.getIndex())));
+ final BranchHandle ifBlock1 = il.append(new IFNULL(null));
- // Get the length of the node name and save for later
- il.append(new ALOAD(name.getIndex()));
- final int lengthMethod = cpg.addMethodref(STRING_CLASS,"length","()I");
- il.append(new INVOKEVIRTUAL(lengthMethod));
+ // Get the length of the node name and save for later
+ il.append(new ALOAD(name.getIndex()));
+ final int lengthMethod = cpg.addMethodref(STRING_CLASS,"length","()I");
+ il.append(new INVOKEVIRTUAL(lengthMethod));
il.append(DUP);
- il.append(new ISTORE(length.getIndex()));
+ length.setStart(il.append(new ISTORE(length.getIndex())));
// Ignore attribute sets if current node is ROOT. DOM.shallowCopy()
// returns "" for ROOT, so skip attribute sets if length == 0
- final BranchHandle ifBlock4 = il.append(new IFEQ(null));
-
- // Copy in attribute sets if specified
- if (_useSets != null) {
- // If the parent of this element will result in an element being
- // output then we know that it is safe to copy out the attributes
- final SyntaxTreeNode parent = getParent();
- if ((parent instanceof LiteralElement) ||
- (parent instanceof LiteralElement)) {
- _useSets.translate(classGen, methodGen);
- }
- // If not we have to check to see if the copy will result in an
- // element being output.
- else {
- // check if element; if not skip to translate body
- il.append(new ILOAD(length.getIndex()));
- final BranchHandle ifBlock2 = il.append(new IFEQ(null));
- // length != 0 -> element -> do attribute sets
- _useSets.translate(classGen, methodGen);
- // not an element; root
- ifBlock2.setTarget(il.append(NOP));
- }
- }
+ final BranchHandle ifBlock4 = il.append(new IFEQ(null));
- // Instantiate body of xsl:copy
- ifBlock4.setTarget(il.append(NOP));
- translateContents(classGen, methodGen);
+ // Copy in attribute sets if specified
+ if (_useSets != null) {
+ // If the parent of this element will result in an element being
+ // output then we know that it is safe to copy out the attributes
+ final SyntaxTreeNode parent = getParent();
+ if ((parent instanceof LiteralElement) ||
+ (parent instanceof LiteralElement)) {
+ _useSets.translate(classGen, methodGen);
+ }
+ // If not we have to check to see if the copy will result in an
+ // element being output.
+ else {
+ // check if element; if not skip to translate body
+ il.append(new ILOAD(length.getIndex()));
+ final BranchHandle ifBlock2 = il.append(new IFEQ(null));
+ // length != 0 -> element -> do attribute sets
+ _useSets.translate(classGen, methodGen);
+ // not an element; root
+ ifBlock2.setTarget(il.append(NOP));
+ }
+ }
- // Call the output handler's endElement() if we copied an element
- // (The DOM.shallowCopy() method calls startElement().)
- il.append(new ILOAD(length.getIndex()));
- final BranchHandle ifBlock3 = il.append(new IFEQ(null));
- il.append(methodGen.loadHandler());
- il.append(new ALOAD(name.getIndex()));
- il.append(methodGen.endElement());
-
- final InstructionHandle end = il.append(NOP);
- ifBlock1.setTarget(end);
- ifBlock3.setTarget(end);
- methodGen.removeLocalVariable(name);
- methodGen.removeLocalVariable(length);
+ // Instantiate body of xsl:copy
+ ifBlock4.setTarget(il.append(NOP));
+ translateContents(classGen, methodGen);
+
+ // Call the output handler's endElement() if we copied an element
+ // (The DOM.shallowCopy() method calls startElement().)
+ length.setEnd(il.append(new ILOAD(length.getIndex())));
+ final BranchHandle ifBlock3 = il.append(new IFEQ(null));
+ il.append(methodGen.loadHandler());
+ name.setEnd(il.append(new ALOAD(name.getIndex())));
+ il.append(methodGen.endElement());
+
+ final InstructionHandle end = il.append(NOP);
+ ifBlock1.setTarget(end);
+ ifBlock3.setTarget(end);
+ methodGen.removeLocalVariable(name);
+ methodGen.removeLocalVariable(length);
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/FilterExpr.java Wed May 02 13:32:36 2012 +0100
@@ -28,11 +28,12 @@
import com.sun.org.apache.bcel.internal.generic.ALOAD;
import com.sun.org.apache.bcel.internal.generic.ASTORE;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
-import com.sun.org.apache.bcel.internal.generic.NEW;
+import com.sun.org.apache.bcel.internal.generic.ILOAD;
import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
import com.sun.org.apache.bcel.internal.generic.InstructionList;
+import com.sun.org.apache.bcel.internal.generic.ISTORE;
import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
import com.sun.org.apache.bcel.internal.generic.NEW;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator;
@@ -49,158 +50,205 @@
* @author Morten Jorgensen
*/
class FilterExpr extends Expression {
-
+
/**
* Primary expression of this filter. I.e., 'e' in '(e)[p1]...[pn]'.
*/
private Expression _primary;
-
+
/**
* Array of predicates in '(e)[p1]...[pn]'.
*/
private final Vector _predicates;
public FilterExpr(Expression primary, Vector predicates) {
- _primary = primary;
- _predicates = predicates;
- primary.setParent(this);
+ _primary = primary;
+ _predicates = predicates;
+ primary.setParent(this);
}
protected Expression getExpr() {
- if (_primary instanceof CastExpr)
- return ((CastExpr)_primary).getExpr();
- else
- return _primary;
+ if (_primary instanceof CastExpr)
+ return ((CastExpr)_primary).getExpr();
+ else
+ return _primary;
}
public void setParser(Parser parser) {
- super.setParser(parser);
- _primary.setParser(parser);
- if (_predicates != null) {
- final int n = _predicates.size();
- for (int i = 0; i < n; i++) {
- final Expression exp = (Expression)_predicates.elementAt(i);
- exp.setParser(parser);
- exp.setParent(this);
- }
- }
+ super.setParser(parser);
+ _primary.setParser(parser);
+ if (_predicates != null) {
+ final int n = _predicates.size();
+ for (int i = 0; i < n; i++) {
+ final Expression exp = (Expression)_predicates.elementAt(i);
+ exp.setParser(parser);
+ exp.setParent(this);
+ }
+ }
}
-
+
public String toString() {
- return "filter-expr(" + _primary + ", " + _predicates + ")";
+ return "filter-expr(" + _primary + ", " + _predicates + ")";
}
/**
- * Type check a FilterParentPath. If the filter is not a node-set add a
- * cast to node-set only if it is of reference type. This type coercion
+ * Type check a FilterParentPath. If the filter is not a node-set add a
+ * cast to node-set only if it is of reference type. This type coercion
* is needed for expressions like $x where $x is a parameter reference.
* All optimizations are turned off before type checking underlying
* predicates.
*/
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
- Type ptype = _primary.typeCheck(stable);
+ Type ptype = _primary.typeCheck(stable);
+ boolean canOptimize = _primary instanceof KeyCall;
- if (ptype instanceof NodeSetType == false) {
- if (ptype instanceof ReferenceType) {
- _primary = new CastExpr(_primary, Type.NodeSet);
- }
- else {
- throw new TypeCheckError(this);
- }
- }
+ if (ptype instanceof NodeSetType == false) {
+ if (ptype instanceof ReferenceType) {
+ _primary = new CastExpr(_primary, Type.NodeSet);
+ }
+ else {
+ throw new TypeCheckError(this);
+ }
+ }
- // Type check predicates and turn all optimizations off
- int n = _predicates.size();
- for (int i = 0; i < n; i++) {
- Predicate pred = (Predicate) _predicates.elementAt(i);
- pred.dontOptimize();
- pred.typeCheck(stable);
- }
- return _type = Type.NodeSet;
+ // Type check predicates and turn all optimizations off if appropriate
+ int n = _predicates.size();
+ for (int i = 0; i < n; i++) {
+ Predicate pred = (Predicate) _predicates.elementAt(i);
+
+ if (!canOptimize) {
+ pred.dontOptimize();
+ }
+ pred.typeCheck(stable);
+ }
+ return _type = Type.NodeSet;
}
-
+
/**
* Translate a filter expression by pushing the appropriate iterator
* onto the stack.
*/
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
- translateFilterExpr(classGen, methodGen, _predicates == null ? -1 : _predicates.size() - 1);
+ translateFilterExpr(classGen, methodGen, _predicates == null ? -1 : _predicates.size() - 1);
}
private void translateFilterExpr(ClassGenerator classGen,
- MethodGenerator methodGen,
- int predicateIndex) {
- if (predicateIndex >= 0) {
- translatePredicates(classGen, methodGen, predicateIndex);
- }
- else {
- _primary.translate(classGen, methodGen);
- }
+ MethodGenerator methodGen,
+ int predicateIndex) {
+ if (predicateIndex >= 0) {
+ translatePredicates(classGen, methodGen, predicateIndex);
+ }
+ else {
+ _primary.translate(classGen, methodGen);
+ }
}
/**
- * Translate a sequence of predicates. Each predicate is translated
- * by constructing an instance of CurrentNodeListIterator
- * which is initialized from another iterator (recursive call), a
- * filter and a closure (call to translate on the predicate) and "this".
+ * Translate a sequence of predicates. Each predicate is translated
+ * by constructing an instance of CurrentNodeListIterator
+ * which is initialized from another iterator (recursive call), a
+ * filter and a closure (call to translate on the predicate) and "this".
*/
public void translatePredicates(ClassGenerator classGen,
- MethodGenerator methodGen,
- int predicateIndex) {
- final ConstantPoolGen cpg = classGen.getConstantPool();
- final InstructionList il = methodGen.getInstructionList();
+ MethodGenerator methodGen,
+ int predicateIndex) {
+ final ConstantPoolGen cpg = classGen.getConstantPool();
+ final InstructionList il = methodGen.getInstructionList();
// If not predicates left, translate primary expression
- if (predicateIndex < 0) {
- translateFilterExpr(classGen, methodGen, predicateIndex);
- }
- else {
- // Translate predicates from right to left
- final int initCNLI = cpg.addMethodref(CURRENT_NODE_LIST_ITERATOR,
- "javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:41:01 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 3326843611085065902L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParameterRef.java Wed May 02 13:32:36 2012 +0100
@@ -84,12 +84,10 @@
}
else {
il.append(_variable.loadInstruction());
- _variable.removeReference(this);
}
}
else {
il.append(_variable.loadInstruction());
- _variable.removeReference(this);
}
}
else {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/ParentLocationPath.java Wed May 02 13:32:36 2012 +0100
@@ -52,58 +52,58 @@
private boolean _axisMismatch = false;
public ParentLocationPath(RelativeLocationPath path, Expression step) {
- _path = path;
- _step = step;
- _path.setParent(this);
- _step.setParent(this);
+ _path = path;
+ _step = step;
+ _path.setParent(this);
+ _step.setParent(this);
- if (_step instanceof Step) {
- _axisMismatch = checkAxisMismatch();
- }
+ if (_step instanceof Step) {
+ _axisMismatch = checkAxisMismatch();
+ }
}
-
+
public void setAxis(int axis) {
- _path.setAxis(axis);
+ _path.setAxis(axis);
}
public int getAxis() {
- return _path.getAxis();
+ return _path.getAxis();
}
public RelativeLocationPath getPath() {
- return(_path);
+ return(_path);
}
public Expression getStep() {
- return(_step);
+ return(_step);
}
public void setParser(Parser parser) {
- super.setParser(parser);
- _step.setParser(parser);
- _path.setParser(parser);
+ super.setParser(parser);
+ _step.setParser(parser);
+ _path.setParser(parser);
}
-
+
public String toString() {
- return "ParentLocationPath(" + _path + ", " + _step + ')';
+ return "ParentLocationPath(" + _path + ", " + _step + ')';
}
public Type typeCheck(SymbolTable stable) throws TypeCheckError {
- stype = _step.typeCheck(stable);
- _path.typeCheck(stable);
+ stype = _step.typeCheck(stable);
+ _path.typeCheck(stable);
- if (_axisMismatch) enableNodeOrdering();
+ if (_axisMismatch) enableNodeOrdering();
- return _type = Type.NodeSet;
+ return _type = Type.NodeSet;
}
public void enableNodeOrdering() {
- SyntaxTreeNode parent = getParent();
- if (parent instanceof ParentLocationPath)
- ((ParentLocationPath)parent).enableNodeOrdering();
- else {
- _orderNodes = true;
- }
+ SyntaxTreeNode parent = getParent();
+ if (parent instanceof ParentLocationPath)
+ ((ParentLocationPath)parent).enableNodeOrdering();
+ else {
+ _orderNodes = true;
+ }
}
/**
@@ -113,70 +113,70 @@
*/
public boolean checkAxisMismatch() {
- int left = _path.getAxis();
- int right = ((Step)_step).getAxis();
+ int left = _path.getAxis();
+ int right = ((Step)_step).getAxis();
- if (((left == Axis.ANCESTOR) || (left == Axis.ANCESTORORSELF)) &&
- ((right == Axis.CHILD) ||
- (right == Axis.DESCENDANT) ||
- (right == Axis.DESCENDANTORSELF) ||
- (right == Axis.PARENT) ||
- (right == Axis.PRECEDING) ||
- (right == Axis.PRECEDINGSIBLING)))
- return true;
+ if (((left == Axis.ANCESTOR) || (left == Axis.ANCESTORORSELF)) &&
+ ((right == Axis.CHILD) ||
+ (right == Axis.DESCENDANT) ||
+ (right == Axis.DESCENDANTORSELF) ||
+ (right == Axis.PARENT) ||
+ (right == Axis.PRECEDING) ||
+ (right == Axis.PRECEDINGSIBLING)))
+ return true;
- if ((left == Axis.CHILD) &&
- (right == Axis.ANCESTOR) ||
- (right == Axis.ANCESTORORSELF) ||
- (right == Axis.PARENT) ||
- (right == Axis.PRECEDING))
- return true;
+ if ((left == Axis.CHILD) &&
+ (right == Axis.ANCESTOR) ||
+ (right == Axis.ANCESTORORSELF) ||
+ (right == Axis.PARENT) ||
+ (right == Axis.PRECEDING))
+ return true;
- if ((left == Axis.DESCENDANT) || (left == Axis.DESCENDANTORSELF))
- return true;
+ if ((left == Axis.DESCENDANT) || (left == Axis.DESCENDANTORSELF))
+ return true;
- if (((left == Axis.FOLLOWING) || (left == Axis.FOLLOWINGSIBLING)) &&
- ((right == Axis.FOLLOWING) ||
- (right == Axis.PARENT) ||
- (right == Axis.PRECEDING) ||
- (right == Axis.PRECEDINGSIBLING)))
- return true;
+ if (((left == Axis.FOLLOWING) || (left == Axis.FOLLOWINGSIBLING)) &&
+ ((right == Axis.FOLLOWING) ||
+ (right == Axis.PARENT) ||
+ (right == Axis.PRECEDING) ||
+ (right == Axis.PRECEDINGSIBLING)))
+ return true;
- if (((left == Axis.PRECEDING) || (left == Axis.PRECEDINGSIBLING)) &&
- ((right == Axis.DESCENDANT) ||
- (right == Axis.DESCENDANTORSELF) ||
- (right == Axis.FOLLOWING) ||
- (right == Axis.FOLLOWINGSIBLING) ||
- (right == Axis.PARENT) ||
- (right == Axis.PRECEDING) ||
- (right == Axis.PRECEDINGSIBLING)))
- return true;
+ if (((left == Axis.PRECEDING) || (left == Axis.PRECEDINGSIBLING)) &&
+ ((right == Axis.DESCENDANT) ||
+ (right == Axis.DESCENDANTORSELF) ||
+ (right == Axis.FOLLOWING) ||
+ (right == Axis.FOLLOWINGSIBLING) ||
+ (right == Axis.PARENT) ||
+ (right == Axis.PRECEDING) ||
+ (right == Axis.PRECEDINGSIBLING)))
+ return true;
- if ((right == Axis.FOLLOWING) && (left == Axis.CHILD)) {
- // Special case for '@*/following::*' expressions. The resulting
- // iterator is initialised with the parent's first child, and this
- // can cause duplicates in the output if the parent has more than
- // one attribute that matches the left step.
- if (_path instanceof Step) {
- int type = ((Step)_path).getNodeType();
- if (type == DTM.ATTRIBUTE_NODE) return true;
- }
- }
+ if ((right == Axis.FOLLOWING) && (left == Axis.CHILD)) {
+ // Special case for '@*/following::*' expressions. The resulting
+ // iterator is initialised with the parent's first child, and this
+ // can cause duplicates in the output if the parent has more than
+ // one attribute that matches the left step.
+ if (_path instanceof Step) {
+ int type = ((Step)_path).getNodeType();
+ if (type == DTM.ATTRIBUTE_NODE) return true;
+ }
+ }
- return false;
+ return false;
}
public void translate(ClassGenerator classGen, MethodGenerator methodGen) {
-
- // Compile path iterator
- _path.translate(classGen, methodGen); // iterator on stack....
-
- translateStep(classGen, methodGen);
+
+ // Compile path iterator
+ _path.translate(classGen, methodGen); // iterator on stack....
+
+ translateStep(classGen, methodGen);
}
-
+
public void translateStep(ClassGenerator classGen, MethodGenerator methodGen) {
- final ConstantPoolGen cpg = classGen.getConstantPool();
- final InstructionList il = methodGen.getInstructionList();
+ final ConstantPoolGen cpg = classGen.getConstantPool();
+ final InstructionList il = methodGen.getInstructionList();
// Backwards branches are prohibited if an uninitialized object is
// on the stack by section 4.9.4 of the JVM Specification, 2nd Ed.
@@ -190,63 +190,63 @@
LocalVariableGen pathTemp
= methodGen.addLocalVariable("parent_location_path_tmp1",
Util.getJCRefType(NODE_ITERATOR_SIG),
- il.getEnd(), null);
- il.append(new ASTORE(pathTemp.getIndex()));
+ null, null);
+ pathTemp.setStart(il.append(new ASTORE(pathTemp.getIndex())));
- _step.translate(classGen, methodGen);
+ _step.translate(classGen, methodGen);
LocalVariableGen stepTemp
= methodGen.addLocalVariable("parent_location_path_tmp2",
Util.getJCRefType(NODE_ITERATOR_SIG),
- il.getEnd(), null);
- il.append(new ASTORE(stepTemp.getIndex()));
+ null, null);
+ stepTemp.setStart(il.append(new ASTORE(stepTemp.getIndex())));
- // Create new StepIterator
- final int initSI = cpg.addMethodref(STEP_ITERATOR_CLASS,
- "CurrentNodeListIterator
* which is initialized from another iterator (recursive call),
- * a filter and a closure (call to translate on the predicate) and "this".
+ * a filter and a closure (call to translate on the predicate) and "this".
*/
public void translatePredicates(ClassGenerator classGen,
- MethodGenerator methodGen,
- int predicateIndex) {
- final ConstantPoolGen cpg = classGen.getConstantPool();
- final InstructionList il = methodGen.getInstructionList();
+ MethodGenerator methodGen,
+ int predicateIndex) {
+ final ConstantPoolGen cpg = classGen.getConstantPool();
+ final InstructionList il = methodGen.getInstructionList();
- int idx = 0;
+ int idx = 0;
- if (predicateIndex < 0) {
- translateStep(classGen, methodGen, predicateIndex);
- }
- else {
- final Predicate predicate = (Predicate) _predicates.get(predicateIndex--);
+ if (predicateIndex < 0) {
+ translateStep(classGen, methodGen, predicateIndex);
+ }
+ else {
+ final Predicate predicate = (Predicate) _predicates.get(predicateIndex--);
- // Special case for predicates that can use the NodeValueIterator
- // instead of an auxiliary class. Certain path/predicates pairs
- // are translated into a base path, on top of which we place a
- // node value iterator that tests for the desired value:
- // foo[@attr = 'str'] -> foo/@attr + test(value='str')
- // foo[bar = 'str'] -> foo/bar + test(value='str')
- // foo/bar[. = 'str'] -> foo/bar + test(value='str')
- if (predicate.isNodeValueTest()) {
- Step step = predicate.getStep();
+ // Special case for predicates that can use the NodeValueIterator
+ // instead of an auxiliary class. Certain path/predicates pairs
+ // are translated into a base path, on top of which we place a
+ // node value iterator that tests for the desired value:
+ // foo[@attr = 'str'] -> foo/@attr + test(value='str')
+ // foo[bar = 'str'] -> foo/bar + test(value='str')
+ // foo/bar[. = 'str'] -> foo/bar + test(value='str')
+ if (predicate.isNodeValueTest()) {
+ Step step = predicate.getStep();
- il.append(methodGen.loadDOM());
- // If the predicate's Step is simply '.' we translate this Step
- // and place the node test on top of the resulting iterator
- if (step.isAbbreviatedDot()) {
- translateStep(classGen, methodGen, predicateIndex);
- il.append(new ICONST(DOM.RETURN_CURRENT));
- }
- // Otherwise we create a parent location path with this Step and
- // the predicates Step, and place the node test on top of that
- else {
- ParentLocationPath path = new ParentLocationPath(this, step);
+ il.append(methodGen.loadDOM());
+ // If the predicate's Step is simply '.' we translate this Step
+ // and place the node test on top of the resulting iterator
+ if (step.isAbbreviatedDot()) {
+ translateStep(classGen, methodGen, predicateIndex);
+ il.append(new ICONST(DOM.RETURN_CURRENT));
+ }
+ // Otherwise we create a parent location path with this Step and
+ // the predicates Step, and place the node test on top of that
+ else {
+ ParentLocationPath path = new ParentLocationPath(this, step);
_parent = step._parent = path; // Force re-parenting
-
- try {
- path.typeCheck(getParser().getSymbolTable());
- }
- catch (TypeCheckError e) { }
- translateStep(classGen, methodGen, predicateIndex);
- path.translateStep(classGen, methodGen);
- il.append(new ICONST(DOM.RETURN_PARENT));
- }
- predicate.translate(classGen, methodGen);
- idx = cpg.addInterfaceMethodref(DOM_INTF,
- GET_NODE_VALUE_ITERATOR,
- GET_NODE_VALUE_ITERATOR_SIG);
- il.append(new INVOKEINTERFACE(idx, 5));
- }
- // Handle '//*[n]' expression
- else if (predicate.isNthDescendant()) {
- il.append(methodGen.loadDOM());
- // il.append(new ICONST(NodeTest.ELEMENT));
+
+ try {
+ path.typeCheck(getParser().getSymbolTable());
+ }
+ catch (TypeCheckError e) { }
+ translateStep(classGen, methodGen, predicateIndex);
+ path.translateStep(classGen, methodGen);
+ il.append(new ICONST(DOM.RETURN_PARENT));
+ }
+ predicate.translate(classGen, methodGen);
+ idx = cpg.addInterfaceMethodref(DOM_INTF,
+ GET_NODE_VALUE_ITERATOR,
+ GET_NODE_VALUE_ITERATOR_SIG);
+ il.append(new INVOKEINTERFACE(idx, 5));
+ }
+ // Handle '//*[n]' expression
+ else if (predicate.isNthDescendant()) {
+ il.append(methodGen.loadDOM());
+ // il.append(new ICONST(NodeTest.ELEMENT));
il.append(new PUSH(cpg, predicate.getPosType()));
- predicate.translate(classGen, methodGen);
- il.append(new ICONST(0));
- idx = cpg.addInterfaceMethodref(DOM_INTF,
- "getNthDescendant",
- "(IIZ)"+NODE_ITERATOR_SIG);
- il.append(new INVOKEINTERFACE(idx, 4));
- }
- // Handle 'elem[n]' expression
- else if (predicate.isNthPositionFilter()) {
- idx = cpg.addMethodref(NTH_ITERATOR_CLASS,
- "_code
is negative
* the use _message as the error string.
*/
public String toString() {
- String suffix = (_params == null) ?
- (null != _code ? new String(getErrorMessage()) : _message)
- : MessageFormat.format(getErrorMessage(), _params);
- return formatLine() + suffix;
+ String suffix = (_params == null) ?
+ (null != _code ? getErrorMessage() : _message)
+ : MessageFormat.format(getErrorMessage(), _params);
+ return formatLine() + suffix;
}
-
+
public String toString(Object obj) {
- Object params[] = new Object[1];
- params[0] = obj.toString();
- String suffix = MessageFormat.format(getErrorMessage(), params);
- return formatLine() + suffix;
+ Object params[] = new Object[1];
+ params[0] = obj.toString();
+ String suffix = MessageFormat.format(getErrorMessage(), params);
+ return formatLine() + suffix;
}
-
+
public String toString(Object obj0, Object obj1) {
- Object params[] = new Object[2];
- params[0] = obj0.toString();
- params[1] = obj1.toString();
- String suffix = MessageFormat.format(getErrorMessage(), params);
- return formatLine() + suffix;
+ Object params[] = new Object[2];
+ params[0] = obj0.toString();
+ params[1] = obj1.toString();
+ String suffix = MessageFormat.format(getErrorMessage(), params);
+ return formatLine() + suffix;
}
/**
* Return an ErrorMessages string corresponding to the _code
* This function is temporary until the three special-cased keys
* below are moved into ErrorMessages
- *
+ *
* @return ErrorMessages string
- */
+ */
private String getErrorMessage() {
return _bundle.getString(_code);
}
-
+
// If the _isWarningError flag is true, the error is treated as
// a warning by the compiler, but should be reported as an error
- // to the ErrorListener. This is a workaround for the TCK failure
+ // to the ErrorListener. This is a workaround for the TCK failure
// ErrorListener.errorTests.error001.
public void setWarningError(boolean flag) {
- _isWarningError = flag;
+ _isWarningError = flag;
}
public boolean isWarningError() {
return _isWarningError;
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/InternalError.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,37 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: InternalError.java,v 1.0 2011-08-18 04:34:19 joehw Exp $
+ */
+package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
+/**
+ * Marks a class of errors in which XSLTC has reached some incorrect internal
+ * state from which it cannot recover.
+ */
+public class InternalError extends Error {
+ /**
+ * Construct an InternalError
with the specified error message.
+ * @param msg the error message
+ */
+ public InternalError(String msg) {
+ super(msg);
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MarkerInstruction.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,98 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: MethodGenerator.java,v 1.10 2010-11-01 04:34:19 joehw Exp $
+ */
+package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import com.sun.org.apache.bcel.internal.Constants;
+import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
+import com.sun.org.apache.bcel.internal.generic.Instruction;
+import com.sun.org.apache.bcel.internal.generic.Visitor;
+
+/**
+ * A special abstract dummy subclass of
+ * {@link org.apache.bcel.generic.Instruction} used to mark locations of
+ * interest in an {@link com.sun.org.apache.bcel.internal.generic.InstructionList}. It and
+ * its subclasses are only used as placeholders, and do not contribute to the
+ * actual byte code instruction stream.
+ */
+abstract class MarkerInstruction extends Instruction {
+ /**
+ * Zero-argument constructor. Sets the opcode to an invalid value and
+ * sets the length to zero, as it will not be written as part of the
+ * generated byte code.
+ */
+ public MarkerInstruction() {
+ super(Constants.UNDEFINED, (short) 0);
+ }
+
+ /**
+ * {@link com.sun.org.apache.bcel.internal.generic.Visitor}s will know nothing about this
+ * kind of {@link org.apche.bcel.generic.Instruction}, so this method does
+ * nothing.
+ */
+ public void accept(Visitor v) {
+ }
+
+ /**
+ * The number of JVM stack entries consumed by the instruction.
+ * This instruction is just a place holder, so it does not consume any
+ * stack entries.
+ * @param cpg The {@link com.sun.org.apache.bcel.internal.generic.ConstantPoolGen} for the
+ * current {@link com.sun.org.apache.bcel.internal.generic.ClassGen}
+ * @return 0
always
+ */
+ final public int consumeStack(ConstantPoolGen cpg) {
+ return 0;
+ }
+ /**
+ * The number of JVM stack entries produced by the instruction.
+ * This instruction is just a place holder, so it does not produce any
+ * stack entries.
+ * @param cpg The {@link com.sun.org.apache.bcel.internal.generic.ConstantPoolGen} for the
+ * current {@link com.sun.org.apache.bcel.internal.generic.ClassGen}
+ * @return 0
always
+ */
+ final public int produceStack(ConstantPoolGen cpg) {
+ return 0;
+ }
+
+ /**
+ * Produce a copy of the instruction. By default a
+ * {@link MarkerInstruction} has no parameters, so the base implementation
+ * of {@link #copy()} returns the instruction itself.
+ * @return The instruction itself.
+ */
+ public Instruction copy() {
+ return this;
+ }
+ /**
+ * Dump instruction as byte code to stream out. A {@link MarkerInstruction}
+ * has no effect on the generated byte code so it is never emitted to the
+ * output stream.
+ * @param out Output stream
+ */
+ final public void dump(DataOutputStream out) throws IOException {
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/MethodGenerator.java Wed May 02 13:32:36 2012 +0100
@@ -23,22 +23,57 @@
package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
-import java.util.Hashtable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+ import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Stack;
+
+import com.sun.org.apache.bcel.internal.Constants;
+import com.sun.org.apache.bcel.internal.classfile.Field;
+import com.sun.org.apache.bcel.internal.classfile.Method;
import com.sun.org.apache.bcel.internal.generic.ALOAD;
import com.sun.org.apache.bcel.internal.generic.ASTORE;
+import com.sun.org.apache.bcel.internal.generic.BranchHandle;
+import com.sun.org.apache.bcel.internal.generic.BranchInstruction;
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen;
+import com.sun.org.apache.bcel.internal.generic.DLOAD;
+import com.sun.org.apache.bcel.internal.generic.DSTORE;
+import com.sun.org.apache.bcel.internal.generic.FLOAD;
+import com.sun.org.apache.bcel.internal.generic.FSTORE;
+import com.sun.org.apache.bcel.internal.generic.GETFIELD;
+import com.sun.org.apache.bcel.internal.generic.GOTO;
import com.sun.org.apache.bcel.internal.generic.ICONST;
+import com.sun.org.apache.bcel.internal.generic.IfInstruction;
import com.sun.org.apache.bcel.internal.generic.ILOAD;
+import com.sun.org.apache.bcel.internal.generic.IndexedInstruction;
import com.sun.org.apache.bcel.internal.generic.INVOKEINTERFACE;
+import com.sun.org.apache.bcel.internal.generic.INVOKESPECIAL;
+import com.sun.org.apache.bcel.internal.generic.INVOKESTATIC;
+import com.sun.org.apache.bcel.internal.generic.INVOKEVIRTUAL;
import com.sun.org.apache.bcel.internal.generic.ISTORE;
import com.sun.org.apache.bcel.internal.generic.Instruction;
+import com.sun.org.apache.bcel.internal.generic.InstructionConstants;
import com.sun.org.apache.bcel.internal.generic.InstructionHandle;
import com.sun.org.apache.bcel.internal.generic.InstructionList;
+import com.sun.org.apache.bcel.internal.generic.InstructionTargeter;
import com.sun.org.apache.bcel.internal.generic.LocalVariableGen;
+import com.sun.org.apache.bcel.internal.generic.LocalVariableInstruction;
+import com.sun.org.apache.bcel.internal.generic.LLOAD;
+import com.sun.org.apache.bcel.internal.generic.LSTORE;
import com.sun.org.apache.bcel.internal.generic.MethodGen;
+import com.sun.org.apache.bcel.internal.generic.NEW;
+import com.sun.org.apache.bcel.internal.generic.PUTFIELD;
+import com.sun.org.apache.bcel.internal.generic.RET;
+import com.sun.org.apache.bcel.internal.generic.Select;
+import com.sun.org.apache.bcel.internal.generic.TargetLostException;
import com.sun.org.apache.bcel.internal.generic.Type;
+
import com.sun.org.apache.xalan.internal.xsltc.compiler.Pattern;
+import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC;
/**
* @author Jacek Ambroziak
@@ -59,6 +94,13 @@
private static final int ITERATOR_INDEX = 2;
private static final int HANDLER_INDEX = 3;
+ private static final int MAX_METHOD_SIZE = 65535;
+ private static final int MAX_BRANCH_TARGET_OFFSET = 32767;
+ private static final int MIN_BRANCH_TARGET_OFFSET = -32768;
+
+ private static final int TARGET_METHOD_SIZE = 60000;
+ private static final int MINIMUM_OUTLINEABLE_CHUNK_SIZE = 1000;
+
private Instruction _iloadCurrent;
private Instruction _istoreCurrent;
private final Instruction _astoreHandler;
@@ -82,6 +124,7 @@
private SlotAllocator _slotAllocator;
private boolean _allocatorInit = false;
+ private LocalVariableRegistry _localVariableRegistry;
/**
* A mapping between patterns and instruction lists used by
* test sequences to avoid compiling the same pattern multiple
@@ -168,7 +211,7 @@
_nextNode = new INVOKEINTERFACE(index, 1);
_slotAllocator = new SlotAllocator();
- _slotAllocator.initialize(getLocalVariables());
+ _slotAllocator.initialize(getLocalVariableRegistry().getLocals(false));
_allocatorInit = true;
}
@@ -182,20 +225,364 @@
InstructionHandle start,
InstructionHandle end)
{
- return (_allocatorInit) ? addLocalVariable2(name, type, start)
- : super.addLocalVariable(name, type, start, end);
+ LocalVariableGen lvg;
+
+ if (_allocatorInit) {
+ lvg = addLocalVariable2(name, type, start);
+ } else {
+ lvg = super.addLocalVariable(name, type, start, end);
+ getLocalVariableRegistry().registerLocalVariable(lvg);
+ }
+ return lvg;
}
public LocalVariableGen addLocalVariable2(String name, Type type,
InstructionHandle start)
{
- return super.addLocalVariable(name, type,
- _slotAllocator.allocateSlot(type),
- start, null);
+ LocalVariableGen lvg = super.addLocalVariable(name, type,
+ _slotAllocator.allocateSlot(type),
+ start, null);
+ getLocalVariableRegistry().registerLocalVariable(lvg);
+ return lvg;
+ }
+ private LocalVariableRegistry getLocalVariableRegistry() {
+ if (_localVariableRegistry == null) {
+ _localVariableRegistry = new LocalVariableRegistry();
+ }
+
+ return _localVariableRegistry;
+ }
+
+ /**
+ * Keeps track of all local variables used in the method.
+ * java.lang.ArrayList
of all
+ * {@link LocalVariableGen}s created for this method, indexed by the
+ * slot number of the local variable. The JVM stack frame of local
+ * variables is divided into "slots". A single slot can be used to
+ * store more than one variable in a method, without regard to type, so
+ * long as the byte code keeps the ranges of the two disjoint._variables
contains the
+ * LocalVariableGen
; if more than one occurs, the
+ * corresponding entry contains all such LocalVariableGen
s
+ * registered for the same slot; and if none occurs, the entry will be
+ * null
.
+ */
+ protected ArrayList _variables = new ArrayList();
+
+ /**
+ * Maps a name to a {@link LocalVariableGen}
+ */
+ protected HashMap _nameToLVGMap = new HashMap();
+
+ /**
+ * Registers a {@link org.apache.bcel.generic.LocalVariableGen}
+ * for this method.
+ *
+ *
lvg
does not
+ * overlap with the range of instructions for any
+ * LocalVariableGen
with the same slot index previously
+ * registered for this method. (Unchecked.)
+ *
LocalVariableGen
for the local variable
+ * stored in the relevant slot at the relevant offset; null
+ * if there is none.
+ */
+ protected LocalVariableGen lookupRegisteredLocalVariable(int slot,
+ int offset) {
+ Object localsInSlot = (_variables != null) ? _variables.get(slot)
+ : null;
+
+ // If this slot index was never used, _variables.get will return
+ // null; if it was used once, it will return the LocalVariableGen;
+ // more than once it will return an ArrayList of all the
+ // LocalVariableGens for variables stored in that slot. For each
+ // LocalVariableGen, check whether its range includes the
+ // specified offset, and return the first such encountered.
+ if (localsInSlot != null) {
+ if (localsInSlot instanceof LocalVariableGen) {
+ LocalVariableGen lvg = (LocalVariableGen)localsInSlot;
+ if (offsetInLocalVariableGenRange(lvg, offset)) {
+ return lvg;
+ }
+ } else {
+ ArrayList listOfLocalsInSlot = (ArrayList) localsInSlot;
+ int size = listOfLocalsInSlot.size();
+
+ for (int i = 0; i < size; i++) {
+ LocalVariableGen lvg =
+ (LocalVariableGen)listOfLocalsInSlot.get(i);
+ if (offsetInLocalVariableGenRange(lvg, offset)) {
+ return lvg;
+ }
+ }
+ }
+ }
+
+ // No local variable stored in the specified slot at the specified
+ return null;
+ }
+
+ /**
+ * Set up a mapping of the name of the specified
+ * {@link LocalVariableGen} object to the LocalVariableGen
+ * itself.
This is a bit of a hack. XSLTC is relying on the fact that the
+ * name that is being looked up won't be duplicated, which isn't
+ * guaranteed. It replaces code which used to call
+ * {@link MethodGen#getLocalVariables()} and looped through the
+ * LocalVariableGen
objects it contained to find the one
+ * with the specified name. However, getLocalVariables()
+ * has the side effect of setting the start and end for any
+ * LocalVariableGen
which did not already have them
+ * set, which causes problems for outlining..
See also {@link #lookUpByName(String)} and + * {@link #removeByNameTracking(LocalVariableGen)}
LocalVariableGen + */ + protected void registerByName(LocalVariableGen lvg) { + Object duplicateNameEntry = _nameToLVGMap.get(lvg.getName()); + + if (duplicateNameEntry == null) { + _nameToLVGMap.put(lvg.getName(), lvg); + } else { + ArrayList sameNameList; + + if (duplicateNameEntry instanceof ArrayList) { + sameNameList = (ArrayList) duplicateNameEntry; + sameNameList.add(lvg); + } else { + sameNameList = new ArrayList(); + sameNameList.add(duplicateNameEntry); + sameNameList.add(lvg); + } + + _nameToLVGMap.put(lvg.getName(), sameNameList); + } + } + + /** + * Remove the mapping from the name of the specified + * {@link LocalVariableGen} to itself. + * See also {@link #registerByName(LocalVariableGen)} and + * {@link #lookUpByName(String)} + * @param lvg aLocalVariableGen
+ */
+ protected void removeByNameTracking(LocalVariableGen lvg) {
+ Object duplicateNameEntry = _nameToLVGMap.get(lvg.getName());
+
+ if (duplicateNameEntry instanceof ArrayList) {
+ ArrayList sameNameList = (ArrayList) duplicateNameEntry;
+ for (int i = 0; i < sameNameList.size(); i++) {
+ if (sameNameList.get(i) == lvg) {
+ sameNameList.remove(i);
+ break;
+ }
+ }
+ } else {
+ _nameToLVGMap.remove(lvg);
+ }
+ }
+
+ /**
+ * Given the name of a variable, finds a {@link LocalVariableGen} + * corresponding to it.
+ *See also {@link #registerByName(LocalVariableGen)} and + * {@link #removeByNameTracking(LocalVariableGen)}
+ * @param name + * @return + */ + protected LocalVariableGen lookUpByName(String name) { + LocalVariableGen lvg = null; + Object duplicateNameEntry = _nameToLVGMap.get(name); + + if (duplicateNameEntry instanceof ArrayList) { + ArrayList sameNameList = (ArrayList) duplicateNameEntry; + + for (int i = 0; i < sameNameList.size(); i++) { + lvg = (LocalVariableGen)sameNameList.get(i); + if (lvg.getName() == name) { + break; + } + } + } else { + lvg = (LocalVariableGen) duplicateNameEntry; + } + + return lvg; + } + + /** + *Gets all {@link LocalVariableGen} objects for this method.
+ *When the includeRemoved
argument has the value
+ * false
, this method replaces uses of
+ * {@link MethodGen#getLocalVariables()} which has
+ * a side-effect of setting the start and end range for any
+ * LocalVariableGen
if either was null
. That
+ * side-effect causes problems for outlining of code in XSLTC.
+ * @param includeRemoved Specifies whether all local variables ever
+ * declared should be returned (true
) or only those not
+ * removed (false
)
+ * @return an array of LocalVariableGen
containing all the
+ * local variables
+ */
+ protected LocalVariableGen[] getLocals(boolean includeRemoved) {
+ LocalVariableGen[] locals = null;
+ ArrayList allVarsEverDeclared = new ArrayList();
+
+ if (includeRemoved) {
+ int slotCount = allVarsEverDeclared.size();
+
+ for (int i = 0; i < slotCount; i++) {
+ Object slotEntries = _variables.get(i);
+ if (slotEntries != null) {
+ if (slotEntries instanceof ArrayList) {
+ ArrayList slotList = (ArrayList) slotEntries;
+
+ for (int j = 0; j < slotList.size(); j++) {
+ allVarsEverDeclared.add(slotList.get(i));
+ }
+ } else {
+ allVarsEverDeclared.add(slotEntries);
+ }
+ }
+ }
+ } else {
+ Iterator nameVarsPairsIter = _nameToLVGMap.entrySet().iterator();
+
+ while (nameVarsPairsIter.hasNext()) {
+ Map.Entry nameVarsPair =
+ (Map.Entry) nameVarsPairsIter.next();
+ Object vars = nameVarsPair.getValue();
+ if (vars != null) {
+ if (vars instanceof ArrayList) {
+ ArrayList varsList = (ArrayList) vars;
+ for (int i = 0; i < varsList.size(); i++) {
+ allVarsEverDeclared.add(varsList.get(i));
+ }
+ } else {
+ allVarsEverDeclared.add(vars);
+ }
+ }
+ }
+ }
+
+ locals = new LocalVariableGen[allVarsEverDeclared.size()];
+ allVarsEverDeclared.toArray(locals);
+
+ return locals;
+ }
+ }
+
+ /**
+ * Determines whether a particular variable is in use at a particular offset
+ * in the byte code for this method.
+ *
Preconditions: + *
true
if and only if the specified variable is in
+ * use at the particular byte code offset.
+ */
+ boolean offsetInLocalVariableGenRange(LocalVariableGen lvg, int offset) {
+ InstructionHandle lvgStart = lvg.getStart();
+ InstructionHandle lvgEnd = lvg.getEnd();
+
+ // If no start handle is recorded for the LocalVariableGen, it is
+ // assumed to be in use from the beginning of the method.
+ if (lvgStart == null) {
+ lvgStart = getInstructionList().getStart();
+ }
+
+ // If no end handle is recorded for the LocalVariableGen, it is assumed
+ // to be in use to the end of the method.
+ if (lvgEnd == null) {
+ lvgEnd = getInstructionList().getEnd();
+ }
+
+ // Does the range of the instruction include the specified offset?
+ // Note that the InstructionHandle.getPosition method returns the
+ // offset of the beginning of an instruction. A LocalVariableGen's
+ // range includes the end instruction itself, so that instruction's
+ // length must be taken into consideration in computing whether the
+ // varible is in range at a particular offset.
+ return ((lvgStart.getPosition() <= offset)
+ && (lvgEnd.getPosition()
+ + lvgEnd.getInstruction().getLength() >= offset));
}
public void removeLocalVariable(LocalVariableGen lvg) {
_slotAllocator.releaseSlot(lvg);
+ getLocalVariableRegistry().removeByNameTracking(lvg);
super.removeLocalVariable(lvg);
}
@@ -294,11 +681,7 @@
}
public LocalVariableGen getLocalVariable(String name) {
- final LocalVariableGen[] vars = getLocalVariables();
- for (int i = 0; i < vars.length; i++)
- if (vars[i].getName().equals(name))
- return vars[i];
- return null;
+ return getLocalVariableRegistry().lookUpByName(name);
}
public void setMaxLocals() {
@@ -320,21 +703,1447 @@
super.setMaxLocals(maxLocals);
}
+ /**
+ * Add a pre-compiled pattern to this mode.
+ */
+ public void addInstructionList(Pattern pattern, InstructionList ilist) {
+ _preCompiled.put(pattern, ilist);
+ }
+
+ /**
+ * Get the instruction list for a pre-compiled pattern. Used by
+ * test sequences to avoid compiling patterns more than once.
+ */
+ public InstructionList getInstructionList(Pattern pattern) {
+ return (InstructionList) _preCompiled.get(pattern);
+ }
+
+ /**
+ * Used to keep track of an outlineable chunk of instructions in the
+ * current method. See {@link OutlineableChunkStart} and
+ * {@link OutlineableChunkEnd} for more information.
+ */
+ private class Chunk implements Comparable {
/**
- * Add a pre-compiled pattern to this mode.
+ * {@link InstructionHandle} of the first instruction in the outlineable
+ * chunk.
+ */
+ private InstructionHandle m_start;
+
+ /**
+ * {@link org.apache.bcel.generic.InstructionHandle} of the first
+ * instruction in the outlineable chunk.
+ */
+ private InstructionHandle m_end;
+
+ /**
+ * Number of bytes in the instructions contained in this outlineable
+ * chunk.
*/
- public void addInstructionList(Pattern pattern,
- InstructionList ilist)
- {
- _preCompiled.put(pattern, ilist);
+ private int m_size;
+
+ /**
+ * Constructor for an outlineable {@link MethodGenerator.Chunk}.
+ *Preconditions: + *
MethodGenerator.Chunk
, with no other intervening
+ * instructions, including {@link OutlineableChunkStart} or
+ * {@link OutlineableChunkEnd} instructions.
+ * @param neighbour an outlineable {@link MethodGenerator.Chunk}
+ * @return true
if and only if the argument chunk
+ * immediately follows this
chunk
+ */
+ boolean isAdjacentTo(Chunk neighbour) {
+ return getChunkEnd().getNext() == neighbour.getChunkStart();
+ }
+
+ /**
+ * Getter method for the start of this {@linke MethodGenerator.Chunk}
+ * @return the {@link org.apache.bcel.generic.InstructionHandle} of the
+ * start of this chunk
+ */
+ InstructionHandle getChunkStart() {
+ return m_start;
+ }
+
+ /**
+ * Getter method for the end of this {@link MethodGenerator.Chunk}
+ * @return the {@link InstructionHandle} of the start of this chunk
+ */
+ InstructionHandle getChunkEnd() {
+ return m_end;
+ }
+
+ /**
+ * The size of this {@link MethodGenerator.Chunk}
+ * @return the number of bytes in the byte code represented by this
+ * chunk.
+ */
+ int getChunkSize() {
+ return m_size;
}
/**
- * Get the instruction list for a pre-compiled pattern. Used by
- * test sequences to avoid compiling patterns more than once.
+ * Implements the java.util.Comparable.compareTo(Object)
+ * method.
+ * @return
+ * int
if the length of this
+ * chunk in bytes is greater than that of comparand
int
if the length of this
+ * chunk in bytes is less than that of comparand
java.util.ArrayList
containing the
+ * {@link MethodGenerator.Chunk}s that may be outlined from this method
+ */
+ private ArrayList getCandidateChunks(ClassGenerator classGen,
+ int totalMethodSize) {
+ Iterator instructions = getInstructionList().iterator();
+ ArrayList candidateChunks = new ArrayList();
+ ArrayList currLevelChunks = new ArrayList();
+ Stack subChunkStack = new Stack();
+ boolean openChunkAtCurrLevel = false;
+ boolean firstInstruction = true;
+
+ InstructionHandle currentHandle;
+
+ if (m_openChunks != 0) {
+ String msg =
+ (new ErrorMsg(ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS))
+ .toString();
+ throw new InternalError(msg);
+ }
+
+ // Scan instructions in the method, keeping track of the nesting level
+ // of outlineable chunks.
+ //
+ // currLevelChunks
+ // keeps track of the child chunks of a chunk. For each chunk,
+ // there will be a pair of entries: the InstructionHandles for the
+ // start and for the end of the chunk
+ // subChunkStack
+ // a stack containing the partially accumulated currLevelChunks for
+ // each chunk that's still open at the current position in the
+ // InstructionList.
+ // candidateChunks
+ // the list of chunks which have been accepted as candidates chunks
+ // for outlining
+ do {
+ // Get the next instruction. The loop will perform one extra
+ // iteration after it reaches the end of the InstructionList, with
+ // currentHandle set to null.
+ currentHandle = instructions.hasNext()
+ ? (InstructionHandle) instructions.next()
+ : null;
+ Instruction inst =
+ (currentHandle != null) ? currentHandle.getInstruction()
+ : null;
+
+ // At the first iteration, create a chunk representing all the
+ // code in the method. This is done just to simplify the logic -
+ // this chunk can never be outlined because it will be too big.
+ if (firstInstruction) {
+ openChunkAtCurrLevel = true;
+ currLevelChunks.add(currentHandle);
+ firstInstruction = false;
+ }
+
+ // Found a new chunk
+ if (inst instanceof OutlineableChunkStart) {
+ // If last MarkerInstruction encountered was an
+ // OutlineableChunkStart, this represents the first chunk
+ // nested within that previous chunk - push the list of chunks
+ // from the outer level onto the stack
+ if (openChunkAtCurrLevel) {
+ subChunkStack.push(currLevelChunks);
+ currLevelChunks = new ArrayList();
+ }
+
+ openChunkAtCurrLevel = true;
+ currLevelChunks.add(currentHandle);
+ // Close off an open chunk
+ } else if (currentHandle == null
+ || inst instanceof OutlineableChunkEnd) {
+ ArrayList nestedSubChunks = null;
+
+ // If the last MarkerInstruction encountered was an
+ // OutlineableChunkEnd, it means that the current instruction
+ // marks the end of a chunk that contained child chunks.
+ // Those children might need to be examined below in case they
+ // are better candidates for outlining than the current chunk.
+ if (!openChunkAtCurrLevel) {
+ nestedSubChunks = currLevelChunks;
+ currLevelChunks = (ArrayList)subChunkStack.pop();
+ }
+
+ // Get the handle for the start of this chunk (the last entry
+ // in currLevelChunks)
+ InstructionHandle chunkStart =
+ (InstructionHandle) currLevelChunks.get(
+ currLevelChunks.size()-1);
+
+ int chunkEndPosition =
+ (currentHandle != null) ? currentHandle.getPosition()
+ : totalMethodSize;
+ int chunkSize = chunkEndPosition - chunkStart.getPosition();
+
+ // Two ranges of chunk size to consider:
+ //
+ // 1. [0,TARGET_METHOD_SIZE]
+ // Keep this chunk in consideration as a candidate,
+ // and ignore its subchunks, if any - there's nothing to be
+ // gained by outlining both the current chunk and its
+ // children!
+ //
+ // 2. (TARGET_METHOD_SIZE,+infinity)
+ // Ignore this chunk - it's too big. Add its subchunks
+ // as candidates, after merging adjacent chunks to produce
+ // chunks that are as large as possible
+ if (chunkSize <= TARGET_METHOD_SIZE) {
+ currLevelChunks.add(currentHandle);
+ } else {
+ if (!openChunkAtCurrLevel) {
+ int childChunkCount = nestedSubChunks.size() / 2;
+ if (childChunkCount > 0) {
+ Chunk[] childChunks = new Chunk[childChunkCount];
+
+ // Gather all the child chunks of the current chunk
+ for (int i = 0; i < childChunkCount; i++) {
+ InstructionHandle start =
+ (InstructionHandle) nestedSubChunks
+ .get(i*2);
+ InstructionHandle end =
+ (InstructionHandle) nestedSubChunks
+ .get(i*2+1);
+
+ childChunks[i] = new Chunk(start, end);
+ }
+
+ // Merge adjacent siblings
+ ArrayList mergedChildChunks =
+ mergeAdjacentChunks(childChunks);
+
+ // Add chunks that mean minimum size requirements
+ // to the list of candidate chunks for outlining
+ for (int i = 0; i < mergedChildChunks.size(); i++) {
+ Chunk mergedChunk =
+ (Chunk)mergedChildChunks.get(i);
+ int mergedSize = mergedChunk.getChunkSize();
+
+ if (mergedSize >= MINIMUM_OUTLINEABLE_CHUNK_SIZE
+ && mergedSize <= TARGET_METHOD_SIZE) {
+ candidateChunks.add(mergedChunk);
+ }
+ }
+ }
+ }
+
+ // Drop the chunk which was too big
+ currLevelChunks.remove(currLevelChunks.size() - 1);
+ }
+
+ // currLevelChunks contains pairs of InstructionHandles. If
+ // its size is an odd number, the loop has encountered the
+ // start of a chunk at this level, but not its end.
+ openChunkAtCurrLevel = ((currLevelChunks.size() & 0x1) == 1);
+ }
+
+ } while (currentHandle != null);
+
+ return candidateChunks;
+ }
+
+ /**
+ * Merge adjacent sibling chunks to produce larger candidate chunks for
+ * outlining
+ * @param chunks array of sibling {@link MethodGenerator.Chunk}s that are
+ * under consideration for outlining. Chunks must be in
+ * the order encountered in the {@link InstructionList}
+ * @return a java.util.ArrayList
of
+ * MethodGenerator.Chunk
s maximally merged
+ */
+ private ArrayList mergeAdjacentChunks(Chunk[] chunks) {
+ int[] adjacencyRunStart = new int[chunks.length];
+ int[] adjacencyRunLength = new int[chunks.length];
+ boolean[] chunkWasMerged = new boolean[chunks.length];
+
+ int maximumRunOfChunks = 0;
+ int startOfCurrentRun;
+ int numAdjacentRuns = 0;
+
+ ArrayList mergedChunks = new ArrayList();
+
+ startOfCurrentRun = 0;
+
+ // Loop through chunks, and record in adjacencyRunStart where each
+ // run of adjacent chunks begins and how many are in that run. For
+ // example, given chunks A B C D E F, if A is adjacent to B, but not
+ // to C, and C, D, E and F are all adjacent,
+ // adjacencyRunStart[0] == 0; adjacencyRunLength[0] == 2
+ // adjacencyRunStart[1] == 2; adjacencyRunLength[1] == 4
+ for (int i = 1; i < chunks.length; i++) {
+ if (!chunks[i-1].isAdjacentTo(chunks[i])) {
+ int lengthOfRun = i - startOfCurrentRun;
+
+ // Track the longest run of chunks found
+ if (maximumRunOfChunks < lengthOfRun) {
+ maximumRunOfChunks = lengthOfRun;
+ }
+
+ if (lengthOfRun > 1 ) {
+ adjacencyRunLength[numAdjacentRuns] = lengthOfRun;
+ adjacencyRunStart[numAdjacentRuns] = startOfCurrentRun;
+ numAdjacentRuns++;
+ }
+
+ startOfCurrentRun = i;
+ }
+ }
+
+ if (chunks.length - startOfCurrentRun > 1) {
+ int lengthOfRun = chunks.length - startOfCurrentRun;
+
+ // Track the longest run of chunks found
+ if (maximumRunOfChunks < lengthOfRun) {
+ maximumRunOfChunks = lengthOfRun;
+ }
+
+ adjacencyRunLength[numAdjacentRuns] =
+ chunks.length - startOfCurrentRun;
+ adjacencyRunStart[numAdjacentRuns] = startOfCurrentRun;
+ numAdjacentRuns++;
+ }
+
+ // Try merging adjacent chunks to come up with better sized chunks for
+ // outlining. This algorithm is not optimal, but it should be
+ // reasonably fast. Consider an example like this, where four chunks
+ // of the sizes specified in brackets are adjacent. The best way of
+ // combining these chunks would be to merge the first pair and merge
+ // the last three to form two chunks, but the algorithm will merge the
+ // three in the middle instead, leaving three chunks in all.
+ // [25000] [25000] [20000] [1000] [20000]
+
+ // Start by trying to merge the maximum number of adjacent chunks, and
+ // work down from there.
+ for (int numToMerge = maximumRunOfChunks; numToMerge>1; numToMerge--) {
+ // Look at each run of adjacent chunks
+ for (int run = 0; run < numAdjacentRuns; run++) {
+ int runStart = adjacencyRunStart[run];
+ int runEnd = runStart + adjacencyRunLength[run] - 1;
+
+ boolean foundChunksToMerge = false;
+
+ // Within the current run of adjacent chunks, look at all
+ // "subruns" of length numToMerge, until we run out or find
+ // a subrun that can be merged.
+ for (int mergeStart = runStart;
+ mergeStart+numToMerge-1 <= runEnd && !foundChunksToMerge;
+ mergeStart++) {
+ int mergeEnd = mergeStart + numToMerge - 1;
+ int mergeSize = 0;
+
+ // Find out how big the subrun is
+ for (int j = mergeStart; j <= mergeEnd; j++) {
+ mergeSize = mergeSize + chunks[j].getChunkSize();
+ }
+
+ // If the current subrun is small enough to outline,
+ // merge it, and split the remaining chunks in the run
+ if (mergeSize <= TARGET_METHOD_SIZE) {
+ foundChunksToMerge = true;
+
+ for (int j = mergeStart; j <= mergeEnd; j++) {
+ chunkWasMerged[j] = true;
+ }
+
+ mergedChunks.add(
+ new Chunk(chunks[mergeStart].getChunkStart(),
+ chunks[mergeEnd].getChunkEnd()));
+
+ // Adjust the length of the current run of adjacent
+ // chunks to end at the newly merged chunk...
+ adjacencyRunLength[run] =
+ adjacencyRunStart[run] - mergeStart;
+
+ int trailingRunLength = runEnd - mergeEnd;
+
+ // and any chunks that follow the newly merged chunk
+ // in the current run of adjacent chunks form another
+ // new run of adjacent chunks
+ if (trailingRunLength >= 2) {
+ adjacencyRunStart[numAdjacentRuns] = mergeEnd + 1;
+ adjacencyRunLength[numAdjacentRuns] =
+ trailingRunLength;
+ numAdjacentRuns++;
+ }
+ }
+ }
+ }
+ }
+
+ // Make a final pass for any chunk that wasn't merged with a sibling
+ // and include it in the list of chunks after merging.
+ for (int i = 0; i < chunks.length; i++) {
+ if (!chunkWasMerged[i]) {
+ mergedChunks.add(chunks[i]);
+ }
+ }
+
+ return mergedChunks;
+ }
+
+ /**
+ * Breaks up the IL for this {@link MethodGenerator} into separate
+ * outlined methods so that no method exceeds the 64KB limit on the length
+ * of the byte code associated with a method.
+ * @param classGen The {@link ClassGen} with which the generated methods
+ * will be associated
+ * @param originalMethodSize The number of bytes of bytecode represented by
+ * the {@link InstructionList} of this method
+ * @return an array of the outlined Method
s and the original
+ * method itself
+ */
+ public Method[] outlineChunks(ClassGenerator classGen,
+ int originalMethodSize) {
+ ArrayList methodsOutlined = new ArrayList();
+ int currentMethodSize = originalMethodSize;
+
+ int outlinedCount = 0;
+ boolean moreMethodsOutlined;
+ String originalMethodName = getName();
+
+ // Special handling for initialization methods. No other methods can
+ // include the less than and greater than characters in their names,
+ // so we munge the names here.
+ if (originalMethodName.equals("InstructionHandle
of the last instruction in
+ * the chunk to outline
+ * @param outlinedMethodName The name of the new method
+ * @param classGen The {@link ClassGenerator} of which the original
+ * and new methods will be members
+ * @return The new {@link Method} containing the outlined code.
+ */
+ private Method outline(InstructionHandle first, InstructionHandle last,
+ String outlinedMethodName, ClassGenerator classGen) {
+ // We're not equipped to deal with exception handlers yet. Bail out!
+ if (getExceptionHandlers().length != 0) {
+ String msg = (new ErrorMsg(ErrorMsg.OUTLINE_ERR_TRY_CATCH))
+ .toString();
+ throw new InternalError(msg);
+ }
+
+ int outlineChunkStartOffset = first.getPosition();
+ int outlineChunkEndOffset = last.getPosition()
+ + last.getInstruction().getLength();
+
+ ConstantPoolGen cpg = getConstantPool();
+
+ // Create new outlined method with signature:
+ //
+ // private final outlinedMethodName(CopyLocals copyLocals);
+ //
+ // CopyLocals is an object that is used to copy-in/copy-out local
+ // variables that are used by the outlined method. Only locals whose
+ // value is potentially set or referenced outside the range of the
+ // chunk that is being outlined will be represented in CopyLocals. The
+ // type of the variable for copying local variables is actually
+ // generated to be unique - it is not named CopyLocals.
+ //
+ // The outlined method never needs to be referenced outside of this
+ // class, and will never be overridden, so we mark it private final.
+ final InstructionList newIL = new InstructionList();
+
+ final XSLTC xsltc = classGen.getParser().getXSLTC();
+ final String argTypeName = xsltc.getHelperClassName();
+ final Type[] argTypes =
+ new Type[] {(new ObjectType(argTypeName)).toJCType()};
+ final String argName = "copyLocals";
+ final String[] argNames = new String[] {argName};
+
+ int methodAttributes = ACC_PRIVATE | ACC_FINAL;
+ final boolean isStaticMethod = (getAccessFlags() & ACC_STATIC) != 0;
+
+ if (isStaticMethod) {
+ methodAttributes = methodAttributes | ACC_STATIC;
+ }
+
+ final MethodGenerator outlinedMethodGen =
+ new MethodGenerator(methodAttributes,
+ com.sun.org.apache.bcel.internal.generic.Type.VOID,
+ argTypes, argNames, outlinedMethodName,
+ getClassName(), newIL, cpg);
+
+ // Create class for copying local variables to the outlined method.
+ // The fields the class will need to contain will be determined as the
+ // code in the outlineable chunk is examined.
+ ClassGenerator copyAreaCG
+ = new ClassGenerator(argTypeName, OBJECT_CLASS, argTypeName+".java",
+ ACC_FINAL | ACC_PUBLIC | ACC_SUPER, null,
+ classGen.getStylesheet()) {
+ public boolean isExternal() {
+ return true;
+ }
+ };
+ ConstantPoolGen copyAreaCPG = copyAreaCG.getConstantPool();
+ copyAreaCG.addEmptyConstructor(ACC_PUBLIC);
+
+ // Number of fields in the copy class
+ int copyAreaFieldCount = 0;
+
+ // The handle for the instruction after the last one to be outlined.
+ // Note that this should never end up being null. An outlineable chunk
+ // won't contain a RETURN instruction or other branch out of the chunk,
+ // and the JVM specification prohibits code in a method from just
+ // "falling off the end" so this should always point to a valid handle.
+ InstructionHandle limit = last.getNext();
+
+ // InstructionLists for copying values into and out of an instance of
+ // CopyLocals:
+ // oldMethCoypInIL - from locals in old method into an instance
+ // of the CopyLocals class (oldMethCopyInIL)
+ // oldMethCopyOutIL - from CopyLocals back into locals in the old
+ // method
+ // newMethCopyInIL - from CopyLocals into locals in the new
+ // method
+ // newMethCopyOutIL - from locals in new method into the instance
+ // of the CopyLocals class
+ InstructionList oldMethCopyInIL = new InstructionList();
+ InstructionList oldMethCopyOutIL = new InstructionList();
+ InstructionList newMethCopyInIL = new InstructionList();
+ InstructionList newMethCopyOutIL = new InstructionList();
+
+ // Allocate instance of class in which we'll copy in or copy out locals
+ // and make two copies: last copy is used to invoke constructor;
+ // other two are used for references to fields in the CopyLocals object
+ InstructionHandle outlinedMethodCallSetup =
+ oldMethCopyInIL.append(new NEW(cpg.addClass(argTypeName)));
+ oldMethCopyInIL.append(InstructionConstants.DUP);
+ oldMethCopyInIL.append(InstructionConstants.DUP);
+ oldMethCopyInIL.append(
+ new INVOKESPECIAL(cpg.addMethodref(argTypeName, "InstructionList
is empty.
+ * See {@link OutlineableChunkStart} for more information.
+ */
+ public void markChunkStart() {
+ // m_chunkTree.markChunkStart();
+ getInstructionList()
+ .append(OutlineableChunkStart.OUTLINEABLECHUNKSTART);
+ m_totalChunks++;
+ m_openChunks++;
+ }
+
+ /**
+ * Mark the end of an outlineable chunk of code. See
+ * {@link OutlineableChunkStart} for more information.
+ */
+ public void markChunkEnd() {
+ // m_chunkTree.markChunkEnd();
+ getInstructionList()
+ .append(OutlineableChunkEnd.OUTLINEABLECHUNKEND);
+ m_openChunks--;
+ if (m_openChunks < 0) {
+ String msg = (new ErrorMsg(ErrorMsg.OUTLINE_ERR_UNBALANCED_MARKERS))
+ .toString();
+ throw new InternalError(msg);
+ }
+ }
+
+ /**
+ * Get all {@link Method}s generated by this {@link MethodGenerator}.
+ * The {@link MethodGen#getMethod()} only returns a single
+ * Method
object. This method takes into account the Java
+ * Virtual Machine Specification limit of 64KB on the size of a method, and
+ * may return more than one Method
.
If the code associated with the MethodGenerator
would
+ * exceed the 64KB limit, this method will attempt to split the code in
+ * the {@link InstructionList} associated with this
+ * MethodGenerator
into several methods.
Method
s generated
+ */
+ Method[] getGeneratedMethods(ClassGenerator classGen) {
+ Method[] generatedMethods;
+ InstructionList il = getInstructionList();
+ InstructionHandle last = il.getEnd();
+
+ il.setPositions();
+
+ int instructionListSize =
+ last.getPosition() + last.getInstruction().getLength();
+
+ // Need to look for any branch target offsets that exceed the range
+ // [-32768,32767]
+ if (instructionListSize > MAX_BRANCH_TARGET_OFFSET) {
+ boolean ilChanged = widenConditionalBranchTargetOffsets();
+
+ // If any branch instructions needed widening, recompute the size
+ // of the byte code for the method
+ if (ilChanged) {
+ il.setPositions();
+ last = il.getEnd();
+ instructionListSize =
+ last.getPosition() + last.getInstruction().getLength();
+ }
+ }
+
+ if (instructionListSize > MAX_METHOD_SIZE) {
+ generatedMethods = outlineChunks(classGen, instructionListSize);
+ } else {
+ generatedMethods = new Method[] {getThisMethod()};
+ }
+ return generatedMethods;
+ }
+
+ protected Method getThisMethod() {
+ stripAttributes(true);
+ setMaxLocals();
+ setMaxStack();
+ removeNOPs();
+
+ return getMethod();
+ }
+ /**
+ * Rewrites branches to avoid the JVM limits of relative branch + * offsets. There is no need to invoke this method if the bytecode for the + * {@link MethodGenerator} does not exceed 32KB.
+ *The Java Virtual Machine Specification permits the code portion of a + * method to be up to 64KB in length. However, some control transfer + * instructions specify relative offsets as a signed 16-bit quantity, + * limiting the range to a subset of the instructions that might be in a + * method.
+ *The TABLESWITCH
and LOOKUPSWITCH
+ * instructions always use 32-bit signed relative offsets, so they are
+ * immune to this problem.
The GOTO
and JSR
+ * instructions come in two forms, one of which uses 16-bit relative
+ * offsets, and the other of which uses 32-bit relative offsets. The BCEL
+ * library decides whether to use the wide form of GOTO
or
+ * JSR
instructions based on the relative offset of the target
+ * of the instruction without any intervention by the user of the
+ * library.
This leaves the various conditional branch instructions,
+ * IFEQ
, IFNULL
, IF_ICMPEQ
,
+ * et al., all of which use 16-bit signed relative offsets, with no
+ * 32-bit wide form available.
This method scans the {@link InstructionList} associated with this
+ * {@link MethodGenerator} and finds all conditional branch instructions
+ * that might exceed the 16-bit limitation for relative branch offsets.
+ * The logic of each such instruction is inverted, and made to target the
+ * instruction which follows it. An unconditional branch to the original
+ * target of the instruction is then inserted between the conditional
+ * branch and the instruction which previously followed it. The
+ * unconditional branch is permitted to have a 16-bit or a 32-bit relative
+ * offset, as described above. For example,
+ *
+ * 1234: NOP
+ * ...
+ * 55278: IFEQ -54044
+ * 55280: NOP
+ *
+ * is rewritten as
+ *
+ * 1234: NOP
+ * ...
+ * 55278: IFNE 7
+ * 55280: GOTO_W -54046
+ * 55285: NOP
+ *
Preconditions: + *
InstructionList
associated with this
+ * MethodGenerator
.
+ * Postconditions: + *
InstructionList
for this
+ * MethodGenerator
will invalidate the changes made by this
+ * method.true
if the InstructionList
was
+ * modified; false
otherwise
+ * @see The Java Virtual Machine Specification, Second Edition
+ */
+ boolean widenConditionalBranchTargetOffsets() {
+ boolean ilChanged = false;
+ int maxOffsetChange = 0;
+ InstructionList il = getInstructionList();
+
+ // Loop through all the instructions, finding those that would be
+ // affected by inserting new instructions in the InstructionList, and
+ // calculating the maximum amount by which the relative offset between
+ // two instructions could possibly change.
+ // In part this loop duplicates code in
+ // org.apache.bcel.generic.InstructionList.setPosition(), which does
+ // this to determine whether to use 16-bit or 32-bit offsets for GOTO
+ // and JSR instructions. Ideally, that method would do the same for
+ // conditional branch instructions, but it doesn't, so we duplicate the
+ // processing here.
+ for (InstructionHandle ih = il.getStart();
+ ih != null;
+ ih = ih.getNext()) {
+ Instruction inst = ih.getInstruction();
+
+ switch (inst.getOpcode()) {
+ // Instructions that may have 16-bit or 32-bit branch targets.
+ // The size of the branch offset might increase by two bytes.
+ case Constants.GOTO:
+ case Constants.JSR:
+ maxOffsetChange = maxOffsetChange + 2;
+ break;
+ // Instructions that contain padding for alignment purposes
+ // Up to three bytes of padding might be needed. For greater
+ // accuracy, we should be able to discount any padding already
+ // added to these instructions by InstructionList.setPosition(),
+ // their APIs do not expose that information.
+ case Constants.TABLESWITCH:
+ case Constants.LOOKUPSWITCH:
+ maxOffsetChange = maxOffsetChange + 3;
+ break;
+ // Instructions that might be rewritten by this method as a
+ // conditional branch followed by an unconditional branch.
+ // The unconditional branch would require five bytes.
+ case Constants.IF_ACMPEQ:
+ case Constants.IF_ACMPNE:
+ case Constants.IF_ICMPEQ:
+ case Constants.IF_ICMPGE:
+ case Constants.IF_ICMPGT:
+ case Constants.IF_ICMPLE:
+ case Constants.IF_ICMPLT:
+ case Constants.IF_ICMPNE:
+ case Constants.IFEQ:
+ case Constants.IFGE:
+ case Constants.IFGT:
+ case Constants.IFLE:
+ case Constants.IFLT:
+ case Constants.IFNE:
+ case Constants.IFNONNULL:
+ case Constants.IFNULL:
+ maxOffsetChange = maxOffsetChange + 5;
+ break;
+ }
+ }
+
+ // Now that the maximum number of bytes by which the method might grow
+ // has been determined, look for conditional branches to see which
+ // might possibly exceed the 16-bit relative offset.
+ for (InstructionHandle ih = il.getStart();
+ ih != null;
+ ih = ih.getNext()) {
+ Instruction inst = ih.getInstruction();
+
+ if (inst instanceof IfInstruction) {
+ IfInstruction oldIfInst = (IfInstruction)inst;
+ BranchHandle oldIfHandle = (BranchHandle)ih;
+ InstructionHandle target = oldIfInst.getTarget();
+ int relativeTargetOffset = target.getPosition()
+ - oldIfHandle.getPosition();
+
+ // Consider the worst case scenario in which the conditional
+ // branch and its target are separated by all the instructions
+ // in the method that might increase in size. If that results
+ // in a relative offset that cannot be represented as a 32-bit
+ // signed quantity, rewrite the instruction as described above.
+ if ((relativeTargetOffset - maxOffsetChange
+ < MIN_BRANCH_TARGET_OFFSET)
+ || (relativeTargetOffset + maxOffsetChange
+ > MAX_BRANCH_TARGET_OFFSET)) {
+ // Invert the logic of the IF instruction, and append
+ // that to the InstructionList following the original IF
+ // instruction
+ InstructionHandle nextHandle = oldIfHandle.getNext();
+ IfInstruction invertedIfInst = oldIfInst.negate();
+ BranchHandle invertedIfHandle = il.append(oldIfHandle,
+ invertedIfInst);
+
+ // Append an unconditional branch to the target of the
+ // original IF instruction after the new IF instruction
+ BranchHandle gotoHandle = il.append(invertedIfHandle,
+ new GOTO(target));
+
+ // If the original IF was the last instruction in
+ // InstructionList, add a new no-op to act as the target
+ // of the new IF
+ if (nextHandle == null) {
+ nextHandle = il.append(gotoHandle, NOP);
+ }
+
+ // Make the new IF instruction branch around the GOTO
+ invertedIfHandle.updateTarget(target, nextHandle);
+
+ // If anything still "points" to the old IF instruction,
+ // make adjustments to refer to either the new IF or GOTO
+ // instruction
+ if (oldIfHandle.hasTargeters()) {
+ InstructionTargeter[] targeters =
+ oldIfHandle.getTargeters();
+
+ for (int i = 0; i < targeters.length; i++) {
+ InstructionTargeter targeter = targeters[i];
+ // Ideally, one should simply be able to use
+ // InstructionTargeter.updateTarget to change
+ // references to the old IF instruction to the new
+ // IF instruction. However, if a LocalVariableGen
+ // indicated the old IF marked the end of the range
+ // in which the IF variable is in use, the live
+ // range of the variable must extend to include the
+ // newly created GOTO instruction. The need for
+ // this sort of specific knowledge of an
+ // implementor of the InstructionTargeter interface
+ // makes the code more fragile. Future implementors
+ // of the interface might have similar requirements
+ // which wouldn't be accommodated seemlessly.
+ if (targeter instanceof LocalVariableGen) {
+ LocalVariableGen lvg =
+ (LocalVariableGen) targeter;
+ if (lvg.getStart() == oldIfHandle) {
+ lvg.setStart(invertedIfHandle);
+ } else if (lvg.getEnd() == oldIfHandle) {
+ lvg.setEnd(gotoHandle);
+ }
+ } else {
+ targeter.updateTarget(oldIfHandle,
+ invertedIfHandle);
+ }
+ }
+ }
+
+ try {
+ il.delete(oldIfHandle);
+ } catch (TargetLostException tle) {
+ // This can never happen - we updated the list of
+ // instructions that target the deleted instruction
+ // prior to deleting it.
+ String msg =
+ new ErrorMsg(ErrorMsg.OUTLINE_ERR_DELETED_TARGET,
+ tle.getMessage()).toString();
+ throw new InternalError(msg);
+ }
+
+ // Adjust the pointer in the InstructionList to point after
+ // the newly inserted IF instruction
+ ih = gotoHandle;
+
+ // Indicate that this method rewrote at least one IF
+ ilChanged = true;
+ }
+ }
+ }
+
+ // Did this method rewrite any IF instructions?
+ return ilChanged;
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
* * This code is designed to implement the JAXP 1.1 spec pluggability * feature and is designed to run on JDK version 1.1 and - * later, and to compile on JDK 1.2 and onward. + * later, and to compile on JDK 1.2 and onward. * The code also runs both as part of an unbundled jar file and * when bundled as part of the JDK. *
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:40:59 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -4417969773510154215L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ObjectType.java Wed May 02 13:32:36 2012 +0100
@@ -34,6 +34,7 @@
import com.sun.org.apache.bcel.internal.generic.InstructionList;
import com.sun.org.apache.bcel.internal.generic.PUSH;
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
* @author Todd Miller
@@ -53,8 +54,7 @@
_javaClassName = javaClassName;
try {
- _clazz = ObjectFactory.findProviderClass(
- javaClassName, ObjectFactory.findClassLoader(), true);
+ _clazz = ObjectFactory.findProviderClass(javaClassName, true);
}
catch (ClassNotFoundException e) {
_clazz = null;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkEnd.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,70 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: OutlineableChunkEnd.java,v 1.10 2010-11-01 04:34:19 joehw Exp $
+ */
+package com.sun.org.apache.xalan.internal.xsltc.compiler.util;
+import com.sun.org.apache.bcel.internal.generic.Instruction;
+/**
+ *
Marks the end of a region of byte code that can be copied into a new + * method. See the {@link OutlineableChunkStart} pseudo-instruction for + * details.
+ */ +class OutlineableChunkEnd extends MarkerInstruction { + /** + * A constant instance of {@link OutlineableChunkEnd}. As it has no fields, + * there should be no need to create an instance of this class. + */ + public static final Instruction OUTLINEABLECHUNKEND = + new OutlineableChunkEnd(); + + /** + * Private default constructor. As it has no fields, + * there should be no need to create an instance of this class. See + * {@link OutlineableChunkEnd#OUTLINEABLECHUNKEND}. + */ + private OutlineableChunkEnd() { + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String getName() { + return OutlineableChunkEnd.class.getName(); + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String toString() { + return getName(); + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String toString(boolean verbose) { + return getName(); + } +} diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/OutlineableChunkStart.java Wed May 02 13:32:36 2012 +0100 @@ -0,0 +1,80 @@ +/* + * reserved comment block + * DO NOT REMOVE OR ALTER! + */ +/* + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* + * $Id: MethodGenerator.java,v 1.10 2010-11-01 04:34:19 joehw Exp $ + */ +package com.sun.org.apache.xalan.internal.xsltc.compiler.util; +import com.sun.org.apache.bcel.internal.generic.Instruction; + +/** + *This pseudo-instruction marks the beginning of a region of byte code that + * can be copied into a new method, termed an "outlineable" chunk. The size of + * the Java stack must be the same at the start of the region as it is at the + * end of the region, any value on the stack at the start of the region must not + * be consumed by an instruction in the region of code, the region must not + * contain a return instruction, no branch instruction in the region is + * permitted to have a target that is outside the region, and no branch + * instruction outside the region is permitted to have a target that is inside + * the region.
+ *The end of the region is marked by an {@link OutlineableChunkEnd} + * pseudo-instruction.
+ *Such a region of code may contain other outlineable regions.
+ */ +class OutlineableChunkStart extends MarkerInstruction { + /** + * A constant instance of {@link OutlineableChunkStart}. As it has no fields, + * there should be no need to create an instance of this class. + */ + public static final Instruction OUTLINEABLECHUNKSTART = + new OutlineableChunkStart(); + + /** + * Private default constructor. As it has no fields, + * there should be no need to create an instance of this class. See + * {@link OutlineableChunkStart#OUTLINEABLECHUNKSTART}. + */ + private OutlineableChunkStart() { + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String getName() { + return OutlineableChunkStart.class.getName(); + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String toString() { + return getName(); + } + + /** + * Get the name of this instruction. Used for debugging. + * @return the instruction name + */ + public String toString(boolean verbose) { + return getName(); + } +} diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java --- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/RealType.java Wed May 02 13:32:36 2012 +0100 @@ -170,8 +170,8 @@ il.append(DUP2); local = methodGen.addLocalVariable("real_to_boolean_tmp", com.sun.org.apache.bcel.internal.generic.Type.DOUBLE, - il.getEnd(), null); - il.append(new DSTORE(local.getIndex())); + null, null); + local.setStart(il.append(new DSTORE(local.getIndex()))); // Compare it to 0.0 il.append(DCONST_0); @@ -181,7 +181,7 @@ //!!! call isNaN // Compare it to itself to see if NaN il.append(new DLOAD(local.getIndex())); - il.append(new DLOAD(local.getIndex())); + local.setEnd(il.append(new DLOAD(local.getIndex()))); il.append(DCMPG); flowlist.add(il.append(new IFNE(null))); // NaN != NaN return flowlist; diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java --- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/compiler/util/ResultTreeType.java Wed May 02 13:32:36 2012 +0100 @@ -180,7 +180,7 @@ methodGen.addLocalVariable("rt_to_string_handler", Util.getJCRefType(STRING_VALUE_HANDLER_SIG), null, null); - il.append(new ASTORE(handler.getIndex())); + handler.setStart(il.append(new ASTORE(handler.getIndex()))); // Call the method that implements this result tree index = cpg.addMethodref(className, _methodName, @@ -188,7 +188,7 @@ il.append(new INVOKEVIRTUAL(index)); // Restore new handler and call getValue() - il.append(new ALOAD(handler.getIndex())); + handler.setEnd(il.append(new ALOAD(handler.getIndex()))); index = cpg.addMethodref(STRING_VALUE_HANDLER, "getValue", "()" + STRING_SIG); @@ -255,7 +255,7 @@ Util.getJCRefType(DOM_INTF_SIG), null, null); il.append(new CHECKCAST(cpg.addClass(DOM_INTF_SIG))); - il.append(new ASTORE(newDom.getIndex())); + newDom.setStart(il.append(new ASTORE(newDom.getIndex()))); // Overwrite old handler with DOM handler index = cpg.addInterfaceMethodref(DOM_INTF, @@ -275,7 +275,7 @@ methodGen.addLocalVariable("rt_to_reference_handler", Util.getJCRefType(TRANSLET_OUTPUT_SIG), null, null); - il.append(new ASTORE(domBuilder.getIndex())); + domBuilder.setStart(il.append(new ASTORE(domBuilder.getIndex()))); // Call startDocument on the new handler index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE, @@ -292,13 +292,13 @@ il.append(new INVOKEVIRTUAL(index)); // Call endDocument on the DOM handler - il.append(new ALOAD(domBuilder.getIndex())); + domBuilder.setEnd(il.append(new ALOAD(domBuilder.getIndex()))); index = cpg.addInterfaceMethodref(TRANSLET_OUTPUT_INTERFACE, "endDocument", "()V"); il.append(new INVOKEINTERFACE(index, 1)); // Push the new DOM on the stack - il.append(new ALOAD(newDom.getIndex())); + newDom.setEnd(il.append(new ALOAD(newDom.getIndex()))); } } diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AdaptiveResultTreeImpl.java --- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AdaptiveResultTreeImpl.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AdaptiveResultTreeImpl.java Wed May 02 13:32:36 2012 +0100 @@ -44,8 +44,8 @@ /** * AdaptiveResultTreeImpl is a adaptive DOM model for result tree fragments (RTF). It is - * used in the case where the RTF is likely to be pure text yet it can still be a DOM tree. - * It is designed for RTFs which have <xsl:call-template> or <xsl:apply-templates> in + * used in the case where the RTF is likely to be pure text yet it can still be a DOM tree. + * It is designed for RTFs which have <xsl:call-template> or <xsl:apply-templates> in * the contents. Example: ** <xsl:variable name = "x"> @@ -55,13 +55,13 @@ * </xsl:variable> **
In this example the result produced by
* AdaptiveResultTreeImpl can be considered as a smart switcher between SimpleResultTreeImpl
* and SAXImpl. It treats the RTF as simple Text and uses the SimpleResultTreeImpl model
* at the beginning. However, if it receives a call which indicates that this is a DOM tree
- * (e.g. startElement), it will automatically transform itself into a wrapper around a
+ * (e.g. startElement), it will automatically transform itself into a wrapper around a
* SAXImpl. In this way we can have a light-weight model when the result only contains
* simple text, while at the same time it still works when the RTF is a DOM tree.
*
@@ -70,12 +70,12 @@
* wrapped SAXImpl.
*
* %REVISIT% Can we combine this class with SimpleResultTreeImpl? I think it is possible, but
- * it will make SimpleResultTreeImpl more expensive. I will use two separate classes at
+ * it will make SimpleResultTreeImpl more expensive. I will use two separate classes at
* this time.
*/
public class AdaptiveResultTreeImpl extends SimpleResultTreeImpl
{
-
+
// Document URI index, which increases by 1 at each getDocumentURI() call.
private static int _documentURIIndex = 0;
@@ -83,43 +83,43 @@
// The SAXImpl object wrapped by this class, if the RTF is a tree.
private SAXImpl _dom;
-
+
/** The following fields are only used for the nested SAXImpl **/
-
+
// The whitespace filter
private DTMWSFilter _wsfilter;
-
+
// The size of the RTF
private int _initSize;
-
+
// True if we want to build the ID index table
private boolean _buildIdIndex;
-
+
// The AttributeList
private final AttributesImpl _attributes = new AttributesImpl();
-
+
// The element name
private String _openElementName;
-
-
+
+
// Create a AdaptiveResultTreeImpl
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID,
DTMWSFilter wsfilter, int initSize,
boolean buildIdIndex)
{
super(dtmManager, documentID);
-
+
_wsfilter = wsfilter;
_initSize = initSize;
_buildIdIndex = buildIdIndex;
}
-
+
// Return the DOM object wrapped in this object.
public DOM getNestedDOM()
{
return _dom;
}
-
+
// Return the document ID
public int getDocument()
{
@@ -141,7 +141,7 @@
return super.getStringValue();
}
}
-
+
public DTMAxisIterator getIterator()
{
if (_dom != null) {
@@ -151,7 +151,7 @@
return super.getIterator();
}
}
-
+
public DTMAxisIterator getChildren(final int node)
{
if (_dom != null) {
@@ -161,7 +161,7 @@
return super.getChildren(node);
}
}
-
+
public DTMAxisIterator getTypedChildren(final int type)
{
if (_dom != null) {
@@ -171,7 +171,7 @@
return super.getTypedChildren(type);
}
}
-
+
public DTMAxisIterator getAxisIterator(final int axis)
{
if (_dom != null) {
@@ -181,7 +181,7 @@
return super.getAxisIterator(axis);
}
}
-
+
public DTMAxisIterator getTypedAxisIterator(final int axis, final int type)
{
if (_dom != null) {
@@ -189,9 +189,9 @@
}
else {
return super.getTypedAxisIterator(axis, type);
- }
+ }
}
-
+
public DTMAxisIterator getNthDescendant(int node, int n, boolean includeself)
{
if (_dom != null) {
@@ -201,7 +201,7 @@
return super.getNthDescendant(node, n, includeself);
}
}
-
+
public DTMAxisIterator getNamespaceAxisIterator(final int axis, final int ns)
{
if (_dom != null) {
@@ -211,9 +211,9 @@
return super.getNamespaceAxisIterator(axis, ns);
}
}
-
+
public DTMAxisIterator getNodeValueIterator(DTMAxisIterator iter, int returnType,
- String value, boolean op)
+ String value, boolean op)
{
if (_dom != null) {
return _dom.getNodeValueIterator(iter, returnType, value, op);
@@ -222,7 +222,7 @@
return super.getNodeValueIterator(iter, returnType, value, op);
}
}
-
+
public DTMAxisIterator orderNodes(DTMAxisIterator source, int node)
{
if (_dom != null) {
@@ -232,7 +232,7 @@
return super.orderNodes(source, node);
}
}
-
+
public String getNodeName(final int node)
{
if (_dom != null) {
@@ -242,7 +242,7 @@
return super.getNodeName(node);
}
}
-
+
public String getNodeNameX(final int node)
{
if (_dom != null) {
@@ -252,7 +252,7 @@
return super.getNodeNameX(node);
}
}
-
+
public String getNamespaceName(final int node)
{
if (_dom != null) {
@@ -262,7 +262,7 @@
return super.getNamespaceName(node);
}
}
-
+
// Return the expanded type id of a given node
public int getExpandedTypeID(final int nodeHandle)
{
@@ -273,7 +273,7 @@
return super.getExpandedTypeID(nodeHandle);
}
}
-
+
public int getNamespaceType(final int node)
{
if (_dom != null) {
@@ -283,7 +283,7 @@
return super.getNamespaceType(node);
}
}
-
+
public int getParent(final int nodeHandle)
{
if (_dom != null) {
@@ -293,7 +293,7 @@
return super.getParent(nodeHandle);
}
}
-
+
public int getAttributeNode(final int gType, final int element)
{
if (_dom != null) {
@@ -303,7 +303,7 @@
return super.getAttributeNode(gType, element);
}
}
-
+
public String getStringValueX(final int nodeHandle)
{
if (_dom != null) {
@@ -313,9 +313,9 @@
return super.getStringValueX(nodeHandle);
}
}
-
+
public void copy(final int node, SerializationHandler handler)
- throws TransletException
+ throws TransletException
{
if (_dom != null) {
_dom.copy(node, handler);
@@ -324,9 +324,9 @@
super.copy(node, handler);
}
}
-
+
public void copy(DTMAxisIterator nodes, SerializationHandler handler)
- throws TransletException
+ throws TransletException
{
if (_dom != null) {
_dom.copy(nodes, handler);
@@ -335,9 +335,9 @@
super.copy(nodes, handler);
}
}
-
+
public String shallowCopy(final int node, SerializationHandler handler)
- throws TransletException
+ throws TransletException
{
if (_dom != null) {
return _dom.shallowCopy(node, handler);
@@ -346,7 +346,7 @@
return super.shallowCopy(node, handler);
}
}
-
+
public boolean lessThan(final int node1, final int node2)
{
if (_dom != null) {
@@ -356,7 +356,7 @@
return super.lessThan(node1, node2);
}
}
-
+
/**
* Dispatch the character content of a node to an output handler.
*
@@ -364,16 +364,16 @@
* a handler.
*/
public void characters(final int node, SerializationHandler handler)
- throws TransletException
+ throws TransletException
{
if (_dom != null) {
_dom.characters(node, handler);
}
else {
super.characters(node, handler);
- }
+ }
}
-
+
public Node makeNode(int index)
{
if (_dom != null) {
@@ -381,9 +381,9 @@
}
else {
return super.makeNode(index);
- }
+ }
}
-
+
public Node makeNode(DTMAxisIterator iter)
{
if (_dom != null) {
@@ -391,9 +391,9 @@
}
else {
return super.makeNode(iter);
- }
+ }
}
-
+
public NodeList makeNodeList(int index)
{
if (_dom != null) {
@@ -401,9 +401,9 @@
}
else {
return super.makeNodeList(index);
- }
+ }
}
-
+
public NodeList makeNodeList(DTMAxisIterator iter)
{
if (_dom != null) {
@@ -411,9 +411,9 @@
}
else {
return super.makeNodeList(iter);
- }
+ }
}
-
+
public String getLanguage(int node)
{
if (_dom != null) {
@@ -421,9 +421,9 @@
}
else {
return super.getLanguage(node);
- }
+ }
}
-
+
public int getSize()
{
if (_dom != null) {
@@ -431,9 +431,9 @@
}
else {
return super.getSize();
- }
+ }
}
-
+
public String getDocumentURI(int node)
{
if (_dom != null) {
@@ -441,9 +441,9 @@
}
else {
return "adaptive_rtf" + _documentURIIndex++;
- }
+ }
}
-
+
public void setFilter(StripFilter filter)
{
if (_dom != null) {
@@ -451,9 +451,9 @@
}
else {
super.setFilter(filter);
- }
+ }
}
-
+
public void setupMapping(String[] names, String[] uris, int[] types, String[] namespaces)
{
if (_dom != null) {
@@ -461,9 +461,9 @@
}
else {
super.setupMapping(names, uris, types, namespaces);
- }
+ }
}
-
+
public boolean isElement(final int node)
{
if (_dom != null) {
@@ -471,9 +471,9 @@
}
else {
return super.isElement(node);
- }
+ }
}
-
+
public boolean isAttribute(final int node)
{
if (_dom != null) {
@@ -481,20 +481,20 @@
}
else {
return super.isAttribute(node);
- }
+ }
}
-
+
public String lookupNamespace(int node, String prefix)
- throws TransletException
+ throws TransletException
{
if (_dom != null) {
return _dom.lookupNamespace(node, prefix);
}
else {
return super.lookupNamespace(node, prefix);
- }
+ }
}
-
+
/**
* Return the node identity from a node handle.
*/
@@ -505,9 +505,9 @@
}
else {
return super.getNodeIdent(nodehandle);
- }
+ }
}
-
+
/**
* Return the node handle from a node identity.
*/
@@ -518,9 +518,9 @@
}
else {
return super.getNodeHandle(nodeId);
- }
+ }
}
-
+
public DOM getResultTreeFrag(int initialSize, int rtfType)
{
if (_dom != null) {
@@ -528,14 +528,14 @@
}
else {
return super.getResultTreeFrag(initialSize, rtfType);
- }
+ }
}
-
+
public SerializationHandler getOutputDomBuilder()
{
return this;
}
-
+
public int getNSType(int node)
{
if (_dom != null) {
@@ -543,9 +543,9 @@
}
else {
return super.getNSType(node);
- }
+ }
}
-
+
public String getUnparsedEntityURI(String name)
{
if (_dom != null) {
@@ -553,9 +553,9 @@
}
else {
return super.getUnparsedEntityURI(name);
- }
+ }
}
-
+
public Hashtable getElementsWithIDs()
{
if (_dom != null) {
@@ -563,31 +563,31 @@
}
else {
return super.getElementsWithIDs();
- }
+ }
}
/** Implementation of the SerializationHandler interfaces **/
-
+
/** The code in some of the following interfaces are copied from SAXAdapter. **/
-
+
private void maybeEmitStartElement() throws SAXException
{
if (_openElementName != null) {
- int index;
- if ((index =_openElementName.indexOf(":")) < 0)
- _dom.startElement(null, _openElementName, _openElementName, _attributes);
- else {
- String uri =_dom.getNamespaceURI(_openElementName.substring(0,index));
- _dom.startElement(uri, _openElementName.substring(index+1), _openElementName, _attributes);
+ int index;
+ if ((index =_openElementName.indexOf(":")) < 0)
+ _dom.startElement(null, _openElementName, _openElementName, _attributes);
+ else {
+ String uri =_dom.getNamespaceURI(_openElementName.substring(0,index));
+ _dom.startElement(uri, _openElementName.substring(index+1), _openElementName, _attributes);
}
- _openElementName = null;
- }
-
+ _openElementName = null;
+ }
+
}
-
+
// Create and initialize the wrapped SAXImpl object
private void prepareNewDOM() throws SAXException
{
@@ -602,11 +602,11 @@
}
_size = 0;
}
-
+
public void startDocument() throws SAXException
- {
+ {
}
-
+
public void endDocument() throws SAXException
{
if (_dom != null) {
@@ -626,19 +626,19 @@
super.characters(str);
}
}
-
+
public void characters(char[] ch, int offset, int length)
- throws SAXException
+ throws SAXException
{
if (_dom != null) {
- maybeEmitStartElement();
- _dom.characters(ch, offset, length);
+ maybeEmitStartElement();
+ _dom.characters(ch, offset, length);
}
else {
super.characters(ch, offset, length);
}
}
-
+
public boolean setEscaping(boolean escape) throws SAXException
{
if (_dom != null) {
@@ -648,16 +648,16 @@
return super.setEscaping(escape);
}
}
-
+
public void startElement(String elementName) throws SAXException
{
if (_dom == null) {
prepareNewDOM();
}
-
- maybeEmitStartElement();
- _openElementName = elementName;
- _attributes.clear();
+
+ maybeEmitStartElement();
+ _openElementName = elementName;
+ _attributes.clear();
}
public void startElement(String uri, String localName, String qName)
@@ -671,11 +671,11 @@
{
startElement(qName);
}
-
+
public void endElement(String elementName) throws SAXException
- {
- maybeEmitStartElement();
- _dom.endElement(null, null, elementName);
+ {
+ maybeEmitStartElement();
+ _dom.endElement(null, null, elementName);
}
public void endElement(String uri, String localName, String qName)
@@ -709,73 +709,73 @@
public void addAttribute(String uri, String localName, String qname,
String type, String value)
{
- if (_openElementName != null) {
- _attributes.addAttribute(uri, localName, qname, type, value);
- }
- else {
- BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
- }
+ if (_openElementName != null) {
+ _attributes.addAttribute(uri, localName, qname, type, value);
+ }
+ else {
+ BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, qname);
+ }
}
public void namespaceAfterStartElement(String prefix, String uri)
throws SAXException
- {
- if (_dom == null) {
- prepareNewDOM();
- }
-
- _dom.startPrefixMapping(prefix, uri);
+ {
+ if (_dom == null) {
+ prepareNewDOM();
+ }
+
+ _dom.startPrefixMapping(prefix, uri);
}
-
+
public void comment(String comment) throws SAXException
- {
- if (_dom == null) {
- prepareNewDOM();
- }
-
- maybeEmitStartElement();
+ {
+ if (_dom == null) {
+ prepareNewDOM();
+ }
+
+ maybeEmitStartElement();
char[] chars = comment.toCharArray();
_dom.comment(chars, 0, chars.length);
}
public void comment(char[] chars, int offset, int length)
throws SAXException
- {
- if (_dom == null) {
- prepareNewDOM();
- }
-
- maybeEmitStartElement();
+ {
+ if (_dom == null) {
+ prepareNewDOM();
+ }
+
+ maybeEmitStartElement();
_dom.comment(chars, offset, length);
}
-
+
public void processingInstruction(String target, String data)
- throws SAXException
- {
- if (_dom == null) {
- prepareNewDOM();
- }
-
- maybeEmitStartElement();
- _dom.processingInstruction(target, data);
+ throws SAXException
+ {
+ if (_dom == null) {
+ prepareNewDOM();
+ }
+
+ maybeEmitStartElement();
+ _dom.processingInstruction(target, data);
}
-
+
/** Implementation of the DTM interfaces **/
-
+
public void setFeature(String featureId, boolean state)
{
if (_dom != null) {
_dom.setFeature(featureId, state);
}
}
-
+
public void setProperty(String property, Object value)
{
if (_dom != null) {
_dom.setProperty(property, value);
}
}
-
+
public DTMAxisTraverser getAxisTraverser(final int axis)
{
if (_dom != null) {
@@ -785,7 +785,7 @@
return super.getAxisTraverser(axis);
}
}
-
+
public boolean hasChildNodes(int nodeHandle)
{
if (_dom != null) {
@@ -795,7 +795,7 @@
return super.hasChildNodes(nodeHandle);
}
}
-
+
public int getFirstChild(int nodeHandle)
{
if (_dom != null) {
@@ -805,7 +805,7 @@
return super.getFirstChild(nodeHandle);
}
}
-
+
public int getLastChild(int nodeHandle)
{
if (_dom != null) {
@@ -815,7 +815,7 @@
return super.getLastChild(nodeHandle);
}
}
-
+
public int getAttributeNode(int elementHandle, String namespaceURI, String name)
{
if (_dom != null) {
@@ -825,7 +825,7 @@
return super.getAttributeNode(elementHandle, namespaceURI, name);
}
}
-
+
public int getFirstAttribute(int nodeHandle)
{
if (_dom != null) {
@@ -835,7 +835,7 @@
return super.getFirstAttribute(nodeHandle);
}
}
-
+
public int getFirstNamespaceNode(int nodeHandle, boolean inScope)
{
if (_dom != null) {
@@ -845,7 +845,7 @@
return super.getFirstNamespaceNode(nodeHandle, inScope);
}
}
-
+
public int getNextSibling(int nodeHandle)
{
if (_dom != null) {
@@ -855,7 +855,7 @@
return super.getNextSibling(nodeHandle);
}
}
-
+
public int getPreviousSibling(int nodeHandle)
{
if (_dom != null) {
@@ -865,7 +865,7 @@
return super.getPreviousSibling(nodeHandle);
}
}
-
+
public int getNextAttribute(int nodeHandle)
{
if (_dom != null) {
@@ -875,7 +875,7 @@
return super.getNextAttribute(nodeHandle);
}
}
-
+
public int getNextNamespaceNode(int baseHandle, int namespaceHandle,
boolean inScope)
{
@@ -886,7 +886,7 @@
return super.getNextNamespaceNode(baseHandle, namespaceHandle, inScope);
}
}
-
+
public int getOwnerDocument(int nodeHandle)
{
if (_dom != null) {
@@ -896,7 +896,7 @@
return super.getOwnerDocument(nodeHandle);
}
}
-
+
public int getDocumentRoot(int nodeHandle)
{
if (_dom != null) {
@@ -906,7 +906,7 @@
return super.getDocumentRoot(nodeHandle);
}
}
-
+
public XMLString getStringValue(int nodeHandle)
{
if (_dom != null) {
@@ -916,7 +916,7 @@
return super.getStringValue(nodeHandle);
}
}
-
+
public int getStringValueChunkCount(int nodeHandle)
{
if (_dom != null) {
@@ -926,7 +926,7 @@
return super.getStringValueChunkCount(nodeHandle);
}
}
-
+
public char[] getStringValueChunk(int nodeHandle, int chunkIndex,
int[] startAndLen)
{
@@ -937,7 +937,7 @@
return super.getStringValueChunk(nodeHandle, chunkIndex, startAndLen);
}
}
-
+
public int getExpandedTypeID(String namespace, String localName, int type)
{
if (_dom != null) {
@@ -947,7 +947,7 @@
return super.getExpandedTypeID(namespace, localName, type);
}
}
-
+
public String getLocalNameFromExpandedNameID(int ExpandedNameID)
{
if (_dom != null) {
@@ -957,7 +957,7 @@
return super.getLocalNameFromExpandedNameID(ExpandedNameID);
}
}
-
+
public String getNamespaceFromExpandedNameID(int ExpandedNameID)
{
if (_dom != null) {
@@ -967,7 +967,7 @@
return super.getNamespaceFromExpandedNameID(ExpandedNameID);
}
}
-
+
public String getLocalName(int nodeHandle)
{
if (_dom != null) {
@@ -977,7 +977,7 @@
return super.getLocalName(nodeHandle);
}
}
-
+
public String getPrefix(int nodeHandle)
{
if (_dom != null) {
@@ -987,7 +987,7 @@
return super.getPrefix(nodeHandle);
}
}
-
+
public String getNamespaceURI(int nodeHandle)
{
if (_dom != null) {
@@ -997,7 +997,7 @@
return super.getNamespaceURI(nodeHandle);
}
}
-
+
public String getNodeValue(int nodeHandle)
{
if (_dom != null) {
@@ -1007,7 +1007,7 @@
return super.getNodeValue(nodeHandle);
}
}
-
+
public short getNodeType(int nodeHandle)
{
if (_dom != null) {
@@ -1017,7 +1017,7 @@
return super.getNodeType(nodeHandle);
}
}
-
+
public short getLevel(int nodeHandle)
{
if (_dom != null) {
@@ -1027,7 +1027,7 @@
return super.getLevel(nodeHandle);
}
}
-
+
public boolean isSupported(String feature, String version)
{
if (_dom != null) {
@@ -1037,7 +1037,7 @@
return super.isSupported(feature, version);
}
}
-
+
public String getDocumentBaseURI()
{
if (_dom != null) {
@@ -1047,7 +1047,7 @@
return super.getDocumentBaseURI();
}
}
-
+
public void setDocumentBaseURI(String baseURI)
{
if (_dom != null) {
@@ -1057,7 +1057,7 @@
super.setDocumentBaseURI(baseURI);
}
}
-
+
public String getDocumentSystemIdentifier(int nodeHandle)
{
if (_dom != null) {
@@ -1067,7 +1067,7 @@
return super.getDocumentSystemIdentifier(nodeHandle);
}
}
-
+
public String getDocumentEncoding(int nodeHandle)
{
if (_dom != null) {
@@ -1077,7 +1077,7 @@
return super.getDocumentEncoding(nodeHandle);
}
}
-
+
public String getDocumentStandalone(int nodeHandle)
{
if (_dom != null) {
@@ -1087,7 +1087,7 @@
return super.getDocumentStandalone(nodeHandle);
}
}
-
+
public String getDocumentVersion(int documentHandle)
{
if (_dom != null) {
@@ -1097,7 +1097,7 @@
return super.getDocumentVersion(documentHandle);
}
}
-
+
public boolean getDocumentAllDeclarationsProcessed()
{
if (_dom != null) {
@@ -1107,7 +1107,7 @@
return super.getDocumentAllDeclarationsProcessed();
}
}
-
+
public String getDocumentTypeDeclarationSystemIdentifier()
{
if (_dom != null) {
@@ -1117,7 +1117,7 @@
return super.getDocumentTypeDeclarationSystemIdentifier();
}
}
-
+
public String getDocumentTypeDeclarationPublicIdentifier()
{
if (_dom != null) {
@@ -1127,7 +1127,7 @@
return super.getDocumentTypeDeclarationPublicIdentifier();
}
}
-
+
public int getElementById(String elementId)
{
if (_dom != null) {
@@ -1137,7 +1137,7 @@
return super.getElementById(elementId);
}
}
-
+
public boolean supportsPreStripping()
{
if (_dom != null) {
@@ -1147,7 +1147,7 @@
return super.supportsPreStripping();
}
}
-
+
public boolean isNodeAfter(int firstNodeHandle, int secondNodeHandle)
{
if (_dom != null) {
@@ -1157,7 +1157,7 @@
return super.isNodeAfter(firstNodeHandle, secondNodeHandle);
}
}
-
+
public boolean isCharacterElementContentWhitespace(int nodeHandle)
{
if (_dom != null) {
@@ -1167,7 +1167,7 @@
return super.isCharacterElementContentWhitespace(nodeHandle);
}
}
-
+
public boolean isDocumentAllDeclarationsProcessed(int documentHandle)
{
if (_dom != null) {
@@ -1177,7 +1177,7 @@
return super.isDocumentAllDeclarationsProcessed(documentHandle);
}
}
-
+
public boolean isAttributeSpecified(int attributeHandle)
{
if (_dom != null) {
@@ -1187,7 +1187,7 @@
return super.isAttributeSpecified(attributeHandle);
}
}
-
+
public void dispatchCharactersEvents(int nodeHandle, org.xml.sax.ContentHandler ch,
boolean normalize)
throws org.xml.sax.SAXException
@@ -1199,7 +1199,7 @@
super.dispatchCharactersEvents(nodeHandle, ch, normalize);
}
}
-
+
public void dispatchToEvents(int nodeHandle, org.xml.sax.ContentHandler ch)
throws org.xml.sax.SAXException
{
@@ -1210,7 +1210,7 @@
super.dispatchToEvents(nodeHandle, ch);
}
}
-
+
public org.w3c.dom.Node getNode(int nodeHandle)
{
if (_dom != null) {
@@ -1220,7 +1220,7 @@
return super.getNode(nodeHandle);
}
}
-
+
public boolean needsTwoThreads()
{
if (_dom != null) {
@@ -1230,7 +1230,7 @@
return super.needsTwoThreads();
}
}
-
+
public org.xml.sax.ContentHandler getContentHandler()
{
if (_dom != null) {
@@ -1240,7 +1240,7 @@
return super.getContentHandler();
}
}
-
+
public org.xml.sax.ext.LexicalHandler getLexicalHandler()
{
if (_dom != null) {
@@ -1250,7 +1250,7 @@
return super.getLexicalHandler();
}
}
-
+
public org.xml.sax.EntityResolver getEntityResolver()
{
if (_dom != null) {
@@ -1260,7 +1260,7 @@
return super.getEntityResolver();
}
}
-
+
public org.xml.sax.DTDHandler getDTDHandler()
{
if (_dom != null) {
@@ -1270,7 +1270,7 @@
return super.getDTDHandler();
}
}
-
+
public org.xml.sax.ErrorHandler getErrorHandler()
{
if (_dom != null) {
@@ -1280,7 +1280,7 @@
return super.getErrorHandler();
}
}
-
+
public org.xml.sax.ext.DeclHandler getDeclHandler()
{
if (_dom != null) {
@@ -1290,7 +1290,7 @@
return super.getDeclHandler();
}
}
-
+
public void appendChild(int newChild, boolean clone, boolean cloneDepth)
{
if (_dom != null) {
@@ -1300,7 +1300,7 @@
super.appendChild(newChild, clone, cloneDepth);
}
}
-
+
public void appendTextChild(String str)
{
if (_dom != null) {
@@ -1310,7 +1310,7 @@
super.appendTextChild(str);
}
}
-
+
public SourceLocator getSourceLocatorFor(int node)
{
if (_dom != null) {
@@ -1320,7 +1320,7 @@
return super.getSourceLocatorFor(node);
}
}
-
+
public void documentRegistration()
{
if (_dom != null) {
@@ -1330,7 +1330,7 @@
super.documentRegistration();
}
}
-
+
public void documentRelease()
{
if (_dom != null) {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/AnyNodeCounter.java Wed May 02 13:32:36 2012 +0100
@@ -33,99 +33,99 @@
*/
public abstract class AnyNodeCounter extends NodeCounter {
public AnyNodeCounter(Translet translet,
- DOM document, DTMAxisIterator iterator) {
- super(translet, document, iterator);
+ DOM document, DTMAxisIterator iterator) {
+ super(translet, document, iterator);
}
-
+
public AnyNodeCounter(Translet translet,
- DOM document,
+ DOM document,
DTMAxisIterator iterator,
boolean hasFrom) {
- super(translet, document, iterator, hasFrom);
+ super(translet, document, iterator, hasFrom);
}
-
+
public NodeCounter setStartNode(int node) {
- _node = node;
- _nodeType = _document.getExpandedTypeID(node);
- return this;
+ _node = node;
+ _nodeType = _document.getExpandedTypeID(node);
+ return this;
}
public String getCounter() {
- int result;
- if (_value != Integer.MIN_VALUE) {
+ int result;
+ if (_value != Integer.MIN_VALUE) {
//See Errata E24
if (_value == 0) return "0";
else if (Double.isNaN(_value)) return "NaN";
else if (_value < 0 && Double.isInfinite(_value)) return "-Infinity";
else if (Double.isInfinite(_value)) return "Infinity";
else return formatNumbers((int)_value);
- }
- else {
- int next = _node;
+ }
+ else {
+ int next = _node;
final int root = _document.getDocument();
- result = 0;
- while (next >= root && !matchesFrom(next)) {
- if (matchesCount(next)) {
- ++result;
- }
- next--;
+ result = 0;
+ while (next >= root && !matchesFrom(next)) {
+ if (matchesCount(next)) {
+ ++result;
+ }
+ next--;
//%HZ%: Is this the best way of finding the root? Is it better to check
//%HZ%: parent(next)?
- /*
- if (next == root) {
- break;
+ /*
+ if (next == root) {
+ break;
}
- else {
- --next;
+ else {
+ --next;
}
*/
- }
- }
- return formatNumbers(result);
+ }
+ }
+ return formatNumbers(result);
}
public static NodeCounter getDefaultNodeCounter(Translet translet,
- DOM document,
- DTMAxisIterator iterator) {
- return new DefaultAnyNodeCounter(translet, document, iterator);
+ DOM document,
+ DTMAxisIterator iterator) {
+ return new DefaultAnyNodeCounter(translet, document, iterator);
}
static class DefaultAnyNodeCounter extends AnyNodeCounter {
- public DefaultAnyNodeCounter(Translet translet,
- DOM document, DTMAxisIterator iterator) {
- super(translet, document, iterator);
- }
+ public DefaultAnyNodeCounter(Translet translet,
+ DOM document, DTMAxisIterator iterator) {
+ super(translet, document, iterator);
+ }
- public String getCounter() {
- int result;
- if (_value != Integer.MIN_VALUE) {
+ public String getCounter() {
+ int result;
+ if (_value != Integer.MIN_VALUE) {
//See Errata E24
if (_value == 0) return "0";
else if (Double.isNaN(_value)) return "NaN";
else if (_value < 0 && Double.isInfinite(_value)) return "-Infinity";
else if (Double.isInfinite(_value)) return "Infinity";
else result = (int) _value;
- }
- else {
- int next = _node;
- result = 0;
- final int ntype = _document.getExpandedTypeID(_node);
+ }
+ else {
+ int next = _node;
+ result = 0;
+ final int ntype = _document.getExpandedTypeID(_node);
final int root = _document.getDocument();
- while (next >= 0) {
- if (ntype == _document.getExpandedTypeID(next)) {
- result++;
- }
+ while (next >= 0) {
+ if (ntype == _document.getExpandedTypeID(next)) {
+ result++;
+ }
//%HZ%: Is this the best way of finding the root? Is it better to check
//%HZ%: parent(next)?
- if (next == root) {
- break;
+ if (next == root) {
+ break;
}
- else {
- --next;
+ else {
+ --next;
}
- }
- }
- return formatNumbers(result);
- }
+ }
+ }
+ return formatNumbers(result);
+ }
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/ArrayNodeListIterator.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,91 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/*
+ * $Id: ArrayNodeListIterator.java,v 1.0 2009-11-25 04:34:24 joehw Exp $
+ */
+package com.sun.org.apache.xalan.internal.xsltc.dom;
+
+import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
+
+public class ArrayNodeListIterator implements DTMAxisIterator {
+
+ private int _pos = 0;
+
+ private int _mark = 0;
+
+ private int _nodes[];
+
+ private static final int[] EMPTY = { };
+
+ public ArrayNodeListIterator(int[] nodes) {
+ _nodes = nodes;
+ }
+
+ public int next() {
+ return _pos < _nodes.length ? _nodes[_pos++] : END;
+ }
+
+ public DTMAxisIterator reset() {
+ _pos = 0;
+ return this;
+ }
+
+ public int getLast() {
+ return _nodes.length;
+ }
+
+ public int getPosition() {
+ return _pos;
+ }
+
+ public void setMark() {
+ _mark = _pos;
+ }
+
+ public void gotoMark() {
+ _pos = _mark;
+ }
+
+ public DTMAxisIterator setStartNode(int node) {
+ if (node == END) _nodes = EMPTY;
+ return this;
+ }
+
+ public int getStartNode() {
+ return END;
+ }
+
+ public boolean isReverse() {
+ return false;
+ }
+
+ public DTMAxisIterator cloneIterator() {
+ return new ArrayNodeListIterator(_nodes);
+ }
+
+ public void setRestartable(boolean isRestartable) {
+ }
+
+ public int getNodeByPosition(int position) {
+ return _nodes[position - 1];
+ }
+
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/DupFilterIterator.java Wed May 02 13:32:36 2012 +0100
@@ -88,7 +88,9 @@
if (_isRestartable) {
// KeyIndex iterators are always relative to the root node, so there
// is never any point in re-reading the iterator (and we SHOULD NOT).
- if (_source instanceof KeyIndex
+ boolean sourceIsKeyIndex = _source instanceof KeyIndex;
+
+ if (sourceIsKeyIndex
&& _startNode == DTMDefaultBase.ROOTNODE) {
return this;
}
@@ -100,7 +102,12 @@
while ((node = _source.next()) != END) {
_nodes.add(node);
}
- _nodes.sort();
+
+ // Nodes produced by KeyIndex are known to be in document order.
+ // Take advantage of it.
+ if (!sourceIsKeyIndex) {
+ _nodes.sort();
+ }
_nodesSize = _nodes.cardinality();
_current = 0;
_lastNext = END;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/KeyIndex.java Wed May 02 13:32:36 2012 +0100
@@ -73,7 +73,7 @@
* id() function.
*/
private DOM _dom;
-
+
private DOMEnhancedForDTM _enhancedDOM;
/**
@@ -117,16 +117,16 @@
* @deprecated
*/
public void merge(KeyIndex other) {
- if (other == null) return;
+ if (other == null) return;
- if (other._nodes != null) {
- if (_nodes == null) {
- _nodes = (IntegerArray)other._nodes.clone();
- }
- else {
- _nodes.merge(other._nodes);
- }
- }
+ if (other._nodes != null) {
+ if (_nodes == null) {
+ _nodes = (IntegerArray)other._nodes.clone();
+ }
+ else {
+ _nodes.merge(other._nodes);
+ }
+ }
}
/**
@@ -138,35 +138,35 @@
* @deprecated
*/
public void lookupId(Object value) {
- // Clear _nodes array
- _nodes = null;
+ // Clear _nodes array
+ _nodes = null;
- final StringTokenizer values = new StringTokenizer((String) value,
+ final StringTokenizer values = new StringTokenizer((String) value,
" \n\t");
- while (values.hasMoreElements()) {
+ while (values.hasMoreElements()) {
final String token = (String) values.nextElement();
- IntegerArray nodes = (IntegerArray) _index.get(token);
+ IntegerArray nodes = (IntegerArray) _index.get(token);
if (nodes == null && _enhancedDOM != null
&& _enhancedDOM.hasDOMSource()) {
nodes = getDOMNodeById(token);
}
- if (nodes == null) continue;
+ if (nodes == null) continue;
- if (_nodes == null) {
- nodes = (IntegerArray)nodes.clone();
- _nodes = nodes;
- }
- else {
- _nodes.merge(nodes);
- }
- }
+ if (_nodes == null) {
+ nodes = (IntegerArray)nodes.clone();
+ _nodes = nodes;
+ }
+ else {
+ _nodes.merge(nodes);
+ }
+ }
}
/**
* Return an IntegerArray for the DOM Node which has the given id.
- *
+ *
* @param id The id
* @return A IntegerArray representing the Node whose id is the given value.
*/
@@ -198,7 +198,7 @@
return nodes;
}
-
+
/**
* This method must be called by the code generated by the key() function
* prior to returning the node iterator. Callers should not call next() after it returns END. Use of an instance of this class as a {@link DTMAxisIterator} is
* deprecated. Set start to END should 'close' the iterator,
+ /**
+ * Set start to END should 'close' the iterator,
* i.e. subsequent call to next() should return END. Use of an instance of this class as a {@link DTMAxisIterator} is
* deprecated. Get start to END should 'close' the iterator,
+
+ /**
+ * Get start to END should 'close' the iterator,
* i.e. subsequent call to next() should return END. Use of an instance of this class as a {@link DTMAxisIterator} is
* deprecated.
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the State of secure mode. Set a feature for this
* Feature names are fully qualified {@link java.net.URI}s.
* Implementations may define their own features.
@@ -392,12 +419,12 @@
* See {@link javax.xml.transform.TransformerFactory} for full documentation of specific features.
* Checks if a type is derived from another by restriction. See:
* http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom
- *
- * @param ancestorNS
+ *
+ * @param ancestorNS
* The namspace of the ancestor type declaration
* @param ancestorName
* The name of the ancestor type declaration
* @param type
* The reference type definition
- *
+ *
* @return boolean True if the type is derived by restriciton for the
* reference type
*/
- public boolean isDerivedFrom(String typeNamespaceArg,
- String typeNameArg,
+ public boolean isDerivedFrom(String typeNamespaceArg,
+ String typeNameArg,
int derivationMethod) {
-
+
return false;
}
-
+
//
// Public methods
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttrNSImpl.java Wed May 02 13:32:36 2012 +0100
@@ -26,14 +26,14 @@
import org.w3c.dom.DOMException;
/**
- * AttrNSImpl inherits from AttrImpl and adds namespace support.
+ * AttrNSImpl inherits from AttrImpl and adds namespace support.
*
* The qualified name is the node name, and we store localName which is also
* used in all queries. On the other hand we recompute the prefix when
* necessary.
- *
+ *
* @xerces.internal
- *
+ *
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
* @author Ralf Pfeiffer, IBM
@@ -48,7 +48,7 @@
/** Serialization version. */
static final long serialVersionUID = -781906615369795414L;
-
+
static final String xmlnsURI = "http://www.w3.org/2000/xmlns/";
static final String xmlURI = "http://www.w3.org/XML/1998/namespace";
@@ -58,7 +58,7 @@
/** DOM2: Namespace URI. */
protected String namespaceURI;
-
+
/** DOM2: localName. */
protected String localName;
@@ -66,12 +66,12 @@
* Default constructor
*/
public AttrNSImpl(){}
-
+
/**
* DOM2: Constructor for Namespace implementation.
*/
- protected AttrNSImpl(CoreDocumentImpl ownerDocument,
- String namespaceURI,
+ protected AttrNSImpl(CoreDocumentImpl ownerDocument,
+ String namespaceURI,
String qualifiedName) {
super(ownerDocument, qualifiedName);
@@ -86,7 +86,7 @@
if (namespaceURI !=null) {
this.namespaceURI = (namespaceURI.length() == 0)? null
: namespaceURI;
-
+
}
int colon1 = qname.indexOf(':');
int colon2 = qname.lastIndexOf(':');
@@ -96,7 +96,7 @@
localName = qname;
if (ownerDocument.errorChecking) {
ownerDocument.checkQName(null, localName);
-
+
if (qname.equals("xmlns") && (namespaceURI == null
|| !namespaceURI.equals(NamespaceContext.XMLNS_URI))
|| (namespaceURI!=null && namespaceURI.equals(NamespaceContext.XMLNS_URI)
@@ -116,21 +116,21 @@
ownerDocument.checkQName(prefix, localName);
ownerDocument.checkDOMNSErr(prefix, namespaceURI);
}
- }
+ }
// when local name is known
- public AttrNSImpl(CoreDocumentImpl ownerDocument,
- String namespaceURI,
+ public AttrNSImpl(CoreDocumentImpl ownerDocument,
+ String namespaceURI,
String qualifiedName,
String localName) {
super(ownerDocument, qualifiedName);
-
+
this.localName = localName;
this.namespaceURI = namespaceURI;
}
-
+
// for DeferredAttrImpl
- protected AttrNSImpl(CoreDocumentImpl ownerDocument,
+ protected AttrNSImpl(CoreDocumentImpl ownerDocument,
String value) {
super(ownerDocument, value);
}
@@ -143,20 +143,20 @@
if (needsSyncData()) {
synchronizeData();
}
- this.name = qualifiedName;
+ this.name = qualifiedName;
setName(namespaceURI, qualifiedName);
}
/**
* NON-DOM: resets this node and sets specified values for the node
- *
+ *
* @param ownerDocument
* @param namespaceURI
* @param qualifiedName
* @param localName
*/
- public void setValues (CoreDocumentImpl ownerDocument,
- String namespaceURI,
+ public void setValues (CoreDocumentImpl ownerDocument,
+ String namespaceURI,
String qualifiedName,
String localName){
@@ -175,7 +175,7 @@
// DOM2: Namespace methods
//
- /**
+ /**
* Introduced in DOM Level 2.
*
* The namespace URI of this node, or null if it is unspecified.
@@ -185,7 +185,7 @@
* merely the namespace URI given at creation time.
*
* For nodes created with a DOM Level 1 method, such as createElement
- * from the Document interface, this is null.
+ * from the Document interface, this is null.
* @since WD-DOM-Level-2-19990923
*/
public String getNamespaceURI()
@@ -198,8 +198,8 @@
// seems to be some DOM spec interpretation grey-area.
return namespaceURI;
}
-
- /**
+
+ /**
* Introduced in DOM Level 2.
*
* The namespace prefix of this node, or null if it is unspecified.
@@ -215,16 +215,16 @@
synchronizeData();
}
int index = name.indexOf(':');
- return index < 0 ? null : name.substring(0, index);
+ return index < 0 ? null : name.substring(0, index);
}
-
+
/**
* Introduced in DOM Level 2.
- *
+ *
* Note that setting this attribute changes the nodeName attribute, which
* holds the qualified name, as well as the tagName and name attributes of
* the Element and Attr interfaces, when applicable.
- *
+ *
* @param prefix The namespace prefix of this node, or null(empty string) if it is unspecified.
*
* @exception INVALID_CHARACTER_ERR
@@ -253,7 +253,7 @@
if (namespaceURI == null || prefix.indexOf(':') >=0) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null);
throw new DOMException(DOMException.NAMESPACE_ERR, msg);
-
+
}
if (prefix.equals("xmlns")) {
if (!namespaceURI.equals(xmlnsURI)){
@@ -269,7 +269,7 @@
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NAMESPACE_ERR", null);
throw new DOMException(DOMException.NAMESPACE_ERR, msg);
}
- }
+ }
}
// update node name with new qualifiedName
@@ -280,8 +280,8 @@
name = localName;
}
}
-
- /**
+
+ /**
* Introduced in DOM Level 2.
*
* Returns the local part of the qualified name of this node.
@@ -294,8 +294,8 @@
}
return localName;
}
-
-
+
+
/**
* @see org.w3c.dom.TypeInfo#getTypeName()
*/
@@ -313,26 +313,26 @@
* Introduced in DOM Level 3.
* Checks if a type is derived from another by restriction. See:
* http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom
- *
- * @param ancestorNS
+ *
+ * @param ancestorNS
* The namspace of the ancestor type declaration
* @param ancestorName
* The name of the ancestor type declaration
* @param type
* The reference type definition
- *
+ *
* @return boolean True if the type is derived by restriciton for the
* reference type
*/
- public boolean isDerivedFrom(String typeNamespaceArg,
- String typeNameArg,
+ public boolean isDerivedFrom(String typeNamespaceArg,
+ String typeNameArg,
int derivationMethod) {
if (type != null) {
if (type instanceof XSSimpleTypeDecl) {
return ((XSSimpleTypeDecl) type).isDOMDerivedFrom(
typeNamespaceArg, typeNameArg, derivationMethod);
- }
- }
+ }
+ }
return false;
}
@@ -348,5 +348,5 @@
}
return null;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttributeMap.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttributeMap.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/AttributeMap.java Wed May 02 13:32:36 2012 +0100
@@ -31,13 +31,13 @@
* specifics of storing attributes. These are:
*
* This class doesn't directly support mutation events, however, it notifies
* the document when mutations are performed so that the document class do so.
- *
+ *
* @xerces.internal
*
* @version $Id: AttributeMap.java,v 1.7 2010-11-01 04:39:37 joehw Exp $
@@ -199,7 +199,7 @@
nodes.add(i, arg);
}
}
- // changed(true);
+ // changed(true);
// notify document
ownerNode.ownerDocument().setAttrNode(argn, previous);
@@ -558,12 +558,12 @@
AttrImpl d = (AttrImpl) defaults.nodes.get(n);
int i = findNamePoint(d.getNodeName(), 0);
if (i < 0) {
- i = -1 - i;
+ i = -1 - i;
NodeImpl clone = (NodeImpl) d.cloneNode(true);
clone.ownerNode = ownerNode;
clone.isOwned(true);
clone.isSpecified(false);
- nodes.add(i, clone);
+ nodes.add(i, clone);
}
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDOMImplementationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,10 @@
import com.sun.org.apache.xerces.internal.impl.RevalidationHandler;
import com.sun.org.apache.xerces.internal.parsers.DOMParserImpl;
+import com.sun.org.apache.xerces.internal.parsers.DTDConfiguration;
+import com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration;
import com.sun.org.apache.xerces.internal.util.XMLChar;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription;
import com.sun.org.apache.xml.internal.serialize.DOMSerializerImpl;
import org.w3c.dom.DOMException;
@@ -49,6 +52,7 @@
*
* @xerces.internal
*
+ * @version $Id: CoreDOMImplementationImpl.java,v 1.6 2010-11-01 04:39:37 joehw Exp $
* @since PR-DOM-Level-1-19980818.
*/
public class CoreDOMImplementationImpl
@@ -114,8 +118,7 @@
&& (anyVersion || version.equals("3.0"))) {
try {
Class xpathClass = ObjectFactory.findProviderClass(
- "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl",
- ObjectFactory.findClassLoader(), true);
+ "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl", true);
// Check if the DOM XPath implementation implements
// the interface org.w3c.dom.XPathEvaluator
@@ -281,9 +284,7 @@
if ((feature.equalsIgnoreCase("+XPath"))) {
try {
Class xpathClass = ObjectFactory.findProviderClass(
- "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl",
- ObjectFactory.findClassLoader(), true);
-
+ "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl", true);
// Check if the DOM XPath implementation implements
// the interface org.w3c.dom.XPathEvaluator
Class interfaces[] = xpathClass.getInterfaces();
@@ -361,14 +362,12 @@
}
if (schemaType != null
&& schemaType.equals("http://www.w3.org/TR/REC-xml")) {
- return new DOMParserImpl(
- "com.sun.org.apache.xerces.internal.parsers.DTDConfiguration",
+ return new DOMParserImpl(new DTDConfiguration(),
schemaType);
}
else {
// create default parser configuration validating against XMLSchemas
- return new DOMParserImpl(
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration",
+ return new DOMParserImpl(new XIncludeAwareParserConfiguration(),
schemaType);
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java Wed May 02 13:32:36 2012 +0100
@@ -31,6 +31,8 @@
import com.sun.org.apache.xerces.internal.util.XMLChar;
import com.sun.org.apache.xerces.internal.util.XML11Char;
import com.sun.org.apache.xerces.internal.xni.NamespaceContext;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
+import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
@@ -70,14 +72,14 @@
*
* Note: When any node in the document is serialized, the
* entire document is serialized along with it.
- *
- * @xerces.internal
+ *
+ * @xerces.internal
*
* @author Arnaud Le Hors, IBM
* @author Joe Kesselman, IBM
* @author Andy Clark, IBM
* @author Ralf Pfeiffer, IBM
- * @version $Id: CoreDocumentImpl.java,v 1.7 2009/08/04 05:07:20 joehw Exp $
+ * @version $Id: CoreDocumentImpl.java,v 1.9 2010-11-01 04:39:37 joehw Exp $
* @since PR-DOM-Level-1-19980818.
*/
@@ -85,12 +87,12 @@
public class CoreDocumentImpl
extends ParentNode implements Document {
- /**TODO::
- * 1. Change XML11Char method names similar to XMLChar. That will prevent lot
- * of dirty version checking code.
- *
- * 2. IMO during cloneNode qname/isXMLName check should not be made.
- */
+ /**TODO::
+ * 1. Change XML11Char method names similar to XMLChar. That will prevent lot
+ * of dirty version checking code.
+ *
+ * 2. IMO during cloneNode qname/isXMLName check should not be made.
+ */
//
// Constants
//
@@ -128,7 +130,7 @@
/**Experimental DOM Level 3 feature: documentURI */
protected String fDocumentURI;
- //Revisit :: change to a better data structure.
+ //Revisit :: change to a better data structure.
/** Table for user data attached to this document nodes. */
protected Hashtable userData;
@@ -139,8 +141,8 @@
// DOM Level 3: normalizeDocument
transient DOMNormalizer domNormalizer = null;
transient DOMConfigurationImpl fConfiguration = null;
-
- // support of XPath API
+
+ // support of XPath API
transient Object fXPathEvaluator = null;
/** Table for quick check of child insertion. */
@@ -191,7 +193,7 @@
protected boolean errorChecking = true;
/** Ancestor checking */
protected boolean ancestorChecking = true;
-
+
//Did version change at any point when the document was created ?
//this field helps us to optimize when normalizingDocument.
protected boolean xmlVersionChanged = false ;
@@ -258,8 +260,7 @@
super(null);
ownerDocument = this;
allowGrammarAccess = grammarAccess;
- SecuritySupport ss = SecuritySupport.getInstance();
- String systemProp = ss.getSystemProperty(Constants.SUN_DOM_PROPERTY_PREFIX+Constants.SUN_DOM_ANCESTOR_CHECCK);
+ String systemProp = SecuritySupport.getSystemProperty(Constants.SUN_DOM_PROPERTY_PREFIX+Constants.SUN_DOM_ANCESTOR_CHECCK);
if (systemProp != null) {
if (systemProp.equalsIgnoreCase("false")) {
ancestorChecking = false;
@@ -455,12 +456,12 @@
}
if (errorChecking &&((docType != null &&
- oldChild.getNodeType() != Node.DOCUMENT_TYPE_NODE &&
- newChild.getNodeType() == Node.DOCUMENT_TYPE_NODE)
- || (docElement != null &&
- oldChild.getNodeType() != Node.ELEMENT_NODE &&
+ oldChild.getNodeType() != Node.DOCUMENT_TYPE_NODE &&
+ newChild.getNodeType() == Node.DOCUMENT_TYPE_NODE)
+ || (docElement != null &&
+ oldChild.getNodeType() != Node.ELEMENT_NODE &&
newChild.getNodeType() == Node.ELEMENT_NODE))) {
-
+
throw new DOMException(
DOMException.HIERARCHY_REQUEST_ERR,
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "HIERARCHY_REQUEST_ERR", null));
@@ -498,9 +499,9 @@
* @since DOM Level 3
*/
public Object getFeature(String feature, String version) {
-
+
boolean anyVersion = version == null || version.length() == 0;
-
+
// if a plus sign "+" is prepended to any feature name, implementations
// are considered in which the specified feature may not be directly
// castable DOMImplementation.getFeature(feature, version). Without a
@@ -508,20 +509,19 @@
// considered.
if ((feature.equalsIgnoreCase("+XPath"))
&& (anyVersion || version.equals("3.0"))) {
-
- // If an XPathEvaluator was created previously
+
+ // If an XPathEvaluator was created previously
// return it otherwise create a new one.
if (fXPathEvaluator != null) {
return fXPathEvaluator;
}
-
+
try {
- Class xpathClass = ObjectFactory.findProviderClass(
- "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl",
- ObjectFactory.findClassLoader(), true);
- Constructor xpathClassConstr =
+ Class xpathClass = ObjectFactory.findProviderClass (
+ "com.sun.org.apache.xpath.internal.domapi.XPathEvaluatorImpl", true);
+ Constructor xpathClassConstr =
xpathClass.getConstructor(new Class[] { Document.class });
-
+
// Check if the DOM XPath implementation implements
// the interface org.w3c.dom.XPathEvaluator
Class interfaces[] = xpathClass.getInterfaces();
@@ -543,22 +543,22 @@
//
// Document methods
//
-
+
// factory methods
-
+
/**
* Factory method; creates an Attribute having this Document as its
* OwnerDoc.
- *
+ *
* @param name The name of the attribute. Note that the attribute's value is
* _not_ established at the factory; remember to set it!
- *
+ *
* @throws DOMException(INVALID_NAME_ERR)
* if the attribute name is not acceptable.
*/
public Attr createAttribute(String name)
throws DOMException {
-
+
if (errorChecking && !isXMLName(name,xml11Version)) {
String msg =
DOMMessageFormatter.formatMessage(
@@ -568,7 +568,7 @@
throw new DOMException(DOMException.INVALID_CHARACTER_ERR, msg);
}
return new AttrImpl(this, name);
-
+
} // createAttribute(String):Attr
/**
@@ -824,7 +824,7 @@
public void setXmlEncoding(String value) {
encoding = value;
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -841,7 +841,7 @@
public String getXmlEncoding() {
return encoding;
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -882,7 +882,7 @@
xml11Version = false;
}
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -900,7 +900,7 @@
public String getXmlVersion() {
return (version == null)?"1.0":version;
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -924,7 +924,7 @@
throws DOMException {
standalone = value;
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -942,7 +942,7 @@
public boolean getXmlStandalone() {
return standalone;
}
-
+
/**
* @deprecated This method is internal and only exists for
* compatibility with older applications. New applications
@@ -971,7 +971,7 @@
*/
public Node renameNode(Node n,String namespaceURI,String name)
throws DOMException{
-
+
if (errorChecking && n.getOwnerDocument() != this && n != this) {
String msg = DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN, "WRONG_DOCUMENT_ERR", null);
@@ -982,7 +982,7 @@
ElementImpl el = (ElementImpl) n;
if (el instanceof ElementNSImpl) {
((ElementNSImpl) el).rename(namespaceURI, name);
-
+
// fire user data NODE_RENAMED event
callUserDataHandlers(el, null, UserDataHandler.NODE_RENAMED);
}
@@ -1007,7 +1007,7 @@
}
}
el.rename(name);
-
+
// fire user data NODE_RENAMED event
callUserDataHandlers(el, null,
UserDataHandler.NODE_RENAMED);
@@ -1016,13 +1016,13 @@
// we need to create a new object
ElementNSImpl nel =
new ElementNSImpl(this, namespaceURI, name);
-
+
// register event listeners on new node
copyEventListeners(el, nel);
-
+
// remove user data from old node
Hashtable data = removeUserDataTable(el);
-
+
// remove old node from parent if any
Node parent = el.getParentNode();
Node nextSib = el.getNextSibling();
@@ -1038,14 +1038,14 @@
}
// move specified attributes to new node
nel.moveSpecifiedAttributes(el);
-
+
// attach user data to new node
setUserDataTable(nel, data);
-
+
// and fire user data NODE_RENAMED event
callUserDataHandlers(el, nel,
UserDataHandler.NODE_RENAMED);
-
+
// insert new node where old one was
if (parent != null) {
parent.insertBefore(nel, nextSib);
@@ -1059,7 +1059,7 @@
}
case ATTRIBUTE_NODE: {
AttrImpl at = (AttrImpl) n;
-
+
// dettach attr from element
Element el = at.getOwnerElement();
if (el != null) {
@@ -1071,7 +1071,7 @@
if (el != null) {
el.setAttributeNodeNS(at);
}
-
+
// fire user data NODE_RENAMED event
callUserDataHandlers(at, null, UserDataHandler.NODE_RENAMED);
}
@@ -1082,20 +1082,20 @@
if (el != null) {
el.setAttributeNode(at);
}
-
+
// fire user data NODE_RENAMED event
callUserDataHandlers(at, null, UserDataHandler.NODE_RENAMED);
}
else {
// we need to create a new object
AttrNSImpl nat = new AttrNSImpl(this, namespaceURI, name);
-
+
// register event listeners on new node
copyEventListeners(at, nat);
-
+
// remove user data from old node
Hashtable data = removeUserDataTable(at);
-
+
// move children to new node
Node child = at.getFirstChild();
while (child != null) {
@@ -1103,13 +1103,13 @@
nat.appendChild(child);
child = at.getFirstChild();
}
-
+
// attach user data to new node
setUserDataTable(nat, data);
-
+
// and fire user data NODE_RENAMED event
callUserDataHandlers(at, nat, UserDataHandler.NODE_RENAMED);
-
+
// reattach attr to element
if (el != null) {
el.setAttributeNode(nat);
@@ -1119,7 +1119,7 @@
}
// fire AttributeNameChanged event
renamedAttrNode((Attr) n, at);
-
+
return at;
}
default: {
@@ -1127,7 +1127,7 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
}
-
+
}
@@ -1182,7 +1182,7 @@
* Returns the absolute base URI of this node or null if the implementation
* wasn't able to obtain an absolute URI. Note: If the URI is malformed, a
* null is returned.
- *
+ *
* @return The absolute base URI of this node or null.
* @since DOM Level 3
*/
@@ -1195,7 +1195,7 @@
// REVISIT: what should happen in this case?
return null;
}
- }
+ }
return fDocumentURI;
}
@@ -1518,7 +1518,7 @@
Hashtable reversedIdentifiers)
throws DOMException {
Node newnode=null;
- Hashtable userData = null;
+ Hashtable userData = null;
// Sigh. This doesn't work; too many nodes have private data that
// would have to be manually tweaked. May be able to add local
@@ -1531,8 +1531,8 @@
// newnode.ownerDocument=this;
// }
// else
- if(source instanceof NodeImpl)
- userData = ((NodeImpl)source).getUserDataRecord();
+ if(source instanceof NodeImpl)
+ userData = ((NodeImpl)source).getUserDataRecord();
int type = source.getNodeType();
switch (type) {
case ELEMENT_NODE: {
@@ -1735,8 +1735,8 @@
}
}
- if(userData != null)
- callUserDataHandlers(source, newnode, UserDataHandler.NODE_IMPORTED,userData);
+ if(userData != null)
+ callUserDataHandlers(source, newnode, UserDataHandler.NODE_IMPORTED,userData);
// If deep, replicate and attach the kids.
if (deep) {
@@ -1763,26 +1763,26 @@
**/
public Node adoptNode(Node source) {
NodeImpl node;
- Hashtable userData = null;
+ Hashtable userData = null;
try {
node = (NodeImpl) source;
} catch (ClassCastException e) {
// source node comes from a different DOMImplementation
return null;
}
-
+
// Return null if the source is null
-
+
if (source == null ) {
- return null;
+ return null;
} else if (source != null && source.getOwnerDocument() != null) {
DOMImplementation thisImpl = this.getImplementation();
DOMImplementation otherImpl = source.getOwnerDocument().getImplementation();
-
+
// when the source node comes from a different implementation.
if (thisImpl != otherImpl) {
-
+
// Adopting from a DefferedDOM to DOM
if (thisImpl instanceof com.sun.org.apache.xerces.internal.dom.DOMImplementationImpl &&
otherImpl instanceof com.sun.org.apache.xerces.internal.dom.DeferredDOMImplementationImpl) {
@@ -1793,11 +1793,11 @@
// Adopting from a DOM into a DefferedDOM, this should be okay
} else {
// Adopting between two dissimilar DOM's is not allowed
- return null;
+ return null;
+ }
}
- }
}
-
+
switch (node.getNodeType()) {
case ATTRIBUTE_NODE: {
AttrImpl attr = (AttrImpl) node;
@@ -1808,12 +1808,12 @@
}
//2. specified flag is set to true
attr.isSpecified(true);
- userData = node.getUserDataRecord();
+ userData = node.getUserDataRecord();
//3. change ownership
attr.setOwnerDocument(this);
- if(userData != null )
- setUserDataTable(node,userData);
+ if(userData != null )
+ setUserDataTable(node,userData);
break;
}
//entity, notation nodes are read only nodes.. so they can't be adopted.
@@ -1832,7 +1832,7 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
case ENTITY_REFERENCE_NODE: {
- userData = node.getUserDataRecord();
+ userData = node.getUserDataRecord();
// remove node from wherever it is
Node parent = node.getParentNode();
if (parent != null) {
@@ -1845,8 +1845,8 @@
}
// change ownership
node.setOwnerDocument(this);
- if(userData != null)
- setUserDataTable(node,userData);
+ if(userData != null)
+ setUserDataTable(node,userData);
// set its new replacement value if any
if (docType == null) {
break;
@@ -1864,7 +1864,7 @@
break;
}
case ELEMENT_NODE: {
- userData = node.getUserDataRecord();
+ userData = node.getUserDataRecord();
// remove node from wherever it is
Node parent = node.getParentNode();
if (parent != null) {
@@ -1872,14 +1872,14 @@
}
// change ownership
node.setOwnerDocument(this);
- if(userData != null)
- setUserDataTable(node,userData);
+ if(userData != null)
+ setUserDataTable(node,userData);
// reconcile default attributes
((ElementImpl)node).reconcileDefaultAttributes();
break;
}
default: {
- userData = node.getUserDataRecord();
+ userData = node.getUserDataRecord();
// remove node from wherever it is
Node parent = node.getParentNode();
if (parent != null) {
@@ -1887,15 +1887,15 @@
}
// change ownership
node.setOwnerDocument(this);
- if(userData != null)
- setUserDataTable(node,userData);
+ if(userData != null)
+ setUserDataTable(node,userData);
}
}
- //DOM L3 Core CR
- //http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core.html#UserDataHandler-ADOPTED
- if(userData != null)
- callUserDataHandlers(source, null, UserDataHandler.NODE_ADOPTED,userData);
+ //DOM L3 Core CR
+ //http://www.w3.org/TR/2003/CR-DOM-Level-3-Core-20031107/core.html#UserDataHandler-ADOPTED
+ if(userData != null)
+ callUserDataHandlers(source, null, UserDataHandler.NODE_ADOPTED,userData);
return node;
}
@@ -1903,18 +1903,18 @@
/**
* Traverses the DOM Tree and expands deferred nodes and their
* children.
- *
+ *
*/
protected void undeferChildren(Node node) {
-
+
Node top = node;
-
+
while (null != node) {
-
+
if (((NodeImpl)node).needsSyncData()) {
((NodeImpl)node).synchronizeData();
}
-
+
NamedNodeMap attributes = node.getAttributes();
if (attributes != null) {
int length = attributes.getLength();
@@ -1922,31 +1922,31 @@
undeferChildren(attributes.item(i));
}
}
-
+
Node nextNode = null;
nextNode = node.getFirstChild();
-
+
while (null == nextNode) {
-
+
if (top.equals(node))
break;
-
+
nextNode = node.getNextSibling();
-
+
if (null == nextNode) {
node = node.getParentNode();
-
+
if ((null == node) || (top.equals(node))) {
nextNode = null;
break;
}
}
}
-
+
node = nextNode;
}
}
-
+
// identifier maintenence
/**
* Introduced in DOM Level 2
@@ -2359,7 +2359,7 @@
return null;
}
}
-
+
/**
* Retrieves the object associated to a key on a this node. The object
@@ -2387,7 +2387,7 @@
return null;
}
- protected Hashtable getUserDataRecord(Node n){
+ protected Hashtable getUserDataRecord(Node n){
if (userData == null) {
return null;
}
@@ -2395,10 +2395,10 @@
if (t == null) {
return null;
}
- return t;
- }
-
- /**
+ return t;
+ }
+
+ /**
* Remove user data table for the given node.
* @param n The node this operation applies to.
* @return The removed table.
@@ -2416,8 +2416,8 @@
* @param data The user data table.
*/
void setUserDataTable(Node n, Hashtable data) {
- if (userData == null)
- userData = new Hashtable();
+ if (userData == null)
+ userData = new Hashtable();
if (data != null) {
userData.put(n, data);
}
@@ -2434,23 +2434,23 @@
return;
}
//Hashtable t = (Hashtable) userData.get(n);
- if(n instanceof NodeImpl){
- Hashtable t = ((NodeImpl)n).getUserDataRecord();
- if (t == null || t.isEmpty()) {
- return;
- }
- callUserDataHandlers(n, c, operation,t);
- }
+ if(n instanceof NodeImpl){
+ Hashtable t = ((NodeImpl)n).getUserDataRecord();
+ if (t == null || t.isEmpty()) {
+ return;
+ }
+ callUserDataHandlers(n, c, operation,t);
+ }
}
- /**
+ /**
* Call user data handlers when a node is deleted (finalized)
* @param n The node this operation applies to.
* @param c The copy node or null.
* @param operation The operation - import, clone, or delete.
- * @param handlers Data associated with n.
- */
- void callUserDataHandlers(Node n, Node c, short operation,Hashtable userData) {
+ * @param handlers Data associated with n.
+ */
+ void callUserDataHandlers(Node n, Node c, short operation,Hashtable userData) {
if (userData == null || userData.isEmpty()) {
return;
}
@@ -2463,8 +2463,8 @@
}
}
}
-
- /**
+
+ /**
* Call user data handlers to let them know the nodes they are related to
* are being deleted. The alternative would be to do that on Node but
* because the nodes are used as the keys we have a reference to them that
@@ -2565,7 +2565,7 @@
return;
}
- // check that both prefix and local part match NCName
+ // check that both prefix and local part match NCName
boolean validNCName = false;
if (!xml11Version) {
validNCName = (prefix == null || XMLChar.isValidNCName(prefix))
@@ -2732,7 +2732,7 @@
void replacedCharacterData(NodeImpl node, String oldvalue, String value) {
}
-
+
/**
* A method to be called when an attribute value has been modified
*/
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMConfigurationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -55,6 +55,7 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler;
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
import org.w3c.dom.DOMException;
import org.w3c.dom.ls.LSResourceResolver;
@@ -62,7 +63,7 @@
/**
* Xerces implementation of DOMConfiguration that maintains a table of recognized parameters.
- *
+ *
* @xerces.internal
*
* @author Elena Litani, IBM
@@ -88,7 +89,7 @@
protected static final String SCHEMA =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE;
-
+
protected static final String SCHEMA_FULL_CHECKING =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
@@ -102,8 +103,8 @@
protected static final String SEND_PSVI =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_AUGMENT_PSVI;
- protected final static String DTD_VALIDATOR_FACTORY_PROPERTY =
- Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
+ protected final static String DTD_VALIDATOR_FACTORY_PROPERTY =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
/** Feature identifier: namespace growth */
protected static final String NAMESPACE_GROWTH =
@@ -274,7 +275,7 @@
GRAMMAR_POOL,
JAXP_SCHEMA_SOURCE,
JAXP_SCHEMA_LANGUAGE,
- DTD_VALIDATOR_FACTORY_PROPERTY,
+ DTD_VALIDATOR_FACTORY_PROPERTY,
SCHEMA_DV_FACTORY
};
addRecognizedProperties(recognizedProperties);
@@ -301,7 +302,7 @@
addComponent(fErrorReporter);
setProperty(DTD_VALIDATOR_FACTORY_PROPERTY, DTDDVFactory.getInstance());
-
+
XMLEntityManager manager = new XMLEntityManager();
setProperty(ENTITY_MANAGER, manager);
addComponent(manager);
@@ -324,8 +325,7 @@
MessageFormatter xmft = null;
try {
xmft = (MessageFormatter)(
- ObjectFactory.newInstance("com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter",
- ObjectFactory.findClassLoader(), true));
+ ObjectFactory.newInstance("com.sun.org.apache.xerces.internal.impl.xs.XSMessageFormatter", true));
} catch (Exception exception){
}
@@ -543,12 +543,12 @@
* setParameter
*/
public void setParameter(String name, Object value) throws DOMException {
- boolean found = true;
+ boolean found = true;
// REVISIT: Recognizes DOM L3 default features only.
// Does not yet recognize Xerces features.
- if(value instanceof Boolean){
- boolean state = ((Boolean)value).booleanValue();
+ if(value instanceof Boolean){
+ boolean state = ((Boolean)value).booleanValue();
if (name.equalsIgnoreCase(Constants.DOM_COMMENTS)) {
features = (short) (state ? features | COMMENTS : features & ~COMMENTS);
@@ -604,7 +604,7 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
}
- else if ( name.equalsIgnoreCase(Constants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
+ else if ( name.equalsIgnoreCase(Constants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
if (!state) { // false is not supported
String msg =
DOMMessageFormatter.formatMessage(
@@ -631,7 +631,7 @@
features = (short) (state ? features | PSVI : features & ~PSVI);
}
else {
- found = false;
+ found = false;
/*
String msg =
DOMMessageFormatter.formatMessage(
@@ -641,11 +641,11 @@
throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
*/
}
-
+
}
-
- if (!found || !(value instanceof Boolean)) { // set properties
- found = true;
+
+ if (!found || !(value instanceof Boolean)) { // set properties
+ found = true;
if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
if (value instanceof DOMErrorHandler || value == null) {
@@ -708,18 +708,18 @@
if (value == null) {
setProperty(
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE,
- null);
+ null);
}
else if (value.equals(Constants.NS_XMLSCHEMA)) {
// REVISIT: when add support to DTD validation
setProperty(
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE,
Constants.NS_XMLSCHEMA);
- }
+ }
else if (value.equals(Constants.NS_DTD)) {
// Added support for revalidation against DTDs
- setProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE,
- Constants.NS_DTD);
+ setProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE,
+ Constants.NS_DTD);
}
}
catch (XMLConfigurationException e) {}
@@ -783,90 +783,90 @@
* DOM Level 3 WD - Experimental.
* getParameter
*/
- public Object getParameter(String name) throws DOMException {
+ public Object getParameter(String name) throws DOMException {
- // REVISIT: Recognizes DOM L3 default features only.
- // Does not yet recognize Xerces features.
+ // REVISIT: Recognizes DOM L3 default features only.
+ // Does not yet recognize Xerces features.
- if (name.equalsIgnoreCase(Constants.DOM_COMMENTS)) {
- return ((features & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACES)) {
- return (features & NAMESPACES) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_DATATYPE_NORMALIZATION)) {
- // REVISIT: datatype-normalization only takes effect if validation is on
- return (features & DTNORMALIZATION) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_CDATA_SECTIONS)) {
- return (features & CDATA) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_ENTITIES)) {
- return (features & ENTITIES) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_SPLIT_CDATA)) {
- return (features & SPLITCDATA) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_VALIDATE)) {
- return (features & VALIDATE) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_WELLFORMED)) {
- return (features & WELLFORMED) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACE_DECLARATIONS)) {
- return (features & NSDECL) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_INFOSET)) {
- return (features & INFOSET_MASK) == INFOSET_TRUE_PARAMS ? Boolean.TRUE : Boolean.FALSE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_NORMALIZE_CHARACTERS)
- || name.equalsIgnoreCase(Constants.DOM_CANONICAL_FORM)
- || name.equalsIgnoreCase(Constants.DOM_VALIDATE_IF_SCHEMA)
- || name.equalsIgnoreCase(Constants.DOM_CHECK_CHAR_NORMALIZATION)
+ if (name.equalsIgnoreCase(Constants.DOM_COMMENTS)) {
+ return ((features & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACES)) {
+ return (features & NAMESPACES) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_DATATYPE_NORMALIZATION)) {
+ // REVISIT: datatype-normalization only takes effect if validation is on
+ return (features & DTNORMALIZATION) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_CDATA_SECTIONS)) {
+ return (features & CDATA) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_ENTITIES)) {
+ return (features & ENTITIES) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_SPLIT_CDATA)) {
+ return (features & SPLITCDATA) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_VALIDATE)) {
+ return (features & VALIDATE) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_WELLFORMED)) {
+ return (features & WELLFORMED) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACE_DECLARATIONS)) {
+ return (features & NSDECL) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_INFOSET)) {
+ return (features & INFOSET_MASK) == INFOSET_TRUE_PARAMS ? Boolean.TRUE : Boolean.FALSE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_NORMALIZE_CHARACTERS)
+ || name.equalsIgnoreCase(Constants.DOM_CANONICAL_FORM)
+ || name.equalsIgnoreCase(Constants.DOM_VALIDATE_IF_SCHEMA)
+ || name.equalsIgnoreCase(Constants.DOM_CHECK_CHAR_NORMALIZATION)
) {
- return Boolean.FALSE;
- }
+ return Boolean.FALSE;
+ }
else if (name.equalsIgnoreCase(SEND_PSVI)) {
return Boolean.TRUE;
}
else if (name.equalsIgnoreCase(Constants.DOM_PSVI)) {
return (features & PSVI) != 0 ? Boolean.TRUE : Boolean.FALSE;
- }
+ }
else if (name.equalsIgnoreCase(Constants.DOM_ELEMENT_CONTENT_WHITESPACE)) {
- return Boolean.TRUE;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
+ return Boolean.TRUE;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
return fErrorHandlerWrapper.getErrorHandler();
- }
- else if (name.equalsIgnoreCase(Constants.DOM_RESOURCE_RESOLVER)) {
- XMLEntityResolver entityResolver = getEntityResolver();
- if (entityResolver != null && entityResolver instanceof DOMEntityResolverWrapper) {
- return ((DOMEntityResolverWrapper) entityResolver).getEntityResolver();
- }
- return null;
- }
- else if (name.equalsIgnoreCase(Constants.DOM_SCHEMA_TYPE)) {
- return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE);
- }
- else if (name.equalsIgnoreCase(Constants.DOM_SCHEMA_LOCATION)) {
- return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE);
- }
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_RESOURCE_RESOLVER)) {
+ XMLEntityResolver entityResolver = getEntityResolver();
+ if (entityResolver != null && entityResolver instanceof DOMEntityResolverWrapper) {
+ return ((DOMEntityResolverWrapper) entityResolver).getEntityResolver();
+ }
+ return null;
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_SCHEMA_TYPE)) {
+ return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE);
+ }
+ else if (name.equalsIgnoreCase(Constants.DOM_SCHEMA_LOCATION)) {
+ return getProperty(Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE);
+ }
else if (name.equalsIgnoreCase(SYMBOL_TABLE)){
return getProperty(SYMBOL_TABLE);
}
else if (name.equalsIgnoreCase(GRAMMAR_POOL)){
return getProperty(GRAMMAR_POOL);
}
- else {
- String msg =
- DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "FEATURE_NOT_FOUND",
- new Object[] { name });
- throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
- }
+ else {
+ String msg =
+ DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "FEATURE_NOT_FOUND",
+ new Object[] { name });
+ throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
+ }
- }
+ }
/**
* DOM Level 3 WD - Experimental.
@@ -881,7 +881,7 @@
* the requested value is not supported. This does not change the
* current value of the parameter itself.
*/
- public boolean canSetParameter(String name, Object value) {
+ public boolean canSetParameter(String name, Object value) {
if (value == null){
//if null, the returned value is true.
@@ -926,7 +926,7 @@
return false ;
}
}
- else if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
+ else if (name.equalsIgnoreCase(Constants.DOM_ERROR_HANDLER)) {
return (value instanceof DOMErrorHandler) ? true : false ;
}
else if (name.equalsIgnoreCase(Constants.DOM_RESOURCE_RESOLVER)) {
@@ -952,7 +952,7 @@
return false ;
}
- } //canSetParameter
+ } //canSetParameter
/**
* DOM Level 3 CR - Experimental.
@@ -963,45 +963,45 @@
* parameter names defined outside this specification.
*/
public DOMStringList getParameterNames() {
- if (fRecognizedParameters == null){
- Vector parameters = new Vector();
+ if (fRecognizedParameters == null){
+ Vector parameters = new Vector();
- //Add DOM recognized parameters
- //REVISIT: Would have been nice to have a list of
- //recognized paramters.
- parameters.add(Constants.DOM_COMMENTS);
- parameters.add(Constants.DOM_DATATYPE_NORMALIZATION);
- parameters.add(Constants.DOM_CDATA_SECTIONS);
- parameters.add(Constants.DOM_ENTITIES);
- parameters.add(Constants.DOM_SPLIT_CDATA);
- parameters.add(Constants.DOM_NAMESPACES);
- parameters.add(Constants.DOM_VALIDATE);
+ //Add DOM recognized parameters
+ //REVISIT: Would have been nice to have a list of
+ //recognized paramters.
+ parameters.add(Constants.DOM_COMMENTS);
+ parameters.add(Constants.DOM_DATATYPE_NORMALIZATION);
+ parameters.add(Constants.DOM_CDATA_SECTIONS);
+ parameters.add(Constants.DOM_ENTITIES);
+ parameters.add(Constants.DOM_SPLIT_CDATA);
+ parameters.add(Constants.DOM_NAMESPACES);
+ parameters.add(Constants.DOM_VALIDATE);
- parameters.add(Constants.DOM_INFOSET);
- parameters.add(Constants.DOM_NORMALIZE_CHARACTERS);
- parameters.add(Constants.DOM_CANONICAL_FORM);
- parameters.add(Constants.DOM_VALIDATE_IF_SCHEMA);
- parameters.add(Constants.DOM_CHECK_CHAR_NORMALIZATION);
- parameters.add(Constants.DOM_WELLFORMED);
+ parameters.add(Constants.DOM_INFOSET);
+ parameters.add(Constants.DOM_NORMALIZE_CHARACTERS);
+ parameters.add(Constants.DOM_CANONICAL_FORM);
+ parameters.add(Constants.DOM_VALIDATE_IF_SCHEMA);
+ parameters.add(Constants.DOM_CHECK_CHAR_NORMALIZATION);
+ parameters.add(Constants.DOM_WELLFORMED);
- parameters.add(Constants.DOM_NAMESPACE_DECLARATIONS);
- parameters.add(Constants.DOM_ELEMENT_CONTENT_WHITESPACE);
+ parameters.add(Constants.DOM_NAMESPACE_DECLARATIONS);
+ parameters.add(Constants.DOM_ELEMENT_CONTENT_WHITESPACE);
- parameters.add(Constants.DOM_ERROR_HANDLER);
- parameters.add(Constants.DOM_SCHEMA_TYPE);
- parameters.add(Constants.DOM_SCHEMA_LOCATION);
- parameters.add(Constants.DOM_RESOURCE_RESOLVER);
+ parameters.add(Constants.DOM_ERROR_HANDLER);
+ parameters.add(Constants.DOM_SCHEMA_TYPE);
+ parameters.add(Constants.DOM_SCHEMA_LOCATION);
+ parameters.add(Constants.DOM_RESOURCE_RESOLVER);
- //Add recognized xerces features and properties
- parameters.add(GRAMMAR_POOL);
- parameters.add(SYMBOL_TABLE);
- parameters.add(SEND_PSVI);
+ //Add recognized xerces features and properties
+ parameters.add(GRAMMAR_POOL);
+ parameters.add(SYMBOL_TABLE);
+ parameters.add(SEND_PSVI);
- fRecognizedParameters = new DOMStringListImpl(parameters);
+ fRecognizedParameters = new DOMStringListImpl(parameters);
- }
+ }
- return fRecognizedParameters;
+ return fRecognizedParameters;
}//getParameterNames
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java Wed May 02 13:32:36 2012 +0100
@@ -84,14 +84,14 @@
* document.
* See Namespace normalization for details on how namespace declaration attributes and prefixes
* are normalized.
- *
+ *
* NOTE: There is an initial support for DOM revalidation with XML Schema as a grammar.
* The tree might not be validated correctly if entityReferences, CDATA sections are
* present in the tree. The PSVI information is not exposed, normalized data (including element
* default content is not available).
*
* @xerces.experimental
- *
+ *
* @author Elena Litani, IBM
* @author Neeraj Bajaj, Sun Microsystems, inc.
* @version $Id: DOMNormalizer.java,v 1.9 2010-11-01 04:39:38 joehw Exp $
@@ -126,13 +126,13 @@
protected SymbolTable fSymbolTable;
/** error handler. may be null. */
protected DOMErrorHandler fErrorHandler;
-
+
/**
* Cached {@link DOMError} impl.
* The same object is re-used to report multiple errors.
*/
private final DOMErrorImpl fError = new DOMErrorImpl();
-
+
// Validation against namespace aware grammar
protected boolean fNamespaceValidation = false;
@@ -154,23 +154,23 @@
/** for setting the PSVI */
protected Node fCurrentNode = null;
private QName fAttrQName = new QName();
-
+
// attribute value normalization
final XMLString fNormalizedValue = new XMLString(new char[16], 0, 0);
-
+
/**
* If the user stops the process, this exception will be thrown.
*/
public static final RuntimeException abort = new RuntimeException();
-
+
//DTD validator
private XMLDTDValidator fDTDValidator;
-
+
//Check if element content is all "ignorable whitespace"
private boolean allWhitespace = false;
-
+
// Constructor
- //
+ //
public DOMNormalizer(){}
@@ -180,81 +180,81 @@
* Normalizes document.
* Note: reset() must be called before this method.
*/
- protected void normalizeDocument(CoreDocumentImpl document, DOMConfigurationImpl config) {
+ protected void normalizeDocument(CoreDocumentImpl document, DOMConfigurationImpl config) {
- fDocument = document;
- fConfiguration = config;
+ fDocument = document;
+ fConfiguration = config;
- // intialize and reset DOMNormalizer component
- //
- fSymbolTable = (SymbolTable) fConfiguration.getProperty(DOMConfigurationImpl.SYMBOL_TABLE);
- // reset namespace context
- fNamespaceContext.reset();
- fNamespaceContext.declarePrefix(XMLSymbols.EMPTY_STRING, XMLSymbols.EMPTY_STRING);
+ // intialize and reset DOMNormalizer component
+ //
+ fSymbolTable = (SymbolTable) fConfiguration.getProperty(DOMConfigurationImpl.SYMBOL_TABLE);
+ // reset namespace context
+ fNamespaceContext.reset();
+ fNamespaceContext.declarePrefix(XMLSymbols.EMPTY_STRING, XMLSymbols.EMPTY_STRING);
- if ((fConfiguration.features & DOMConfigurationImpl.VALIDATE) != 0) {
+ if ((fConfiguration.features & DOMConfigurationImpl.VALIDATE) != 0) {
String schemaLang = (String)fConfiguration.getProperty(DOMConfigurationImpl.JAXP_SCHEMA_LANGUAGE);
-
+
if(schemaLang != null && schemaLang.equals(Constants.NS_XMLSCHEMA)) {
- fValidationHandler =
- CoreDOMImplementationImpl.singleton.getValidator(XMLGrammarDescription.XML_SCHEMA);
+ fValidationHandler =
+ CoreDOMImplementationImpl.singleton.getValidator(XMLGrammarDescription.XML_SCHEMA);
fConfiguration.setFeature(DOMConfigurationImpl.SCHEMA, true);
fConfiguration.setFeature(DOMConfigurationImpl.SCHEMA_FULL_CHECKING, true);
// report fatal error on DOM Level 1 nodes
- fNamespaceValidation = true;
-
+ fNamespaceValidation = true;
+
// check if we need to fill in PSVI
- fPSVI = ((fConfiguration.features & DOMConfigurationImpl.PSVI) !=0)?true:false;
+ fPSVI = ((fConfiguration.features & DOMConfigurationImpl.PSVI) !=0)?true:false;
}
-
- fConfiguration.setFeature(DOMConfigurationImpl.XERCES_VALIDATION, true);
-
- // reset ID table
+
+ fConfiguration.setFeature(DOMConfigurationImpl.XERCES_VALIDATION, true);
+
+ // reset ID table
fDocument.clearIdentifiers();
-
+
if(fValidationHandler != null)
// reset schema validator
((XMLComponent) fValidationHandler).reset(fConfiguration);
-
- }
+
+ }
- fErrorHandler = (DOMErrorHandler) fConfiguration.getParameter(Constants.DOM_ERROR_HANDLER);
- if (fValidationHandler != null) {
- fValidationHandler.setDocumentHandler(this);
- fValidationHandler.startDocument(
+ fErrorHandler = (DOMErrorHandler) fConfiguration.getParameter(Constants.DOM_ERROR_HANDLER);
+ if (fValidationHandler != null) {
+ fValidationHandler.setDocumentHandler(this);
+ fValidationHandler.startDocument(
new SimpleLocator(fDocument.fDocumentURI, fDocument.fDocumentURI,
- -1, -1 ), fDocument.encoding, fNamespaceContext, null);
+ -1, -1 ), fDocument.encoding, fNamespaceContext, null);
- }
- try {
- Node kid, next;
- for (kid = fDocument.getFirstChild(); kid != null; kid = next) {
- next = kid.getNextSibling();
- kid = normalizeNode(kid);
- if (kid != null) { // don't advance
- next = kid;
- }
- }
+ }
+ try {
+ Node kid, next;
+ for (kid = fDocument.getFirstChild(); kid != null; kid = next) {
+ next = kid.getNextSibling();
+ kid = normalizeNode(kid);
+ if (kid != null) { // don't advance
+ next = kid;
+ }
+ }
- // release resources
- if (fValidationHandler != null) {
- fValidationHandler.endDocument(null);
- CoreDOMImplementationImpl.singleton.releaseValidator(
- XMLGrammarDescription.XML_SCHEMA, fValidationHandler);
- fValidationHandler = null;
- }
- }
- catch (RuntimeException e) {
+ // release resources
+ if (fValidationHandler != null) {
+ fValidationHandler.endDocument(null);
+ CoreDOMImplementationImpl.singleton.releaseValidator(
+ XMLGrammarDescription.XML_SCHEMA, fValidationHandler);
+ fValidationHandler = null;
+ }
+ }
+ catch (RuntimeException e) {
if( e==abort )
return; // processing aborted by the user
throw e; // otherwise re-throw.
- }
+ }
- }
+ }
/**
- *
+ *
* This method acts as if the document was going through a save
* and load cycle, putting the document in a "normal" form. The actual result
* depends on the features being set and governing what operations actually
@@ -263,7 +263,7 @@
* according to the algorithm described below in pseudo code, by adding missing
* namespace declaration attributes and adding or changing namespace prefixes, updates
* the replacement tree of EntityReference nodes,normalizes attribute values, etc.
- *
+ *
* @param node Modified node or null. If node is returned, we need
* to normalize again starting on the node returned.
* @return the normalized Node
@@ -273,7 +273,7 @@
int type = node.getNodeType();
boolean wellformed;
fLocator.fRelatedNode=node;
-
+
switch (type) {
case Node.DOCUMENT_TYPE_NODE: {
if (DEBUG_ND) {
@@ -292,15 +292,15 @@
break;
}
- case Node.ELEMENT_NODE: {
+ case Node.ELEMENT_NODE: {
if (DEBUG_ND) {
System.out.println("==>normalizeNode:{element} "+node.getNodeName());
}
-
+
//do the name check only when version of the document was changed &
//application has set the value of well-formed features to true
if (fDocument.errorChecking) {
- if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0) &&
+ if ( ((fConfiguration.features & DOMConfigurationImpl.WELLFORMED) != 0) &&
fDocument.isXMLVersionChanged()){
if (fNamespaceValidation){
wellformed = CoreDocumentImpl.isValidQName(node.getPrefix() , node.getLocalName(), fDocument.isXML11Version()) ;
@@ -310,11 +310,11 @@
}
if (!wellformed){
String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "wf-invalid-character-in-node-name",
+ DOMMessageFormatter.DOM_DOMAIN,
+ "wf-invalid-character-in-node-name",
new Object[]{"Element", node.getNodeName()});
- reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR,
- "wf-invalid-character-in-node-name");
+ reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_ERROR,
+ "wf-invalid-character-in-node-name");
}
}
}
@@ -326,7 +326,7 @@
if (elem.needsSyncChildren()) {
elem.synchronizeChildren();
}
- AttributeMap attributes = (elem.hasAttributes()) ? (AttributeMap) elem.getAttributes() : null;
+ AttributeMap attributes = (elem.hasAttributes()) ? (AttributeMap) elem.getAttributes() : null;
// fix namespaces and remove default attributes
if ((fConfiguration.features & DOMConfigurationImpl.NAMESPACES) !=0) {
@@ -334,7 +334,7 @@
// normalize attribute values
// remove default attributes
namespaceFixUp(elem, attributes);
-
+
if ((fConfiguration.features & DOMConfigurationImpl.NSDECL) == 0 && attributes != null ) {
for (int i = 0; i < attributes.getLength(); ++i) {
Attr att = (Attr)attributes.getItem(i);
@@ -344,8 +344,8 @@
--i;
}
}
- }
-
+ }
+
} else {
if ( attributes!=null ) {
for ( int i=0; i
* Note: This method is not called for entity references
* appearing as part of attribute values.
- *
+ *
* @param name The name of the general entity.
* @param identifier The resource identifier.
* @param encoding The auto-detected IANA encoding name of the entity
@@ -1882,10 +1882,10 @@
* internal entities or a document entity that is
* parsed from a java.io.Reader).
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException Thrown by handler to signal an error.
*/
- public void startGeneralEntity(String name,
+ public void startGeneralEntity(String name,
XMLResourceIdentifier identifier,
String encoding,
Augmentations augs) throws XNIException{
@@ -1901,11 +1901,11 @@
*
* Note: This method is not called for entity references
* appearing as part of attribute values.
- *
+ *
* @param version The XML version, or null if not specified.
* @param encoding The IANA encoding name of the entity.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -1917,10 +1917,10 @@
*
* Note: This method is not called for entity references
* appearing as part of attribute values.
- *
+ *
* @param name The name of the entity.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -1929,10 +1929,10 @@
/**
* Character content.
- *
+ *
* @param text The content.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -1946,10 +1946,10 @@
* example, the validator can determine if a length of whitespace
* characters in the document are ignorable based on the element
* content model.
- *
+ *
* @param text The ignorable whitespace.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -1959,52 +1959,52 @@
/**
* The end of an element.
- *
+ *
* @param element The name of the element.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
- public void endElement(QName element, Augmentations augs) throws XNIException {
- if (DEBUG_EVENTS) {
- System.out.println("==>endElement: " + element);
- }
+ public void endElement(QName element, Augmentations augs) throws XNIException {
+ if (DEBUG_EVENTS) {
+ System.out.println("==>endElement: " + element);
+ }
if(augs != null) {
- ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
- if (elementPSVI != null) {
- ElementImpl elementNode = (ElementImpl) fCurrentNode;
- if (fPSVI) {
- ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
- }
- // include element default content (if one is available)
- String normalizedValue = elementPSVI.getSchemaNormalizedValue();
- if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
+ ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
+ if (elementPSVI != null) {
+ ElementImpl elementNode = (ElementImpl) fCurrentNode;
+ if (fPSVI) {
+ ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
+ }
+ // include element default content (if one is available)
+ String normalizedValue = elementPSVI.getSchemaNormalizedValue();
+ if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
if (normalizedValue !=null)
- elementNode.setTextContent(normalizedValue);
- }
- else {
- // NOTE: this is a hack: it is possible that DOM had an empty element
- // and validator sent default value using characters(), which we don't
- // implement. Thus, here we attempt to add the default value.
- String text = elementNode.getTextContent();
- if (text.length() == 0) {
- // default content could be provided
+ elementNode.setTextContent(normalizedValue);
+ }
+ else {
+ // NOTE: this is a hack: it is possible that DOM had an empty element
+ // and validator sent default value using characters(), which we don't
+ // implement. Thus, here we attempt to add the default value.
+ String text = elementNode.getTextContent();
+ if (text.length() == 0) {
+ // default content could be provided
if (normalizedValue !=null)
elementNode.setTextContent(normalizedValue);
- }
- }
- }
+ }
+ }
+ }
}
- }
+ }
/**
* The start of a CDATA section.
- *
+ *
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -2013,9 +2013,9 @@
/**
* The end of a CDATA section.
- *
+ *
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -2024,9 +2024,9 @@
/**
* The end of the document.
- *
+ *
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -2044,5 +2044,5 @@
return null;
}
-
+
} // DOMNormalizer class
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredDocumentImpl.java Wed May 02 13:32:36 2012 +0100
@@ -412,64 +412,64 @@
} // createDeferredElement(String,String):int
- /**
- * This method is used by the DOMParser to create attributes.
- * @param elementNodeIndex
- * @param attrName
- * @param attrURI
- * @param attrValue
- * @param specified
- * @param id
- * @param type
- * @return int
- */
- public int setDeferredAttribute(int elementNodeIndex,
- String attrName,
- String attrURI,
- String attrValue,
- boolean specified,
- boolean id,
- Object type) {
+ /**
+ * This method is used by the DOMParser to create attributes.
+ * @param elementNodeIndex
+ * @param attrName
+ * @param attrURI
+ * @param attrValue
+ * @param specified
+ * @param id
+ * @param type
+ * @return int
+ */
+ public int setDeferredAttribute(int elementNodeIndex,
+ String attrName,
+ String attrURI,
+ String attrValue,
+ boolean specified,
+ boolean id,
+ Object type) {
- // create attribute
- int attrNodeIndex = createDeferredAttribute(attrName, attrURI, attrValue, specified);
- int attrChunk = attrNodeIndex >> CHUNK_SHIFT;
- int attrIndex = attrNodeIndex & CHUNK_MASK;
- // set attribute's parent to element
- setChunkIndex(fNodeParent, elementNodeIndex, attrChunk, attrIndex);
+ // create attribute
+ int attrNodeIndex = createDeferredAttribute(attrName, attrURI, attrValue, specified);
+ int attrChunk = attrNodeIndex >> CHUNK_SHIFT;
+ int attrIndex = attrNodeIndex & CHUNK_MASK;
+ // set attribute's parent to element
+ setChunkIndex(fNodeParent, elementNodeIndex, attrChunk, attrIndex);
- int elementChunk = elementNodeIndex >> CHUNK_SHIFT;
- int elementIndex = elementNodeIndex & CHUNK_MASK;
+ int elementChunk = elementNodeIndex >> CHUNK_SHIFT;
+ int elementIndex = elementNodeIndex & CHUNK_MASK;
- // get element's last attribute
- int lastAttrNodeIndex = getChunkIndex(fNodeExtra, elementChunk, elementIndex);
- if (lastAttrNodeIndex != 0) {
- // add link from new attribute to last attribute
- setChunkIndex(fNodePrevSib, lastAttrNodeIndex, attrChunk, attrIndex);
- }
- // add link from element to new last attribute
- setChunkIndex(fNodeExtra, attrNodeIndex, elementChunk, elementIndex);
+ // get element's last attribute
+ int lastAttrNodeIndex = getChunkIndex(fNodeExtra, elementChunk, elementIndex);
+ if (lastAttrNodeIndex != 0) {
+ // add link from new attribute to last attribute
+ setChunkIndex(fNodePrevSib, lastAttrNodeIndex, attrChunk, attrIndex);
+ }
+ // add link from element to new last attribute
+ setChunkIndex(fNodeExtra, attrNodeIndex, elementChunk, elementIndex);
- int extra = getChunkIndex(fNodeExtra, attrChunk, attrIndex);
- if (id) {
- extra = extra | ID;
- setChunkIndex(fNodeExtra, extra, attrChunk, attrIndex);
- String value = getChunkValue(fNodeValue, attrChunk, attrIndex);
- putIdentifier(value, elementNodeIndex);
- }
- // store type information
- if (type != null) {
- int extraDataIndex = createNode(DeferredNode.TYPE_NODE);
- int echunk = extraDataIndex >> CHUNK_SHIFT;
- int eindex = extraDataIndex & CHUNK_MASK;
+ int extra = getChunkIndex(fNodeExtra, attrChunk, attrIndex);
+ if (id) {
+ extra = extra | ID;
+ setChunkIndex(fNodeExtra, extra, attrChunk, attrIndex);
+ String value = getChunkValue(fNodeValue, attrChunk, attrIndex);
+ putIdentifier(value, elementNodeIndex);
+ }
+ // store type information
+ if (type != null) {
+ int extraDataIndex = createNode(DeferredNode.TYPE_NODE);
+ int echunk = extraDataIndex >> CHUNK_SHIFT;
+ int eindex = extraDataIndex & CHUNK_MASK;
- setChunkIndex(fNodeLastChild, extraDataIndex, attrChunk, attrIndex);
- setChunkValue(fNodeValue, type, echunk, eindex);
- }
+ setChunkIndex(fNodeLastChild, extraDataIndex, attrChunk, attrIndex);
+ setChunkValue(fNodeValue, type, echunk, eindex);
+ }
- // return node index
- return attrNodeIndex;
- }
+ // return node index
+ return attrNodeIndex;
+ }
/**
* Sets an attribute on an element node.
@@ -1225,11 +1225,11 @@
return getNodeValue(nodeIndex, true);
}
- /**
- * Clears the type info that is stored in the fNodeValue array
- * @param nodeIndex
- * @return Object - type information for the attribute/element node
- */
+ /**
+ * Clears the type info that is stored in the fNodeValue array
+ * @param nodeIndex
+ * @return Object - type information for the attribute/element node
+ */
public Object getTypeInfo(int nodeIndex) {
if (nodeIndex == -1) {
return null;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DeferredElementNSImpl.java Wed May 02 13:32:36 2012 +0100
@@ -35,10 +35,10 @@
/**
* DeferredElementNSImpl is to ElementNSImpl, what DeferredElementImpl is to
- * ElementImpl.
- *
+ * ElementImpl.
+ *
* @xerces.internal
- *
+ *
* @see DeferredElementImpl
*/
public class DeferredElementNSImpl
@@ -113,7 +113,7 @@
localName = name.substring(index + 1);
}
- namespaceURI = ownerDocument.getNodeURI(fNodeIndex);
+ namespaceURI = ownerDocument.getNodeURI(fNodeIndex);
type = (XSTypeDefinition)ownerDocument.getTypeInfo(fNodeIndex);
// attributes
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/DocumentImpl.java Wed May 02 13:32:36 2012 +0100
@@ -69,7 +69,7 @@
*
* Note: When any node in the document is serialized, the
* entire document is serialized along with it.
- *
+ *
* @xerces.internal
*
* @author Arnaud Le Hors, IBM
@@ -161,7 +161,7 @@
// experimental
newdoc.mutationEvents = mutationEvents;
- return newdoc;
+ return newdoc;
} // cloneNode(boolean):Node
@@ -215,7 +215,7 @@
NodeFilter filter,
boolean entityReferenceExpansion)
{
-
+
if (root == null) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
@@ -264,7 +264,7 @@
NodeFilter filter,
boolean entityReferenceExpansion)
{
- if (root == null) {
+ if (root == null) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
@@ -404,17 +404,17 @@
* @since WD-DOM-Level-2-19990923
*/
public Event createEvent(String type)
- throws DOMException {
- if (type.equalsIgnoreCase("Events") || "Event".equals(type))
- return new EventImpl();
- if (type.equalsIgnoreCase("MutationEvents") ||
+ throws DOMException {
+ if (type.equalsIgnoreCase("Events") || "Event".equals(type))
+ return new EventImpl();
+ if (type.equalsIgnoreCase("MutationEvents") ||
"MutationEvent".equals(type))
- return new MutationEventImpl();
- else {
+ return new MutationEventImpl();
+ else {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_SUPPORTED_ERR", null);
- throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
+ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
- }
+ }
/**
* Sets whether the DOM implementation generates mutation events
@@ -478,7 +478,7 @@
* are hung from the nodeListeners Vector.
*
* I considered using two vectors -- one for capture,
- * one for bubble -- but decided that since the list of listeners
+ * one for bubble -- but decided that since the list of listeners
* is probably short in most cases, it might not be worth spending
* the space. ***** REVISIT WHEN WE HAVE MORE EXPERIENCE.
*/
@@ -488,8 +488,8 @@
String type;
EventListener listener;
boolean useCapture;
-
- /** NON-DOM INTERNAL: Constructor for Listener list Entry
+
+ /** NON-DOM INTERNAL: Constructor for Listener list Entry
* @param type Event name (NOT event group!) to listen for.
* @param listener Who gets called when event is dispatched
* @param useCaptue True iff listener is registered on
@@ -503,7 +503,7 @@
}
} // LEntry
-
+
/**
* Introduced in DOM Level 2. Register an event listener with this
* Node. A listener may be independently registered as both Capturing and
@@ -522,18 +522,18 @@
// a listener to dispatch to
if (type == null || type.equals("") || listener == null)
return;
-
+
// Each listener may be registered only once per type per phase.
// Simplest way to code that is to zap the previous entry, if any.
removeEventListener(node, type, listener, useCapture);
-
+
Vector nodeListeners = getEventListeners(node);
if(nodeListeners == null) {
nodeListeners = new Vector();
setEventListeners(node, nodeListeners);
}
nodeListeners.addElement(new LEntry(type, listener, useCapture));
-
+
// Record active listener
LCount lc = LCount.lookup(type);
if (useCapture) {
@@ -546,7 +546,7 @@
}
} // addEventListener(NodeImpl,String,EventListener,boolean) :void
-
+
/**
* Introduced in DOM Level 2. Deregister an event listener previously
* registered with this Node. A listener must be independently removed
@@ -569,12 +569,12 @@
if (nodeListeners == null)
return;
- // Note that addListener has previously ensured that
+ // Note that addListener has previously ensured that
// each listener may be registered only once per type per phase.
// count-down is OK for deletions!
for (int i = nodeListeners.size() - 1; i >= 0; --i) {
LEntry le = (LEntry) nodeListeners.elementAt(i);
- if (le.useCapture == useCapture && le.listener == listener &&
+ if (le.useCapture == useCapture && le.listener == listener &&
le.type.equals(type)) {
nodeListeners.removeElementAt(i);
// Storage management: Discard empty listener lists
@@ -599,35 +599,35 @@
protected void copyEventListeners(NodeImpl src, NodeImpl tgt) {
Vector nodeListeners = getEventListeners(src);
- if (nodeListeners == null) {
- return;
- }
- setEventListeners(tgt, (Vector) nodeListeners.clone());
+ if (nodeListeners == null) {
+ return;
+ }
+ setEventListeners(tgt, (Vector) nodeListeners.clone());
}
/**
* Introduced in DOM Level 2.
- * Distribution engine for DOM Level 2 Events.
+ * Distribution engine for DOM Level 2 Events.
*
* Event propagation runs as follows:
*
* If an event handler itself causes events to be dispatched, they are
* processed synchronously, before processing resumes
- * on the event which triggered them. Please be aware that this may
+ * on the event which triggered them. Please be aware that this may
* result in events arriving at listeners "out of order" relative
* to the actual sequence of requests.
*
@@ -650,14 +650,14 @@
* I believe the DOM's intent is that event objects be redispatchable,
* though it isn't stated in those terms.
* @param node node to dispatch to
- * @param event the event object to be dispatched to
+ * @param event the event object to be dispatched to
* registered EventListeners
* @return true if the event's
* Similar to code in dispatchingEventToSubtree however this method
* is only used on the target node and does not start a dispatching chain
- * on the sibling of the target node as this is not part of the subtree
+ * on the sibling of the target node as this is not part of the subtree
* ***** At the moment I'm being sloppy and using the normal
* capture dispatcher on every node. This could be optimized hugely
* by writing a capture engine that tracks our position in the tree to
@@ -827,7 +827,7 @@
* @param e event to be sent to that node and its subtree
*/
protected void dispatchEventToSubtree(Node n, Event e) {
-
+
((NodeImpl) n).dispatchEvent(e);
if (n.getNodeType() == Node.ELEMENT_NODE) {
NamedNodeMap a = n.getAttributes();
@@ -835,36 +835,36 @@
dispatchingEventToSubtree(a.item(i), e);
}
dispatchingEventToSubtree(n.getFirstChild(), e);
-
+
} // dispatchEventToSubtree(NodeImpl,Node,Event) :void
/**
* Dispatches event to the target node's descendents recursively
- *
+ *
* @param n node to dispatch to
* @param e event to be sent to that node and its subtree
*/
protected void dispatchingEventToSubtree(Node n, Event e) {
- if (n==null)
- return;
-
- // ***** Recursive implementation. This is excessively expensive,
+ if (n==null)
+ return;
+
+ // ***** Recursive implementation. This is excessively expensive,
// and should be replaced in conjunction with optimization
// mentioned above.
- ((NodeImpl) n).dispatchEvent(e);
+ ((NodeImpl) n).dispatchEvent(e);
if (n.getNodeType() == Node.ELEMENT_NODE) {
NamedNodeMap a = n.getAttributes();
for (int i = a.getLength() - 1; i >= 0; --i)
dispatchingEventToSubtree(a.item(i), e);
}
- dispatchingEventToSubtree(n.getFirstChild(), e);
+ dispatchingEventToSubtree(n.getFirstChild(), e);
dispatchingEventToSubtree(n.getNextSibling(), e);
}
-
+
/**
* NON-DOM INTERNAL: Return object for getEnclosingAttr. Carries
- * (two values, the Attr node affected (if any) and its previous
+ * (two values, the Attr node affected (if any) and its previous
* string value. Simple struct, no methods.
*/
class EnclosingAttr implements Serializable {
@@ -888,7 +888,7 @@
MutationEvent.MODIFICATION);
else
dispatchAggregateEvents(node, null, null, (short) 0);
-
+
} // dispatchAggregateEvents(NodeImpl,EnclosingAttr) :void
/**
@@ -898,10 +898,10 @@
* mutation operation, even if that involves multiple changes to
* the DOM.
* For example, if a DOM operation makes multiple changes to a single
- * Attr before returning, it would be nice to generate only one
+ * Attr before returning, it would be nice to generate only one
* DOMAttrModified, and multiple changes over larger scope but within
- * a recognizable single subtree might want to generate only one
- * DOMSubtreeModified, sent to their lowest common ancestor.
+ * a recognizable single subtree might want to generate only one
+ * DOMSubtreeModified, sent to their lowest common ancestor.
*
* To manage this, use the "internal" versions of insert and remove
* with MUTATION_LOCAL, then make an explicit call to this routine
@@ -937,7 +937,7 @@
}
}
// DOMSubtreeModified gets sent to the lowest common root of a
- // set of changes.
+ // set of changes.
// "This event is dispatched after all other events caused by the
// mutation have been fired."
LCount lc = LCount.lookup(MutationEventImpl.DOM_SUBTREE_MODIFIED);
@@ -965,12 +965,12 @@
* preparation for later generating DOMAttrModified events.
* Determines whether this node is within an Attr
* @param node node to get enclosing attribute for
- * @return either a description of that Attr, or null if none such.
+ * @return either a description of that Attr, or null if none such.
*/
protected void saveEnclosingAttr(NodeImpl node) {
savedEnclosingAttr = null;
// MUTATION PREPROCESSING AND PRE-EVENTS:
- // If we're within the scope of an Attr and DOMAttrModified
+ // If we're within the scope of an Attr and DOMAttrModified
// was requested, we need to preserve its previous value for
// that event.
LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
@@ -1003,9 +1003,9 @@
*/
void modifyingCharacterData(NodeImpl node, boolean replace) {
if (mutationEvents) {
- if (!replace) {
- saveEnclosingAttr(node);
- }
+ if (!replace) {
+ saveEnclosingAttr(node);
+ }
}
}
@@ -1014,38 +1014,38 @@
*/
void modifiedCharacterData(NodeImpl node, String oldvalue, String value, boolean replace) {
if (mutationEvents) {
- if (!replace) {
- // MUTATION POST-EVENTS:
- LCount lc =
- LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
- if (lc.total > 0) {
- MutationEvent me = new MutationEventImpl();
- me.initMutationEvent(
- MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
- true, false, null,
- oldvalue, value, null, (short) 0);
- dispatchEvent(node, me);
- }
-
- // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
- // if required. (Common to most kinds of mutation)
- dispatchAggregateEvents(node, savedEnclosingAttr);
- } // End mutation postprocessing
+ if (!replace) {
+ // MUTATION POST-EVENTS:
+ LCount lc =
+ LCount.lookup(MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED);
+ if (lc.total > 0) {
+ MutationEvent me = new MutationEventImpl();
+ me.initMutationEvent(
+ MutationEventImpl.DOM_CHARACTER_DATA_MODIFIED,
+ true, false, null,
+ oldvalue, value, null, (short) 0);
+ dispatchEvent(node, me);
+ }
+
+ // Subroutine: Transmit DOMAttrModified and DOMSubtreeModified,
+ // if required. (Common to most kinds of mutation)
+ dispatchAggregateEvents(node, savedEnclosingAttr);
+ } // End mutation postprocessing
}
}
-
+
/**
* A method to be called when a character data node has been replaced
*/
void replacedCharacterData(NodeImpl node, String oldvalue, String value) {
- //now that we have finished replacing data, we need to perform the same actions
- //that are required after a character data node has been modified
- //send the value of false for replace parameter so that mutation
- //events if appropriate will be initiated
- modifiedCharacterData(node, oldvalue, value, false);
+ //now that we have finished replacing data, we need to perform the same actions
+ //that are required after a character data node has been modified
+ //send the value of false for replace parameter so that mutation
+ //events if appropriate will be initiated
+ modifiedCharacterData(node, oldvalue, value, false);
}
-
-
+
+
/**
* A method to be called when a node is about to be inserted in the tree.
@@ -1113,14 +1113,14 @@
dispatchAggregateEvents(node, savedEnclosingAttr);
}
}
-
+
// notify the range of insertions
if (ranges != null) {
int size = ranges.size();
for (int i = 0; i != size; i++) {
((RangeImpl)ranges.elementAt(i)).insertedNodeFromDOM(newInternal);
}
- }
+ }
}
/**
@@ -1147,7 +1147,7 @@
// mutation events
if (mutationEvents) {
// MUTATION PREPROCESSING AND PRE-EVENTS:
- // If we're within the scope of an Attr and DOMAttrModified
+ // If we're within the scope of an Attr and DOMAttrModified
// was requested, we need to preserve its previous value for
// that event.
if (!replace) {
@@ -1212,14 +1212,14 @@
saveEnclosingAttr(node);
}
}
-
+
/**
* A method to be called when character data is about to be replaced in the tree.
*/
void replacingData (NodeImpl node) {
- if (mutationEvents) {
- saveEnclosingAttr(node);
- }
+ if (mutationEvents) {
+ saveEnclosingAttr(node);
+ }
}
/**
@@ -1268,7 +1268,7 @@
// that the Attr is still attached to an owner. This code is
// similar but dispatches to the previous owner, "element".
if (mutationEvents) {
- // If we have to send DOMAttrModified (determined earlier),
+ // If we have to send DOMAttrModified (determined earlier),
// do so.
LCount lc = LCount.lookup(MutationEventImpl.DOM_ATTR_MODIFIED);
if (lc.total > 0) {
@@ -1286,20 +1286,20 @@
dispatchAggregateEvents(oldOwner, null, null, (short) 0);
}
}
-
+
/**
* A method to be called when an attribute node has been renamed
*/
void renamedAttrNode(Attr oldAt, Attr newAt) {
- // REVISIT: To be implemented!!!
+ // REVISIT: To be implemented!!!
}
/**
* A method to be called when an element has been renamed
*/
void renamedElement(Element oldEl, Element newEl) {
- // REVISIT: To be implemented!!!
+ // REVISIT: To be implemented!!!
}
} // class DocumentImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/ElementNSImpl.java Wed May 02 13:32:36 2012 +0100
@@ -37,9 +37,9 @@
* The qualified name is the node name, and we store localName which is also
* used in all queries. On the other hand we recompute the prefix when
* necessary.
- *
+ *
* @xerces.internal
- *
+ *
* @author Elena litani, IBM
* @author Neeraj Bajaj, Sun Microsystems
* @version $Id: ElementNSImpl.java,v 1.7 2010-11-01 04:39:39 joehw Exp $
@@ -84,15 +84,15 @@
setName(namespaceURI, qualifiedName);
}
- private void setName(String namespaceURI, String qname) {
+ private void setName(String namespaceURI, String qname) {
- String prefix;
- // DOM Level 3: namespace URI is never empty string.
- this.namespaceURI = namespaceURI;
- if (namespaceURI != null) {
+ String prefix;
+ // DOM Level 3: namespace URI is never empty string.
+ this.namespaceURI = namespaceURI;
+ if (namespaceURI != null) {
//convert the empty string to 'null'
- this.namespaceURI = (namespaceURI.length() == 0) ? null : namespaceURI;
- }
+ this.namespaceURI = (namespaceURI.length() == 0) ? null : namespaceURI;
+ }
int colon1, colon2 ;
@@ -101,63 +101,63 @@
//2. or if the qualifiedName is null and the namespaceURI is different from null,
// We dont need to check for namespaceURI != null, if qualified name is null throw DOMException.
if(qname == null){
- String msg =
- DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "NAMESPACE_ERR",
- null);
- throw new DOMException(DOMException.NAMESPACE_ERR, msg);
+ String msg =
+ DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "NAMESPACE_ERR",
+ null);
+ throw new DOMException(DOMException.NAMESPACE_ERR, msg);
}
else{
- colon1 = qname.indexOf(':');
- colon2 = qname.lastIndexOf(':');
+ colon1 = qname.indexOf(':');
+ colon2 = qname.lastIndexOf(':');
}
- ownerDocument.checkNamespaceWF(qname, colon1, colon2);
- if (colon1 < 0) {
- // there is no prefix
- localName = qname;
- if (ownerDocument.errorChecking) {
- ownerDocument.checkQName(null, localName);
- if (qname.equals("xmlns")
- && (namespaceURI == null
- || !namespaceURI.equals(NamespaceContext.XMLNS_URI))
- || (namespaceURI!=null && namespaceURI.equals(NamespaceContext.XMLNS_URI)
- && !qname.equals("xmlns"))) {
- String msg =
- DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "NAMESPACE_ERR",
- null);
- throw new DOMException(DOMException.NAMESPACE_ERR, msg);
- }
- }
- }//there is a prefix
- else {
- prefix = qname.substring(0, colon1);
- localName = qname.substring(colon2 + 1);
-
- //NAMESPACE_ERR:
- //1. if the qualifiedName has a prefix and the namespaceURI is null,
-
- //2. or if the qualifiedName has a prefix that is "xml" and the namespaceURI
- //is different from " http://www.w3.org/XML/1998/namespace"
-
- if (ownerDocument.errorChecking) {
- if( namespaceURI == null || ( prefix.equals("xml") && !namespaceURI.equals(NamespaceContext.XML_URI) )){
- String msg =
- DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "NAMESPACE_ERR",
- null);
- throw new DOMException(DOMException.NAMESPACE_ERR, msg);
- }
-
- ownerDocument.checkQName(prefix, localName);
- ownerDocument.checkDOMNSErr(prefix, namespaceURI);
- }
- }
- }
+ ownerDocument.checkNamespaceWF(qname, colon1, colon2);
+ if (colon1 < 0) {
+ // there is no prefix
+ localName = qname;
+ if (ownerDocument.errorChecking) {
+ ownerDocument.checkQName(null, localName);
+ if (qname.equals("xmlns")
+ && (namespaceURI == null
+ || !namespaceURI.equals(NamespaceContext.XMLNS_URI))
+ || (namespaceURI!=null && namespaceURI.equals(NamespaceContext.XMLNS_URI)
+ && !qname.equals("xmlns"))) {
+ String msg =
+ DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "NAMESPACE_ERR",
+ null);
+ throw new DOMException(DOMException.NAMESPACE_ERR, msg);
+ }
+ }
+ }//there is a prefix
+ else {
+ prefix = qname.substring(0, colon1);
+ localName = qname.substring(colon2 + 1);
+
+ //NAMESPACE_ERR:
+ //1. if the qualifiedName has a prefix and the namespaceURI is null,
+
+ //2. or if the qualifiedName has a prefix that is "xml" and the namespaceURI
+ //is different from " http://www.w3.org/XML/1998/namespace"
+
+ if (ownerDocument.errorChecking) {
+ if( namespaceURI == null || ( prefix.equals("xml") && !namespaceURI.equals(NamespaceContext.XML_URI) )){
+ String msg =
+ DOMMessageFormatter.formatMessage(
+ DOMMessageFormatter.DOM_DOMAIN,
+ "NAMESPACE_ERR",
+ null);
+ throw new DOMException(DOMException.NAMESPACE_ERR, msg);
+ }
+
+ ownerDocument.checkQName(prefix, localName);
+ ownerDocument.checkDOMNSErr(prefix, namespaceURI);
+ }
+ }
+ }
// when local name is known
protected ElementNSImpl(CoreDocumentImpl ownerDocument,
@@ -185,7 +185,7 @@
if (needsSyncData()) {
synchronizeData();
}
- this.name = qualifiedName;
+ this.name = qualifiedName;
setName(namespaceURI, qualifiedName);
reconcileDefaultAttributes();
}
@@ -364,13 +364,13 @@
}
catch (com.sun.org.apache.xerces.internal.util.URI.MalformedURIException e) {
// This may be a relative URI.
-
+
// Start from the base URI of the parent, or if this node has no parent, the owner node.
NodeImpl parentOrOwner = (parentNode() != null) ? parentNode() : ownerNode;
-
+
// Make any parentURI into a URI object to use with the URI(URI, String) constructor.
String parentBaseURI = (parentOrOwner != null) ? parentOrOwner.getBaseURI() : null;
-
+
if (parentBaseURI != null) {
try {
uri = new URI(new URI(parentBaseURI), uri).toString();
@@ -380,7 +380,7 @@
return null;
}
return uri;
- }
+ }
// REVISIT: what should happen in this case?
return null;
}
@@ -451,18 +451,18 @@
* Introduced in DOM Level 2.
* Checks if a type is derived from another by restriction. See:
* http://www.w3.org/TR/DOM-Level-3-Core/core.html#TypeInfo-isDerivedFrom
- *
- * @param ancestorNS
+ *
+ * @param ancestorNS
* The namspace of the ancestor type declaration
* @param ancestorName
* The name of the ancestor type declaration
* @param type
* The reference type definition
- *
+ *
* @return boolean True if the type is derived by restriciton for the
* reference type
*/
- public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg,
+ public boolean isDerivedFrom(String typeNamespaceArg, String typeNameArg,
int derivationMethod) {
if(needsSyncData()) {
synchronizeData();
@@ -477,7 +477,7 @@
}
}
return false;
- }
+ }
/**
* NON-DOM: setting type used by the DOM parser
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java Wed May 02 13:32:36 2012 +0100
@@ -104,7 +104,7 @@
* item(getLength()-1).
*/
public int getLength() {
- return (nodes != null) ? nodes.size() : 0;
+ return (nodes != null) ? nodes.size() : 0;
}
/**
@@ -122,7 +122,7 @@
* is greater than or equal to getLength().
*/
public Node item(int index) {
- return (nodes != null && index < nodes.size()) ?
+ return (nodes != null && index < nodes.size()) ?
(Node)(nodes.get(index)) : null;
}
@@ -135,7 +135,7 @@
*/
public Node getNamedItem(String name) {
- int i = findNamePoint(name,0);
+ int i = findNamePoint(name,0);
return (i < 0) ? null : (Node)(nodes.get(i));
} // getNamedItem(String):Node
@@ -153,7 +153,7 @@
*/
public Node getNamedItemNS(String namespaceURI, String localName) {
- int i = findNamePoint(namespaceURI, localName);
+ int i = findNamePoint(namespaceURI, localName);
return (i < 0) ? null : (Node)(nodes.get(i));
} // getNamedItemNS(String,String):Node
@@ -266,14 +266,14 @@
public Node removeNamedItem(String name)
throws DOMException {
- if (isReadOnly()) {
+ if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
throw
new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
msg);
}
- int i = findNamePoint(name,0);
- if (i < 0) {
+ int i = findNamePoint(name,0);
+ if (i < 0) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null);
throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
}
@@ -302,14 +302,14 @@
public Node removeNamedItemNS(String namespaceURI, String name)
throws DOMException {
- if (isReadOnly()) {
+ if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null);
throw
new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
msg);
}
- int i = findNamePoint(namespaceURI, name);
- if (i < 0) {
+ int i = findNamePoint(namespaceURI, name);
+ if (i < 0) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NOT_FOUND_ERR", null);
throw new DOMException(DOMException.NOT_FOUND_ERR, msg);
}
@@ -331,9 +331,9 @@
*/
public NamedNodeMapImpl cloneMap(NodeImpl ownerNode) {
- NamedNodeMapImpl newmap = new NamedNodeMapImpl(ownerNode);
+ NamedNodeMapImpl newmap = new NamedNodeMapImpl(ownerNode);
newmap.cloneContent(this);
- return newmap;
+ return newmap;
}
protected void cloneContent(NamedNodeMapImpl srcmap) {
@@ -374,11 +374,11 @@
*/
void setReadOnly(boolean readOnly, boolean deep) {
isReadOnly(readOnly);
- if (deep && nodes != null) {
+ if (deep && nodes != null) {
for (int i = nodes.size() - 1; i >= 0; i--) {
((NodeImpl) nodes.get(i)).setReadOnly(readOnly,deep);
}
- }
+ }
} // setReadOnly(boolean,boolean)
/**
@@ -386,7 +386,7 @@
*
*/
boolean getReadOnly() {
- return isReadOnly();
+ return isReadOnly();
} // getReadOnly()
@@ -449,9 +449,9 @@
*/
protected int findNamePoint(String name, int start) {
- // Binary search
- int i = 0;
- if (nodes != null) {
+ // Binary search
+ int i = 0;
+ if (nodes != null) {
int first = start;
int last = nodes.size() - 1;
@@ -472,9 +472,9 @@
if (first > i) {
i = first;
}
- }
+ }
- return -1 - i; // not-found has to be encoded.
+ return -1 - i; // not-found has to be encoded.
} // findNamePoint(String):int
@@ -549,14 +549,14 @@
}
protected int addItem (Node arg) {
- int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName());
- if (i >= 0) {
+ int i = findNamePoint(arg.getNamespaceURI(), arg.getLocalName());
+ if (i >= 0) {
nodes.set(i, arg);
- }
+ }
else {
- // If we can't find by namespaceURI, localName, then we find by
- // nodeName so we know where to insert.
- i = findNamePoint(arg.getNodeName(),0);
+ // If we can't find by namespaceURI, localName, then we find by
+ // nodeName so we know where to insert.
+ i = findNamePoint(arg.getNodeName(),0);
if (i >= 0) {
nodes.add(i, arg);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NodeListCache.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NodeListCache.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/NodeListCache.java Wed May 02 13:32:36 2012 +0100
@@ -25,9 +25,9 @@
/**
* This class is used, via a pool managed on CoreDocumentImpl, in ParentNode to
* improve performance of the NodeList accessors, getLength() and item(i).
- *
+ *
* @xerces.internal
- *
+ *
* @author Arnaud Le Hors, IBM
*
* @version $Id: NodeListCache.java,v 1.6 2010/07/20 20:25:25 joehw Exp $
@@ -57,4 +57,3 @@
fOwner = owner;
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/dom/PSVIElementNSImpl.java Wed May 02 13:32:36 2012 +0100
@@ -30,46 +30,46 @@
/**
* Element namespace implementation; stores PSVI element items.
- *
+ *
* @xerces.internal
- *
+ *
* @author Sandy Gao, IBM
- *
+ *
* @version $Id: PSVIElementNSImpl.java,v 1.6 2010/08/20 18:51:54 joehw Exp $
*/
public class PSVIElementNSImpl extends ElementNSImpl implements ElementPSVI {
/** Serialization version. */
static final long serialVersionUID = 6815489624636016068L;
-
+
/**
* Construct an element node.
*/
- public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
+ public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
String qualifiedName, String localName) {
super(ownerDocument, namespaceURI, qualifiedName, localName);
}
-
+
/**
* Construct an element node.
*/
- public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
+ public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI,
String qualifiedName) {
super(ownerDocument, namespaceURI, qualifiedName);
}
-
+
/** element declaration */
protected XSElementDeclaration fDeclaration = null;
/** type of element, could be xsi:type */
protected XSTypeDefinition fTypeDecl = null;
- /** true if clause 3.2 of Element Locally Valid (Element) (3.3.4)
- * is satisfied, otherwise false
+ /** true if clause 3.2 of Element Locally Valid (Element) (3.3.4)
+ * is satisfied, otherwise false
*/
protected boolean fNil = false;
- /** false if the element value was provided by the schema; true otherwise.
+ /** false if the element value was provided by the schema; true otherwise.
*/
protected boolean fSpecified = true;
@@ -105,7 +105,7 @@
/** the schema information property */
protected XSModel fSchemaInformation = null;
-
+
//
// ElementPSVI methods
//
@@ -132,7 +132,7 @@
}
/**
- * [schema specified]
+ * [schema specified]
* @see XML Schema Part 1: Structures [schema specified]
* @return false value was specified in schema, true value comes from the infoset
*/
@@ -187,9 +187,9 @@
}
/**
- * [notation]
+ * [notation]
* @see 0
? new ArrayEnumeration(fgSAXFeatures) : fgEmptyEnumeration;
} // getSAXFeatures():Enumeration
-
+
/** Returns an enumeration of the SAX properties. */
public static Enumeration getSAXProperties() {
return fgSAXProperties.length > 0
? new ArrayEnumeration(fgSAXProperties) : fgEmptyEnumeration;
} // getSAXProperties():Enumeration
-
+
// xerces
-
+
/** Returns an enumeration of the Xerces features. */
public static Enumeration getXercesFeatures() {
return fgXercesFeatures.length > 0
? new ArrayEnumeration(fgXercesFeatures) : fgEmptyEnumeration;
} // getXercesFeatures():Enumeration
-
+
/** Returns an enumeration of the Xerces properties. */
public static Enumeration getXercesProperties() {
return fgXercesProperties.length > 0
? new ArrayEnumeration(fgXercesProperties) : fgEmptyEnumeration;
} // getXercesProperties():Enumeration
-
+
//
// Classes
//
-
+
/**
* An array enumeration.
*
@@ -662,30 +664,30 @@
*/
static class ArrayEnumeration
implements Enumeration {
-
+
//
// Data
//
-
+
/** Array. */
private Object[] array;
-
+
/** Index. */
private int index;
-
+
//
// Constructors
//
-
+
/** Constructs an array enumeration. */
public ArrayEnumeration(Object[] array) {
this.array = array;
} //
@@ -821,27 +821,27 @@
* Note: Called after scanning past '<!ELEMENT'
*/
protected final void scanElementDecl() throws IOException, XNIException {
-
+
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ELEMENTDECL",
null);
}
-
+
// element name
String name = fEntityScanner.scanName();
if (name == null) {
reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_ELEMENTDECL",
null);
}
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_CONTENTSPEC_IN_ELEMENTDECL",
new Object[]{name});
}
-
+
// content model
if (fDTDContentModelHandler != null) {
fDTDContentModelHandler.startContentModel(name, null);
@@ -874,7 +874,7 @@
fStringBuffer.append('(');
fMarkUpDepth++;
skipSeparator(false, !scanningInternalSubset());
-
+
// Mixed content model
if (fEntityScanner.skipString("#PCDATA")) {
scanMixed(name);
@@ -884,12 +884,12 @@
}
contentModel = fStringBuffer.toString();
}
-
+
// call handler
if (fDTDContentModelHandler != null) {
fDTDContentModelHandler.endContentModel(null);
}
-
+
fReportEntity = false;
skipSeparator(false, !scanningInternalSubset());
// end
@@ -898,14 +898,14 @@
}
fReportEntity = true;
fMarkUpDepth--;
-
+
// call handler
if (fDTDHandler != null) {
fDTDHandler.elementDecl(name, contentModel, null);
}
if (nonValidatingMode) nvGrammarInfo.elementDecl(name, contentModel, null);
} // scanElementDecl()
-
+
/**
* scan Mixed content model
* This assumes the content model has been parsed up to #PCDATA and
@@ -921,9 +921,9 @@
*/
private final void scanMixed(String elName)
throws IOException, XNIException {
-
+
String childName = null;
-
+
fStringBuffer.append("#PCDATA");
// call handler
if (fDTDContentModelHandler != null) {
@@ -938,7 +938,7 @@
null);
}
skipSeparator(false, !scanningInternalSubset());
-
+
childName = fEntityScanner.scanName();
if (childName == null) {
reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_MIXED_CONTENT",
@@ -982,7 +982,7 @@
fMarkUpDepth--;
// we are done
}
-
+
/**
* scan children content model
* This assumes it can simply append to fStringBuffer.
@@ -1000,7 +1000,7 @@
*/
private final void scanChildren(String elName)
throws IOException, XNIException {
-
+
fContentDepth = 0;
pushContentStack(0);
int currentOp = 0;
@@ -1128,7 +1128,7 @@
skipSeparator(false, !scanningInternalSubset());
}
}
-
+
/**
* Scans an attlist declaration
*
@@ -1140,26 +1140,26 @@
* Note: Called after scanning past '<!ATTLIST'
*/
protected final void scanAttlistDecl() throws IOException, XNIException {
-
+
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_ELEMENT_TYPE_IN_ATTLISTDECL",
null);
}
-
+
// element name
String elName = fEntityScanner.scanName();
if (elName == null) {
reportFatalError("MSG_ELEMENT_TYPE_REQUIRED_IN_ATTLISTDECL",
null);
}
-
+
// call handler
if (fDTDHandler != null) {
fDTDHandler.startAttlist(elName, null);
}
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
// no space, is it the end yet?
@@ -1177,7 +1177,7 @@
new Object[]{elName});
}
}
-
+
// definitions
while (!fEntityScanner.skipChar('>')) {
String name = fEntityScanner.scanName();
@@ -1192,13 +1192,13 @@
}
// type
String type = scanAttType(elName, name);
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_DEFAULTDECL_IN_ATTDEF",
new Object[]{elName, name});
}
-
+
// default decl
String defaultType = scanAttDefaultDecl(elName, name,
type,
@@ -1226,7 +1226,7 @@
if(nonValidatingMode){
nvGrammarInfo.attributeDecl(elName, name, type, enumr,
defaultType, null, null, null);
-
+
}
}
else {
@@ -1241,16 +1241,16 @@
}
skipSeparator(false, !scanningInternalSubset());
}
-
+
// call handler
if (fDTDHandler != null) {
fDTDHandler.endAttlist(null);
}
fMarkUpDepth--;
fReportEntity = true;
-
+
} // scanAttlistDecl()
-
+
/**
* Scans an attribute type definition
*
@@ -1276,7 +1276,7 @@
*/
private final String scanAttType(String elName, String atName)
throws IOException, XNIException {
-
+
String type = null;
fEnumerationCount = 0;
/*
@@ -1369,10 +1369,10 @@
fMarkUpDepth--;
}
return type;
-
+
} // scanAttType():String
-
-
+
+
/**
* Scans an attribute default declaration
*
@@ -1388,7 +1388,7 @@
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
throws IOException, XNIException {
-
+
String defaultType = null;
fString.clear();
defaultVal.clear();
@@ -1413,9 +1413,9 @@
fAttributes, 0, isVC);
}
return defaultType;
-
+
} // ScanAttDefaultDecl
-
+
/**
* Scans an entity declaration
*
@@ -1433,7 +1433,7 @@
* Note: Called after scanning past '<!ENTITY'
*/
private final void scanEntityDecl() throws IOException, XNIException {
-
+
boolean isPEDecl = false;
boolean sawPERef = false;
fReportEntity = false;
@@ -1499,28 +1499,28 @@
}
}
}
-
+
// name
String name = fEntityScanner.scanName();
if (name == null) {
reportFatalError("MSG_ENTITY_NAME_REQUIRED_IN_ENTITYDECL", null);
}
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_AFTER_ENTITY_NAME_IN_ENTITYDECL",
new Object[]{name});
}
-
+
// external id
scanExternalID(fStrings, false);
String systemId = fStrings[0];
String publicId = fStrings[1];
-
+
if (isPEDecl && systemId != null) {
fSeenExternalPE = true;
}
-
+
String notation = null;
// NDATA
boolean sawSpace = skipSeparator(true, !scanningInternalSubset());
@@ -1530,7 +1530,7 @@
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NDATA_IN_UNPARSED_ENTITYDECL",
new Object[]{name});
}
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_UNPARSED_ENTITYDECL",
@@ -1542,7 +1542,7 @@
new Object[]{name});
}
}
-
+
// internal entity
if (systemId == null) {
scanEntityValue(fLiteral, fLiteral2);
@@ -1553,16 +1553,16 @@
fStringBuffer.append(fLiteral.ch, fLiteral.offset, fLiteral.length);
fStringBuffer2.append(fLiteral2.ch, fLiteral2.offset, fLiteral2.length);
}
-
+
// skip possible trailing space
skipSeparator(false, !scanningInternalSubset());
-
+
// end
if (!fEntityScanner.skipChar('>')) {
reportFatalError("EntityDeclUnterminated", new Object[]{name});
}
fMarkUpDepth--;
-
+
// register entity and make callback
if (isPEDecl) {
name = "%" + name;
@@ -1579,7 +1579,7 @@
if (fDTDHandler != null) {
//Venu Revisit : why false has been removed in expandSYstem
fResourceIdentifier.setValues(publicId, systemId, baseSystemId, XMLEntityManager.expandSystemId(systemId, baseSystemId ));
-
+
if (notation != null) {
fDTDHandler.unparsedEntityDecl(name, fResourceIdentifier,
notation, null);
@@ -1596,9 +1596,9 @@
}
}
fReportEntity = true;
-
+
} // scanEntityDecl()
-
+
/**
* Scans an entity value.
*
@@ -1619,7 +1619,7 @@
}
// store at which depth of entities we start
int entityDepth = fEntityDepth;
-
+
XMLString literal = fString;
XMLString literal2 = fString;
if (fEntityScanner.scanLiteral(quote, fString) != quote) {
@@ -1715,7 +1715,7 @@
reportFatalError("CloseQuoteMissingInDecl", null);
}
} // scanEntityValue(XMLString,XMLString):void
-
+
/**
* Scans a notation declaration
*
@@ -1727,47 +1727,47 @@
* Note: Called after scanning past '<!NOTATION'
*/
private final void scanNotationDecl() throws IOException, XNIException {
-
+
// spaces
fReportEntity = false;
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_BEFORE_NOTATION_NAME_IN_NOTATIONDECL",
null);
}
-
+
// notation name
String name = fEntityScanner.scanName();
if (name == null) {
reportFatalError("MSG_NOTATION_NAME_REQUIRED_IN_NOTATIONDECL",
null);
}
-
+
// spaces
if (!skipSeparator(true, !scanningInternalSubset())) {
reportFatalError("MSG_SPACE_REQUIRED_AFTER_NOTATION_NAME_IN_NOTATIONDECL",
new Object[]{name});
}
-
+
// external id
scanExternalID(fStrings, true);
String systemId = fStrings[0];
String publicId = fStrings[1];
String baseSystemId = fEntityScanner.getBaseSystemId();
-
+
if (systemId == null && publicId == null) {
reportFatalError("ExternalIDorPublicIDRequired",
new Object[]{name});
}
-
+
// skip possible trailing space
skipSeparator(false, !scanningInternalSubset());
-
+
// end
if (!fEntityScanner.skipChar('>')) {
reportFatalError("NotationDeclUnterminated", new Object[]{name});
}
fMarkUpDepth--;
-
+
fResourceIdentifier.setValues(publicId, systemId, baseSystemId, XMLEntityManager.expandSystemId(systemId, baseSystemId ));
if (nonValidatingMode) nvGrammarInfo.notationDecl(name, fResourceIdentifier, null);
// call handler
@@ -1777,9 +1777,9 @@
fDTDHandler.notationDecl(name, fResourceIdentifier, null);
}
fReportEntity = true;
-
+
} // scanNotationDecl()
-
+
/**
* Scans a conditional section. If it's a section to ignore the whole
* section gets scanned through and this method only returns after the
@@ -1798,10 +1798,10 @@
* Note: Called after scanning past '<![' */
private final void scanConditionalSect(int currPEDepth)
throws IOException, XNIException {
-
+
fReportEntity = false;
skipSeparator(false, !scanningInternalSubset());
-
+
if (fEntityScanner.skipString("INCLUDE")) {
skipSeparator(false, !scanningInternalSubset());
if(currPEDepth != fPEDepth && fValidation) {
@@ -1814,7 +1814,7 @@
if (!fEntityScanner.skipChar('[')) {
reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
}
-
+
if (fDTDHandler != null) {
fDTDHandler.startConditional(XMLDTDHandler.CONDITIONAL_INCLUDE,
null);
@@ -1915,9 +1915,9 @@
else {
reportFatalError("MSG_MARKUP_NOT_RECOGNIZED_IN_DTD", null);
}
-
+
} // scanConditionalSect()
-
+
/**
* Dispatch an XML "event".
*
@@ -1932,7 +1932,7 @@
*/
protected final boolean scanDecls(boolean complete)
throws IOException, XNIException {
-
+
skipSeparator(false, true);
boolean again = true;
//System.out.println("scanDecls"+fScannerState);
@@ -2010,7 +2010,7 @@
}
return fScannerState != SCANNER_STATE_END_OF_INPUT;
}
-
+
/**
* Skip separator. This is typically just whitespace but it can also be one
* or more parameter entity references.
@@ -2049,8 +2049,8 @@
return true;
}
}
-
-
+
+
/*
* Element Children Content Stack
*/
@@ -2062,12 +2062,12 @@
}
fContentStack[fContentDepth++] = c;
}
-
+
private final int popContentStack() {
return fContentStack[--fContentDepth];
}
-
-
+
+
/*
* Parameter Entity Stack
*/
@@ -2080,23 +2080,23 @@
boolean[] newBooleanStack = new boolean[fPEDepth * 2];
System.arraycopy(fPEReport, 0, newBooleanStack, 0, fPEDepth);
fPEReport = newBooleanStack;
-
+
}
fPEReport[fPEDepth] = report;
fPEStack[fPEDepth++] = depth;
}
-
+
/** pop the stack */
private final int popPEStack() {
return fPEStack[--fPEDepth];
}
-
+
/** look at the top of the stack */
private final boolean peekReportEntity() {
return fPEReport[fPEDepth-1];
}
-
-
+
+
/*
* Utility method
*/
@@ -2107,7 +2107,7 @@
fEnumeration = newEnum;
}
}
-
+
// private methods
private void init() {
// reset state related data
@@ -2116,18 +2116,18 @@
fIncludeSectDepth = 0;
fMarkUpDepth = 0;
fPEDepth = 0;
-
+
fStandalone = false;
fSeenExternalDTD = false;
fSeenExternalPE = false;
-
+
// set starting state
setScannerState(SCANNER_STATE_TEXT_DECL);
//new SymbolTable());
}
-
+
public DTDGrammar getGrammar(){
return nvGrammarInfo;
}
-
+
} // class XMLDTDScannerImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentFragmentScannerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -78,98 +78,98 @@
public class XMLDocumentFragmentScannerImpl
extends XMLScanner
implements XMLDocumentScanner, XMLComponent, XMLEntityHandler, XMLBufferListener {
-
+
//
// Constants
//
-
+
protected int fElementAttributeLimit;
-
+
/** External subset resolver. **/
protected ExternalSubsetResolver fExternalSubsetResolver;
-
+
// scanner states
-
+
//XXX this should be divided into more states.
/** Scanner state: start of markup. */
protected static final int SCANNER_STATE_START_OF_MARKUP = 21;
-
+
/** Scanner state: content. */
protected static final int SCANNER_STATE_CONTENT = 22;
-
+
/** Scanner state: processing instruction. */
protected static final int SCANNER_STATE_PI = 23;
-
+
/** Scanner state: DOCTYPE. */
protected static final int SCANNER_STATE_DOCTYPE = 24;
-
+
/** Scanner state: XML Declaration */
protected static final int SCANNER_STATE_XML_DECL = 25;
-
+
/** Scanner state: root element. */
protected static final int SCANNER_STATE_ROOT_ELEMENT = 26;
-
+
/** Scanner state: comment. */
protected static final int SCANNER_STATE_COMMENT = 27;
-
+
/** Scanner state: reference. */
protected static final int SCANNER_STATE_REFERENCE = 28;
-
+
//
@@ -908,11 +908,11 @@
*/
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl)
throws IOException, XNIException {
-
+
// scan decl
super.scanXMLDeclOrTextDecl(scanningTextDecl, fStrings);
fMarkupDepth--;
-
+
// pseudo-attribute values
String version = fStrings[0];
String encoding = fStrings[1];
@@ -924,8 +924,8 @@
///xxx see where its used.. this is not used anywhere. it may be useful for entity to store this information
//but this information is only related with Document Entity.
fEntityManager.setStandalone(fStandalone);
-
-
+
+
// call handler
if (fDocumentHandler != null) {
if (scanningTextDecl) {
@@ -934,7 +934,7 @@
fDocumentHandler.xmlDecl(version, encoding, standalone, null);
}
}
-
+
if(version != null){
fEntityScanner.setVersion(version);
fEntityScanner.setXMLVersion(version);
@@ -943,17 +943,17 @@
if (encoding != null && !fEntityScanner.getCurrentEntity().isEncodingExternallySpecified()) {
fEntityScanner.setEncoding(encoding);
}
-
+
} // scanXMLDeclOrTextDecl(boolean)
-
+
public String getPITarget(){
return fPITarget ;
}
-
+
public XMLStringBuffer getPIData(){
return fContentBuffer ;
}
-
+
//XXX: why not this function behave as per the state of the parser?
public XMLString getCharacterData(){
if(fUsebuffer){
@@ -961,10 +961,10 @@
}else{
return fTempString;
}
-
+
}
-
-
+
+
/**
* Scans a processing data. This is needed to handle the situation
* where a document starts with a processing instruction whose
@@ -975,16 +975,16 @@
*/
protected void scanPIData(String target, XMLStringBuffer data)
throws IOException, XNIException {
-
+
super.scanPIData(target, data);
-
+
//set the PI target and values
fPITarget = target ;
-
+
fMarkupDepth--;
-
+
} // scanPIData(String)
-
+
/**
* Scans a comment.
*
@@ -1000,20 +1000,20 @@
//getTextCharacters can also be called for reading comments
fUsebuffer = true;
fMarkupDepth--;
-
+
} // scanComment()
-
+
//xxx value returned by this function may not remain valid if another event is scanned.
public String getComment(){
return fContentBuffer.toString();
}
-
+
void addElement(String rawname){
if(fElementPointer < ELEMENT_ARRAY_LENGTH){
//storing element raw name in a linear list of array
fElementArray[fElementPointer] = rawname ;
//storing elemnetPointer for particular element depth
-
+
if(DEBUG_SKIP_ALGORITHM){
StringBuffer sb = new StringBuffer() ;
sb.append(" Storing element information ") ;
@@ -1022,7 +1022,7 @@
sb.append(" fElementStack.fDepth = " + fElementStack.fDepth);
System.out.println(sb.toString()) ;
}
-
+
//store pointer information only when element depth is less MAX_DEPTH_LIMIT
if(fElementStack.fDepth < MAX_DEPTH_LIMIT){
short column = storePointerForADepth(fElementPointer);
@@ -1045,20 +1045,20 @@
fElementPointer++ ;
}
}
-
-
+
+
void resetPointer(short depth, short column){
fPointerInfo[depth] [column] = (short)0;
}
-
+
//returns column information at which pointer was stored.
short storePointerForADepth(short elementPointer){
short depth = (short) fElementStack.fDepth ;
-
+
//Stores element pointer locations at particular depth , only 4 pointer locations
//are stored at particular depth for now.
for(short i = 0 ; i < MAX_POINTER_AT_A_DEPTH ; i++){
-
+
if(canStore(depth, i)){
fPointerInfo[depth][i] = elementPointer ;
if(DEBUG_SKIP_ALGORITHM){
@@ -1076,22 +1076,22 @@
}
return -1 ;
}
-
+
boolean canStore(short depth, short column){
//colum = 0 , means first element at particular depth
//column = 1, means second element at particular depth
// calle should make sure that it doesn't call for value outside allowed co-ordinates
return fPointerInfo[depth][column] == 0 ? true : false ;
}
-
-
+
+
short getElementPointer(short depth, short column){
//colum = 0 , means first element at particular depth
//column = 1, means second element at particular depth
// calle should make sure that it doesn't call for value outside allowed co-ordinates
return fPointerInfo[depth][column] ;
}
-
+
//this function assumes that string passed is not null and skips
//the following string from the buffer this makes sure
boolean skipFromTheBuffer(String rawname) throws IOException{
@@ -1108,9 +1108,9 @@
} else
return false ;
}
-
+
boolean skipQElement(String rawname) throws IOException{
-
+
final int c = fEntityScanner.getChar(rawname.length());
//if this character is still valid element name -- this means string can't match
if(XMLChar.isName(c)){
@@ -1119,11 +1119,11 @@
return fEntityScanner.skipString(rawname);
}
}
-
+
protected boolean skipElement() throws IOException {
-
+
if(!fShouldSkip) return false ;
-
+
if(fLastPointerLocation != 0){
//Look at the next element stored in the array list.. we might just get a match.
String rawname = fElementArray[fLastPointerLocation + 1] ;
@@ -1136,7 +1136,7 @@
} else{
//reset it back to zero... we haven't got the correct subset yet.
fLastPointerLocation = 0 ;
-
+
}
}
//xxx: we can put some logic here as from what column it should start looking
@@ -1144,23 +1144,23 @@
//fallback to tolerant algorithm, it would look for differnt element stored at different
//depth and get us the pointer location.
return fShouldSkip && skipElement((short)0);
-
+
}
-
+
//start of the column at which it should try searching
boolean skipElement(short column) throws IOException {
short depth = (short)fElementStack.fDepth ;
-
+
if(depth > MAX_DEPTH_LIMIT){
return fShouldSkip = false ;
}
for(short i = column ; i < MAX_POINTER_AT_A_DEPTH ; i++){
short pointer = getElementPointer(depth , i ) ;
-
+
if(pointer == 0){
return fShouldSkip = false ;
}
-
+
if(fElementArray[pointer] != null && skipFromTheBuffer(fElementArray[pointer])){
if(DEBUG_SKIP_ALGORITHM){
System.out.println();
@@ -1173,7 +1173,7 @@
}
return fShouldSkip = false ;
}
-
+
/**
* Scans a start element. This method will handle the binding of
* namespace information and notifying the handler of the start
@@ -1200,22 +1200,22 @@
// fAttributes will have the details of all the attributes.
protected boolean scanStartElement()
throws IOException, XNIException {
-
+
if (DEBUG_START_END_ELEMENT) System.out.println( this.getClass().toString() + ">>> scanStartElement()");
//when skipping is true and no more elements should be added
if(fSkip && !fAdd){
//get the stored element -- if everything goes right this should match the
//token in the buffer
-
+
QName name = fElementStack.getNext();
-
+
if(DEBUG_SKIP_ALGORITHM){
System.out.println("Trying to skip String = " + name.rawname);
}
-
+
//Be conservative -- if skipping fails -- stop.
fSkip = fEntityScanner.skipString(name.rawname);
-
+
if(fSkip){
if(DEBUG_SKIP_ALGORITHM){
System.out.println("Element SUCESSFULLY skipped = " + name.rawname);
@@ -1230,7 +1230,7 @@
}
}
}
-
+
//we are still at the stage of adding elements
//the elements were not matched or
//fSkip is not set to true
@@ -1244,32 +1244,32 @@
String name = fEntityScanner.scanName();
fElementQName.setValues(null, name, name, null);
}
-
+
if(DEBUG)System.out.println("Element scanned in start element is " + fElementQName.toString());
if(DEBUG_SKIP_ALGORITHM){
if(fAdd){
System.out.println("Elements are being ADDED -- elemet added is = " + fElementQName.rawname + " at count = " + fElementStack.fCount);
}
}
-
+
}
-
+
//when the elements are being added , we need to check if we are set for skipping the elements
if(fAdd){
//this sets the value of fAdd variable
fElementStack.matchElement(fElementQName);
}
-
-
+
+
//xxx: We dont need another pointer, fCurrentElement, we can use fElementQName
fCurrentElement = fElementQName;
-
+
String rawname = fElementQName.rawname;
-
+
fEmptyElement = false;
-
+
fAttributes.removeAllAttributes();
-
+
if(!seekCloseOfStartTag()){
fReadingAttributes = true;
fAttributeCacheUsedCount =0;
@@ -1277,21 +1277,21 @@
fAddDefaultAttr = true;
do {
scanAttribute(fAttributes);
- if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){
+ if (fSecurityManager != null && fAttributes.getLength() > fElementAttributeLimit){
fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN,
"ElementAttributeLimit",
new Object[]{rawname, new Integer(fAttributes.getLength()) },
XMLErrorReporter.SEVERITY_FATAL_ERROR );
}
-
+
} while (!seekCloseOfStartTag());
fReadingAttributes=false;
}
-
+
if (fEmptyElement) {
//decrease the markup depth..
fMarkupDepth--;
-
+
// check that this element was opened in the same entity
if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) {
reportFatalError("ElementEntityMismatch",
@@ -1301,32 +1301,32 @@
if (fDocumentHandler != null) {
fDocumentHandler.emptyElement(fElementQName, fAttributes, null);
}
-
+
//We should not be popping out the context here in endELement becaause the namespace context is still
- //valid when parser is at the endElement state.
+ //valid when parser is at the endElement state.
//if (fNamespaces) {
// fNamespaceContext.popContext();
//}
-
+
//pop the element off the stack..
fElementStack.popElement();
-
+
} else {
-
+
if(dtdGrammarUtil != null)
- dtdGrammarUtil.startElement(fElementQName, fAttributes);
+ dtdGrammarUtil.startElement(fElementQName, fAttributes);
if(fDocumentHandler != null){
//complete element and attributes are traversed in this function so we can send a callback
//here.
- //we shouldn't be sending callback in scanDocument()
+ //we shouldn't be sending callback in scanDocument()
fDocumentHandler.startElement(fElementQName, fAttributes, null);
}
}
-
-
+
+
if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() + "<<< scanStartElement(): "+fEmptyElement);
return fEmptyElement;
-
+
} // scanStartElement():boolean
/**
@@ -1336,7 +1336,7 @@
protected boolean seekCloseOfStartTag() throws IOException, XNIException {
// spaces
boolean sawSpace = fEntityScanner.skipSpaces();
-
+
// end tag?
final int c = fEntityScanner.peekChar();
if (c == '>') {
@@ -1353,15 +1353,15 @@
} else if (!isValidNameStartChar(c) || !sawSpace) {
reportFatalError("ElementUnterminated", new Object[]{fElementQName.rawname});
}
-
+
return false;
}
-
+
public boolean hasAttributes(){
return fAttributes.getLength() > 0 ? true : false ;
}
-
-
+
+
/**
* Scans an attribute.
*
@@ -1379,7 +1379,7 @@
*
* @param attributes The attributes list for the scanned attribute.
*/
-
+
/**
* protected void scanAttribute(AttributeIteratorImpl attributes)
* throws IOException, XNIException {
@@ -1417,25 +1417,25 @@
* fAttributeQName.rawname});
* }
*/
-
+
/*
//REVISIT: one more case needs to be included: external PE and standalone is no
boolean isVC = fHasExternalDTD && !fStandalone;
scanAttributeValue(fTempString, fTempString2,
fAttributeQName.rawname, attributes,
oldLen, isVC);
-
+
//attributes.setValue(oldLen, fTempString.toString());
//attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
//attributes.setSpecified(oldLen, true);
-
+
AttributeImpl attribute = new AttributeImpl(fAttributeQName.prefix,fAttributeQName.localpart,fAttributeQName.uri,fTempString.toString(),fTempString2.toString(),XMLSymbols.fCDATASymbol,true);
fAttributes.addAttribute(attribute);
if (DEBUG_START_END_ELEMENT) System.out.println("<<< scanAttribute()");
} // scanAttribute(XMLAttributes)
-
+
*/
-
+
/** return the attribute iterator implementation */
public XMLAttributesIteratorImpl getAttributeIterator(){
if(dtdGrammarUtil != null && fAddDefaultAttr){
@@ -1444,7 +1444,7 @@
}
return fAttributes;
}
-
+
/** return if standalone is set */
public boolean standaloneSet(){
return fStandaloneSet;
@@ -1470,11 +1470,11 @@
*
* @param attributes The attributes list for the scanned attribute.
*/
-
+
protected void scanAttribute(XMLAttributes attributes)
throws IOException, XNIException {
if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() +">>> scanAttribute()");
-
+
// name
if (fNamespaces) {
fEntityScanner.scanQName(fAttributeQName);
@@ -1482,7 +1482,7 @@
String name = fEntityScanner.scanName();
fAttributeQName.setValues(null, name, name, null);
}
-
+
// equals
fEntityScanner.skipSpaces();
if (!fEntityScanner.skipChar('=')) {
@@ -1490,19 +1490,19 @@
new Object[] {fCurrentElement.rawname, fAttributeQName.rawname});
}
fEntityScanner.skipSpaces();
-
+
int attIndex = 0 ;
//REVISIT: one more case needs to be included: external PE and standalone is no
boolean isVC = fHasExternalDTD && !fStandalone;
//fTempString would store attribute value
///fTempString2 would store attribute non-normalized value
-
+
//this function doesn't use 'attIndex'. We are adding the attribute later
//after we have figured out that current attribute is not namespace declaration
//since scanAttributeValue doesn't use attIndex parameter therefore we
//can safely add the attribute later..
XMLString tmpStr = getString();
-
+
scanAttributeValue(tmpStr, fTempString2,
fAttributeQName.rawname, attributes,
attIndex, isVC);
@@ -1511,7 +1511,7 @@
int oldLen = attributes.getLength();
//if the attribute name already exists.. new value is replaced with old value
attIndex = attributes.addAttribute(fAttributeQName, XMLSymbols.fCDATASymbol, null);
-
+
// WFC: Unique Att Spec
//attributes count will be same if the current attribute name already exists for this element name.
//this means there are two duplicate attributes.
@@ -1520,7 +1520,7 @@
new Object[]{fCurrentElement.rawname,
fAttributeQName.rawname});
}
-
+
//tmpString contains attribute value
//we are passing null as the attribute value
attributes.setValue(attIndex, null, tmpStr);
@@ -1528,11 +1528,11 @@
///xxx: nonNormalizedValue is not being set as it is not required by SAX & DOM
//attributes.setNonNormalizedValue(oldLen, fTempString2.toString());
attributes.setSpecified(attIndex, true);
-
+
if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() +"<<< scanAttribute()");
-
+
} // scanAttribute(XMLAttributes)
-
+
/**
* Scans element content.
*
@@ -1584,10 +1584,10 @@
//fDocumentHandler.characters(content, null);
}
return c;
-
+
} // scanContent():int
-
-
+
+
/**
* Scans a CDATA section.
*
@@ -1602,12 +1602,12 @@
//CHANGED:
protected boolean scanCDATASection(XMLStringBuffer contentBuffer, boolean complete)
throws IOException, XNIException {
-
+
// call handler
if (fDocumentHandler != null) {
//fDocumentHandler.startCDATA(null);
}
-
+
while (true) {
//scanData will fill the contentBuffer
if (!fEntityScanner.scanData("]]>", contentBuffer)) {
@@ -1658,20 +1658,20 @@
}
}
fMarkupDepth--;
-
+
if (fDocumentHandler != null && contentBuffer.length > 0) {
//fDocumentHandler.characters(contentBuffer, null);
}
-
+
// call handler
if (fDocumentHandler != null) {
//fDocumentHandler.endCDATA(null);
}
-
+
return true;
-
+
} // scanCDATASection(XMLStringBuffer, boolean):boolean
-
+
/**
* Scans an end element.
*
@@ -1688,26 +1688,26 @@
*/
protected int scanEndElement() throws IOException, XNIException {
if (DEBUG_START_END_ELEMENT) System.out.println(this.getClass().toString() +">>> scanEndElement()");
-
+
// pop context
QName endElementName = fElementStack.popElement();
-
+
String rawname = endElementName.rawname;
if(DEBUG)System.out.println("endElementName = " + endElementName.toString());
// Take advantage of the fact that next string _should_ be "fElementQName.rawName",
//In scanners most of the time is consumed on checks done for XML characters, we can
// optimize on it and avoid the checks done for endElement,
//we will also avoid symbol table lookup - neeraj.bajaj@sun.com
-
+
// this should work both for namespace processing true or false...
-
+
//REVISIT: if the string is not the same as expected.. we need to do better error handling..
//We can skip this for now... In any case if the string doesn't match -- document is not well formed.
-
+
if (!fEntityScanner.skipString(endElementName.rawname)) {
reportFatalError("ETagRequired", new Object[]{rawname});
}
-
+
// end
fEntityScanner.skipSpaces();
if (!fEntityScanner.skipChar('>')) {
@@ -1715,38 +1715,38 @@
new Object[]{rawname});
}
fMarkupDepth--;
-
+
//we have increased the depth for two markup "<" characters
fMarkupDepth--;
-
+
// check that this element was opened in the same entity
if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) {
reportFatalError("ElementEntityMismatch",
new Object[]{rawname});
}
-
+
//We should not be popping out the context here in endELement becaause the namespace context is still
//valid when parser is at the endElement state.
-
+
//if (fNamespaces) {
// fNamespaceContext.popContext();
//}
-
+
// call handler
- if (fDocumentHandler != null ) {
+ if (fDocumentHandler != null ) {
//end element is scanned in this function so we can send a callback
//here.
- //we shouldn't be sending callback in scanDocument()
-
+ //we shouldn't be sending callback in scanDocument()
+
fDocumentHandler.endElement(endElementName, null);
}
if(dtdGrammarUtil != null)
dtdGrammarUtil.endElement(endElementName);
-
+
return fMarkupDepth;
-
+
} // scanEndElement():int
-
+
/**
* Scans a character reference.
*
@@ -1756,20 +1756,20 @@
*/
protected void scanCharReference()
throws IOException, XNIException {
-
+
fStringBuffer2.clear();
int ch = scanCharReferenceValue(fStringBuffer2, null);
fMarkupDepth--;
if (ch != -1) {
// call handler
-
+
if (fDocumentHandler != null) {
if (fNotifyCharRefs) {
fDocumentHandler.startGeneralEntity(fCharRefLiteral, null, null, null);
}
Augmentations augs = null;
if (fValidation && ch <= 0x20) {
- if (fTempAugmentations != null) {
+ if (fTempAugmentations != null) {
fTempAugmentations.removeAllItems();
}
else {
@@ -1786,10 +1786,10 @@
}
}
}
-
+
} // scanCharReference()
-
-
+
+
/**
* Scans an entity reference.
*
@@ -1812,7 +1812,7 @@
}
fMarkupDepth--;
fCurrentEntityName = name;
-
+
// handle built-in entities
if (name == fAmpSymbol) {
handleCharacter('&', fAmpSymbol, content);
@@ -1835,7 +1835,7 @@
fScannerState = SCANNER_STATE_BUILT_IN_REFS;
return ;
}
-
+
//1. if the entity is external and support to external entities is not required
// 2. or entities should not be replaced
//3. or if it is built in entity reference.
@@ -1867,9 +1867,9 @@
//setScannerState(SCANNER_STATE_CONTENT);
//return true ;
} // scanEntityReference()
-
+
// utility methods
-
+
/**
* Calls document handler with a single character resulting from
* built-in entity resolution.
@@ -1893,22 +1893,22 @@
}
fTempString.setValues(fSingleChar, 0, 1);
//fDocumentHandler.characters(fTempString, null);
-
+
if (fNotifyBuiltInRefs) {
fDocumentHandler.endGeneralEntity(entity, null);
}
}
} // handleCharacter(char)
-
+
// helper methods
-
+
/**
* Sets the scanner state.
*
* @param state The new scanner state.
*/
protected final void setScannerState(int state) {
-
+
fScannerState = state;
if (DEBUG_SCANNER_STATE) {
System.out.print("### setScannerState: ");
@@ -1916,10 +1916,10 @@
System.out.print(getScannerStateName(state));
System.out.println();
}
-
+
} // setScannerState(int)
-
-
+
+
/**
* Sets the Driver.
*
@@ -1933,14 +1933,14 @@
System.out.println();
}
}
-
+
//
// Private methods
//
-
+
/** Returns the scanner state name. */
protected String getScannerStateName(int state) {
-
+
switch (state) {
case SCANNER_STATE_DOCTYPE: return "SCANNER_STATE_DOCTYPE";
case SCANNER_STATE_ROOT_ELEMENT: return "SCANNER_STATE_ROOT_ELEMENT";
@@ -1959,18 +1959,18 @@
case SCANNER_STATE_END_ELEMENT_TAG: return "SCANNER_STATE_END_ELEMENT_TAG";
case SCANNER_STATE_CHARACTER_DATA: return "SCANNER_STATE_CHARACTER_DATA" ;
}
-
+
return "??? ("+state+')';
-
+
} // getScannerStateName(int):String
public String getEntityName(){
//return the cached name
return fCurrentEntityName;
}
-
+
/** Returns the driver name. */
public String getDriverName(Driver driver) {
-
+
if (DEBUG_DISPATCHER) {
if (driver != null) {
String name = driver.getClass().getName();
@@ -1986,35 +1986,35 @@
}
}
return "null";
-
+
} // getDriverName():String
-
+
//
// Classes
//
-
+
/**
* @author Neeraj Bajaj, Sun Microsystems.
*/
protected static final class Element {
-
+
//
// Data
//
-
+
/** Symbol. */
public QName qname;
-
+
//raw name stored as characters
public char[] fRawname;
-
+
/** The next Element entry. */
public Element next;
-
+
//
// Constructors
//
-
+
/**
* Constructs a new Element from the given QName and next Element
* reference.
@@ -2024,23 +2024,23 @@
this.fRawname = qname.rawname.toCharArray();
this.next = next;
}
-
+
} // class Element
-
+
/**
* Element stack.
*
* @author Neeraj Bajaj, Sun Microsystems.
*/
protected class ElementStack2 {
-
+
//
// Data
//
-
+
/** The stack data. */
protected QName [] fQName = new QName[20];
-
+
//Element depth
protected int fDepth;
//total number of elements
@@ -2049,13 +2049,13 @@
protected int fPosition;
//Mark refers to the position
protected int fMark;
-
+
protected int fLastDepth ;
-
+
//
// Constructors
//
-
+
/** Default constructor. */
public ElementStack2() {
for (int i = 0; i < fQName.length; i++) {
@@ -2063,7 +2063,7 @@
}
fMark = fPosition = 1;
} //
@@ -2257,8 +2257,8 @@
fElements[fDepth].setValues(element);
return fElements[fDepth++];
} // pushElement(QName):QName
-
-
+
+
/** Note that this function is considerably different than nextElement()
* This function just returns the previously stored elements
*/
@@ -2276,17 +2276,17 @@
//return fElements[fPosition++];
return fElements[fPosition];
}
-
+
/** This function should be called only when element was skipped sucessfully.
* 1. Increase the depth - because element was sucessfully skipped.
*2. Store the position of the element token in array "last opened tag" at depth.
*3. increase the position counter so as to point to the next element in the array
*/
public void push(){
-
+
fInt[++fDepth] = fPosition++;
}
-
+
/** Check if the element scanned during the start element
*matches the stored element.
*
@@ -2344,7 +2344,7 @@
//sicne fInt[fDepth] contains pointer to the element array which are 0 based.
fInt[fDepth] = fCount - 1;
}
-
+
//if number of elements becomes equal to the length of array -- stop the skipping
//xxx: should we do "fCount == fInt.length"
if (fCount == fElements.length) {
@@ -2371,8 +2371,8 @@
fLastDepth = fDepth;
return match;
} // matchElement(QName):QName
-
-
+
+
/**
* Returns the next element on the stack.
*
@@ -2392,12 +2392,12 @@
fElements[i] = new QName();
}
}
-
+
return fElements[fDepth++];
-
+
} // pushElement(QName):QName
-
-
+
+
/**
* Pops an element off of the stack by setting the values of
* the specified QName.
@@ -2424,7 +2424,7 @@
}
//element.setValues(fElements[--fDepth]);
} // popElement(QName)
-
+
/** Reposition the stack. fInt [] contains all the opened tags at particular depth.
* Transfer all the opened tags starting from depth '2' to the current depth and reposition them
*as per the depth.
@@ -2439,16 +2439,16 @@
}
}
}
-
+
/** Clears the stack without throwing away existing QName objects. */
public void clear() {
fDepth = 0;
fLastDepth = 0;
fCount = 0 ;
fPosition = fMark = 1;
-
+
} // clear()
-
+
/**
* This function is as a result of optimization done for endElement --
* we dont need to set the value for every end element encouterd.
@@ -2456,12 +2456,12 @@
* the values will be set only if application need to know about the endElement
* -- neeraj.bajaj@sun.com
*/
-
+
public QName getLastPoppedElement(){
return fElements[fDepth];
}
} // class ElementStack
-
+
/**
* Drives the parser to the next state/event on the input. Parser is guaranteed
* to stop at the next state/event.
@@ -2477,8 +2477,8 @@
* @author Neeraj Bajaj, Sun Microsystems
*/
protected interface Driver {
-
-
+
+
/**
* Drives the parser to the next state/event on the input. Parser is guaranteed
* to stop at the next state/event.
@@ -2495,11 +2495,11 @@
* @throws IOException Thrown on i/o error.
* @throws XNIException Thrown on parse error.
*/
-
+
public int next() throws IOException, XNIException;
-
+
} // interface Driver
-
+
/**
* Driver to handle content scanning. This driver is capable of reading
* the fragment of XML document. When it has finished reading fragment
@@ -2517,20 +2517,20 @@
*/
protected class FragmentContentDriver
implements Driver {
-
+
//
// Driver methods
//
private boolean fContinueDispatching = true;
private boolean fScanningForMarkup = true;
-
+
/**
* decides the appropriate state of the parser
*/
private void startOfMarkup() throws IOException {
fMarkupDepth++;
final int ch = fEntityScanner.peekChar();
-
+
switch(ch){
case '?' :{
setScannerState(SCANNER_STATE_PI);
@@ -2567,9 +2567,9 @@
}
}
}
-
+
}//startOfMarkup
-
+
private void startOfContent() throws IOException {
if (fEntityScanner.skipChar('<')) {
setScannerState(SCANNER_STATE_START_OF_MARKUP);
@@ -2580,8 +2580,8 @@
setScannerState(SCANNER_STATE_CHARACTER_DATA);
}
}//startOfContent
-
-
+
+
/**
*
* SCANNER_STATE_CONTENT and SCANNER_STATE_START_OF_MARKUP are two super states of the parser.
@@ -2597,14 +2597,14 @@
*/
public void decideSubState() throws IOException {
while( fScannerState == SCANNER_STATE_CONTENT || fScannerState == SCANNER_STATE_START_OF_MARKUP){
-
+
switch (fScannerState) {
-
+
case SCANNER_STATE_CONTENT: {
startOfContent() ;
break;
}
-
+
case SCANNER_STATE_START_OF_MARKUP: {
startOfMarkup() ;
break;
@@ -2612,7 +2612,7 @@
}
}
}//decideSubState
-
+
/**
* Drives the parser to the next state/event on the input. Parser is guaranteed
* to stop at the next state/event. Internally XML document
@@ -2630,7 +2630,7 @@
* @throws IOException Thrown on i/o error.
* @throws XNIException Thrown on parse error.
*/
-
+
public int next() throws IOException, XNIException {
while (true) {
try {
@@ -3087,17 +3087,17 @@
}
} //while loop
}//next
-
-
+
+
//
// Protected methods
//
-
+
// hooks
-
+
// NOTE: These hook methods are added so that the full document
// scanner can share the majority of code with this class.
-
+
/**
* Scan for DOCTYPE hook. This method is a hook for subclasses
* to add code to handle scanning for a the "DOCTYPE" string
@@ -3110,7 +3110,7 @@
throws IOException, XNIException {
return false;
} // scanForDoctypeHook():boolean
-
+
/**
* Element depth iz zero. This methos is a hook for subclasses
* to add code to handle when the element depth hits zero. When
@@ -3128,7 +3128,7 @@
throws IOException, XNIException {
return false;
} // elementDepthIsZeroHook():boolean
-
+
/**
* Scan for root element hook. This method is a hook for
* subclasses to add code that handles scanning for the root
@@ -3145,7 +3145,7 @@
throws IOException, XNIException {
return false;
} // scanRootElementHook():boolean
-
+
/**
* End of file hook. This method is a hook for subclasses to
* add code that handles the end of file. The end of file in
@@ -3155,24 +3155,24 @@
*/
protected void endOfFileHook(EOFException e)
throws IOException, XNIException {
-
+
// NOTE: An end of file is only only an error if we were
// in the middle of scanning some markup. -Ac
if (fMarkupDepth != 0) {
reportFatalError("PrematureEOF", null);
}
-
+
} // endOfFileHook()
-
+
} // class FragmentContentDriver
-
+
static void pr(String str) {
System.out.println(str) ;
}
-
+
protected boolean fUsebuffer ;
-
- /** this function gets an XMLString (which is used to store the attribute value) from the special pool
+
+ /** this function gets an XMLString (which is used to store the attribute value) from the special pool
* maintained for attributes.
* fAttributeCacheUsedCount tracks the number of attributes that has been consumed from the pool.
* if all the attributes has been consumed, it adds a new XMLString inthe pool and returns the same
@@ -3180,7 +3180,7 @@
*
* @return XMLString XMLString used to store an attribute value.
*/
-
+
protected XMLString getString(){
if(fAttributeCacheUsedCount < initialCacheCount || fAttributeCacheUsedCount < attributeValueCache.size()){
return (XMLString)attributeValueCache.get(fAttributeCacheUsedCount++);
@@ -3195,7 +3195,7 @@
/**
* Implements XMLBufferListener interface.
*/
-
+
public void refresh(){
refresh(0);
}
@@ -3220,5 +3220,5 @@
fUsebuffer = true;
}
}
-
+
} // class XMLDocumentFragmentScannerImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLDocumentScannerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -62,7 +62,7 @@
* @author Arnaud Le Hors, IBM
* @author Eric Ye, IBM
* @author Sunitha Reddy, Sun Microsystems
- *
+ *
* Refer to the table in unit-test javax.xml.stream.XMLStreamReaderTest.SupportDTD for changes
* related to property SupportDTD.
* @author Joe Wang, Sun Microsystems
@@ -70,54 +70,54 @@
*/
public class XMLDocumentScannerImpl
extends XMLDocumentFragmentScannerImpl{
-
+
//
// Constants
//
-
+
// scanner states
-
+
/** Scanner state: XML declaration. */
protected static final int SCANNER_STATE_XML_DECL = 42;
-
+
/** Scanner state: prolog. */
protected static final int SCANNER_STATE_PROLOG = 43;
-
+
/** Scanner state: trailing misc. */
protected static final int SCANNER_STATE_TRAILING_MISC = 44;
-
+
/** Scanner state: DTD internal declarations. */
protected static final int SCANNER_STATE_DTD_INTERNAL_DECLS = 45;
-
+
/** Scanner state: open DTD external subset. */
protected static final int SCANNER_STATE_DTD_EXTERNAL = 46;
-
+
/** Scanner state: DTD external declarations. */
protected static final int SCANNER_STATE_DTD_EXTERNAL_DECLS = 47;
-
+
/** Scanner state: NO MORE ELEMENTS. */
protected static final int SCANNER_STATE_NO_SUCH_ELEMENT_EXCEPTION = 48;
-
+
// feature identifiers
-
+
/** Property identifier document scanner: */
protected static final String DOCUMENT_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DOCUMENT_SCANNER_PROPERTY;
-
+
/** Feature identifier: load external DTD. */
protected static final String LOAD_EXTERNAL_DTD =
Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
-
+
/** Feature identifier: load external DTD. */
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE =
Constants.XERCES_FEATURE_PREFIX + Constants.DISALLOW_DOCTYPE_DECL_FEATURE;
-
+
// property identifiers
-
+
/** Property identifier: DTD scanner. */
protected static final String DTD_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_SCANNER_PROPERTY;
-
+
// property identifier: ValidationManager
protected static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
@@ -125,126 +125,126 @@
/** property identifier: NamespaceContext */
protected static final String NAMESPACE_CONTEXT =
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_CONTEXT_PROPERTY;
-
+
// recognized features and properties
-
+
/** Recognized features. */
private static final String[] RECOGNIZED_FEATURES = {
LOAD_EXTERNAL_DTD,
DISALLOW_DOCTYPE_DECL_FEATURE,
};
-
+
/** Feature defaults. */
private static final Boolean[] FEATURE_DEFAULTS = {
Boolean.TRUE,
Boolean.FALSE,
};
-
+
/** Recognized properties. */
private static final String[] RECOGNIZED_PROPERTIES = {
DTD_SCANNER,
VALIDATION_MANAGER
};
-
+
/** Property defaults. */
private static final Object[] PROPERTY_DEFAULTS = {
null,
null
};
-
+
//
// Data((Boolean)propertyManager.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue();
//
-
+
// properties
-
+
/** DTD scanner. */
protected XMLDTDScanner fDTDScanner = null;
-
+
/** Validation manager . */
//xxx: fValidationManager code needs to be added yet!
protected ValidationManager fValidationManager;
-
+
protected XMLStringBuffer fDTDDecl = null;
protected boolean fReadingDTD = false;
protected boolean fAddedListener = false;
-
+
// protected data
-
+
// other info
-
+
/** Doctype name. */
protected String fDoctypeName;
-
+
/** Doctype declaration public identifier. */
protected String fDoctypePublicId;
-
+
/** Doctype declaration system identifier. */
protected String fDoctypeSystemId;
-
+
/** Namespace support. */
protected NamespaceContext fNamespaceContext = new NamespaceSupport();
-
+
// features
-
+
/** Load external DTD. */
protected boolean fLoadExternalDTD = true;
-
+
// state
-
+
/** Seen doctype declaration. */
protected boolean fSeenDoctypeDecl;
-
+
protected boolean fScanEndElement;
-
+
//protected int fScannerLastState ;
-
+
// drivers
-
+
/** XML declaration driver. */
protected Driver fXMLDeclDriver = new XMLDeclDriver();
-
+
/** Prolog driver. */
protected Driver fPrologDriver = new PrologDriver();
-
+
/** DTD driver. */
protected Driver fDTDDriver = null ;
-
+
/** Trailing miscellaneous section driver. */
protected Driver fTrailingMiscDriver = new TrailingMiscDriver();
protected int fStartPos = 0;
protected int fEndPos = 0;
protected boolean fSeenInternalSubset= false;
// temporary variables
-
+
/** Array of 3 strings. */
private String[] fStrings = new String[3];
-
+
/** External subset source. */
private XMLInputSource fExternalSubsetSource = null;
-
+
/** A DTD Description. */
private final XMLDTDDescription fDTDDescription = new XMLDTDDescription(null, null, null, null, null);
/** String. */
private XMLString fString = new XMLString();
-
+
private static final char [] DOCTYPE = {'D','O','C','T','Y','P','E'};
private static final char [] COMMENTSTRING = {'-','-'};
-
+
//
// Constructors
//
-
+
/** Default constructor. */
public XMLDocumentScannerImpl() {} //
- * REVISIT: We might want to think about the "right"
- * way to expose the list of declared entities. For now, the knowledge
- * how to access the entity declarations is implicit.
- */
- public XMLEntityManager(XMLEntityManager entityManager) {
-
-
- // save shared entity declarations
- fDeclaredEntities = entityManager != null
- ? entityManager.getEntityStore().getDeclaredEntities() : null;
-
- setScannerVersion(Constants.XML_VERSION_1_0);
- } //
@@ -452,9 +429,9 @@
XMLErrorReporter.SEVERITY_WARNING );
}
}
-
+
} // addInternalEntity(String,String)
-
+
/**
* Adds an external entity declaration.
*
@@ -508,10 +485,10 @@
XMLErrorReporter.SEVERITY_WARNING );
}
}
-
+
} // addExternalEntity(String,String,String,String)
-
-
+
+
/**
* Adds an unparsed entity declaration.
*
@@ -545,15 +522,15 @@
}
}
} // addUnparsedEntity(String,String,String,String)
-
-
+
+
/** get the entity storage object from entity manager */
public XMLEntityStorage getEntityStore(){
return fEntityStorage ;
}
-
+
/** return the entity responsible for reading the entity */
- public XMLEntityScanner getEntityScanner(){
+ public XMLEntityScanner getEntityScanner(){
if(fEntityScanner == null) {
// default to 1.0
if(fXML10EntityScanner == null) {
@@ -563,9 +540,9 @@
fEntityScanner = fXML10EntityScanner;
}
return fEntityScanner;
-
+
}
-
+
public void setScannerVersion(short version) {
if(version == Constants.XML_VERSION_1_0) {
@@ -583,9 +560,9 @@
fEntityScanner = fXML11EntityScanner;
fEntityScanner.setCurrentEntity(fCurrentEntity);
}
-
+
}
-
+
/**
* This method uses the passed-in XMLInputSource to make
* fCurrentEntity usable for reading.
@@ -603,18 +580,18 @@
boolean literal, boolean isExternal)
throws IOException, XNIException {
// get information
-
+
final String publicId = xmlInputSource.getPublicId();
String literalSystemId = xmlInputSource.getSystemId();
String baseSystemId = xmlInputSource.getBaseSystemId();
String encoding = xmlInputSource.getEncoding();
final boolean encodingExternallySpecified = (encoding != null);
- Boolean isBigEndian = null;
-
+ Boolean isBigEndian = null;
+
// create reader
InputStream stream = null;
Reader reader = xmlInputSource.getCharacterStream();
-
+
// First chance checking strict URI
String expandedSystemId = expandSystemId(literalSystemId, baseSystemId, fStrictURI);
if (baseSystemId == null) {
@@ -630,32 +607,32 @@
}
else {
boolean followRedirects = true;
-
+
// setup URLConnection if we have an HTTPInputSource
if (xmlInputSource instanceof HTTPInputSource) {
final HttpURLConnection urlConnection = (HttpURLConnection) connect;
final HTTPInputSource httpInputSource = (HTTPInputSource) xmlInputSource;
-
+
// set request properties
Iterator propIter = httpInputSource.getHTTPRequestProperties();
while (propIter.hasNext()) {
Map.Entry entry = (Map.Entry) propIter.next();
urlConnection.setRequestProperty((String) entry.getKey(), (String) entry.getValue());
}
-
+
// set preference for redirection
followRedirects = httpInputSource.getFollowHTTPRedirects();
if (!followRedirects) {
setInstanceFollowRedirects(urlConnection, followRedirects);
}
}
-
+
stream = connect.getInputStream();
-
+
// REVISIT: If the URLConnection has external encoding
// information, we should be reading it here. It's located
// in the charset parameter of Content-Type. -- mrglavas
-
+
if (followRedirects) {
String redirect = connect.getURL().toString();
// E43: Check if the URL was redirected, and then
@@ -667,10 +644,10 @@
}
}
}
-
+
// wrap this stream in RewindableInputStream
stream = new RewindableInputStream(stream);
-
+
// perform auto-detect of encoding if necessary
if (encoding == null) {
// read first four bytes and determine encoding
@@ -683,8 +660,8 @@
Object [] encodingDesc = getEncodingName(b4, count);
encoding = (String)(encodingDesc[0]);
isBigEndian = (Boolean)(encodingDesc[1]);
-
- stream.reset();
+
+ stream.reset();
// Special case UTF-8 files with BOM created by Microsoft
// tools. It's more efficient to consume the BOM than make
// the reader perform extra checks. -Ac
@@ -702,11 +679,11 @@
reader = createReader(stream, encoding, isBigEndian);
}
}
-
+
// use specified encoding
else {
encoding = encoding.toUpperCase(Locale.ENGLISH);
-
+
// If encoding is UTF-8, consume BOM if one is present.
if (encoding.equals("UTF-8")) {
final int[] b3 = new int[3];
@@ -736,7 +713,7 @@
break;
}
stream.reset();
-
+
String utf16Encoding = "UTF-16";
if (count >= 2) {
final int b0 = b4[0];
@@ -779,7 +756,7 @@
break;
}
stream.reset();
-
+
// Ignore unusual octet order for now.
if (count == 4) {
// UCS-4, big endian (1234)
@@ -803,7 +780,7 @@
break;
}
stream.reset();
-
+
if (count == 4) {
// UCS-2, big endian
if (b4[0] == 0x00 && b4[1] == 0x3C && b4[2] == 0x00 && b4[3] == 0x3F) {
@@ -815,10 +792,10 @@
}
}
}
-
+
reader = createReader(stream, encoding, isBigEndian);
}
-
+
// read one character at a time so we don't jump too far
// ahead, converting characters from the byte stream in
// the wrong encoding
@@ -827,22 +804,22 @@
}
//reader = new OneCharReader(reader);
}
-
+
// We've seen a new Reader.
// Push it on the stack so we can close it later.
//fOwnReaders.add(reader);
-
+
// push entity on stack
if (fCurrentEntity != null) {
fEntityStack.push(fCurrentEntity);
}
-
+
// create entity
- /* if encoding is specified externally, 'encoding' information present
+ /* if encoding is specified externally, 'encoding' information present
* in the prolog of the XML document is not considered. Hence, prolog can
- * be read in Chunks of data instead of byte by byte.
+ * be read in Chunks of data instead of byte by byte.
*/
- fCurrentEntity = new com.sun.xml.internal.stream.Entity.ScannedEntity(name,new XMLResourceIdentifierImpl(publicId, literalSystemId, baseSystemId, expandedSystemId),stream, reader, encoding, literal, encodingExternallySpecified, isExternal);
+ fCurrentEntity = new com.sun.xml.internal.stream.Entity.ScannedEntity(name,new XMLResourceIdentifierImpl(publicId, literalSystemId, baseSystemId, expandedSystemId),stream, reader, encoding, literal, encodingExternallySpecified, isExternal);
fCurrentEntity.setEncodingExternallySpecified(encodingExternallySpecified);
fEntityScanner.setCurrentEntity(fCurrentEntity);
fResourceIdentifier.setValues(publicId, literalSystemId, baseSystemId, expandedSystemId);
@@ -856,16 +833,16 @@
* @param entityName The name of the entity to check.
* @return True if the entity is external, false otherwise
* (including when the entity is not declared).
- */
+ */
public boolean isExternalEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isExternal();
}
-
+
/**
* Checks whether the declaration of an entity given by name is
* // in the external subset.
@@ -875,20 +852,20 @@
* (including when the entity is not declared).
*/
public boolean isEntityDeclInExternalSubset(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isEntityDeclInExternalSubset();
}
-
-
-
+
+
+
//
// Public methods
//
-
+
/**
* Sets whether the document entity is standalone.
*
@@ -898,29 +875,29 @@
fStandalone = standalone;
}
// setStandalone(boolean)
-
+
/** Returns true if the document entity is standalone. */
public boolean isStandalone() {
return fStandalone;
} //isStandalone():boolean
-
+
public boolean isDeclaredEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
return entity != null;
}
-
+
public boolean isUnparsedEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isUnparsed();
}
-
-
-
+
+
+
// this simply returns the fResourceIdentifier object;
// this should only be used with caution by callers that
// carefully manage the entity manager's behaviour, so that
@@ -929,23 +906,23 @@
public XMLResourceIdentifier getCurrentResourceIdentifier() {
return fResourceIdentifier;
}
-
+
/**
* Sets the entity handler. When an entity starts and ends, the
* entity handler is notified of the change.
*
* @param entityHandler The new entity handler.
*/
-
+
public void setEntityHandler(com.sun.org.apache.xerces.internal.impl.XMLEntityHandler entityHandler) {
fEntityHandler = (XMLEntityHandler) entityHandler;
} // setEntityHandler(XMLEntityHandler)
-
+
//this function returns StaxXMLInputSource
public StaxXMLInputSource resolveEntityAsPerStax(XMLResourceIdentifier resourceIdentifier) throws java.io.IOException{
-
+
if(resourceIdentifier == null ) return null;
-
+
String publicId = resourceIdentifier.getPublicId();
String literalSystemId = resourceIdentifier.getLiteralSystemId();
String baseSystemId = resourceIdentifier.getBaseSystemId();
@@ -967,13 +944,13 @@
}
if (needExpand)
expandedSystemId = expandSystemId(literalSystemId, baseSystemId,false);
-
+
// give the entity resolver a chance
StaxXMLInputSource staxInputSource = null;
XMLInputSource xmlInputSource = null;
XMLResourceIdentifierImpl ri = null;
-
+
if (resourceIdentifier instanceof XMLResourceIdentifierImpl) {
ri = (XMLResourceIdentifierImpl)resourceIdentifier;
} else {
@@ -984,21 +961,21 @@
if(DEBUG_RESOLVER){
System.out.println("BEFORE Calling resolveEntity") ;
}
-
+
//either of Stax or Xerces would be null
if(fStaxEntityResolver != null){
staxInputSource = fStaxEntityResolver.resolveEntity(ri);
}
-
+
if(fEntityResolver != null){
xmlInputSource = fEntityResolver.resolveEntity(ri);
}
-
+
if(xmlInputSource != null){
//wrap this XMLInputSource to StaxInputSource
staxInputSource = new StaxXMLInputSource(xmlInputSource);
}
-
+
// do default resolution
//this works for both stax & Xerces, if staxInputSource is null, it means parser need to revert to default resolution
if (staxInputSource == null) {
@@ -1009,16 +986,16 @@
}else if(staxInputSource.hasXMLStreamOrXMLEventReader()){
//Waiting for the clarification from EG. - nb
}
-
+
if (DEBUG_RESOLVER) {
System.err.println("XMLEntityManager.resolveEntity(" + publicId + ")");
System.err.println(" = " + xmlInputSource);
}
-
+
return staxInputSource;
-
+
}
-
+
/**
* Resolves the specified public and system identifiers. This
* method first attempts to resolve the entity based on the
@@ -1048,7 +1025,7 @@
String baseSystemId = resourceIdentifier.getBaseSystemId();
String expandedSystemId = resourceIdentifier.getExpandedSystemId();
String namespace = resourceIdentifier.getNamespace();
-
+
// if no base systemId given, assume that it's relative
// to the systemId of the current scanned entity
// Sometimes the system id is not (properly) expanded.
@@ -1066,16 +1043,16 @@
}
if (needExpand)
expandedSystemId = expandSystemId(literalSystemId, baseSystemId,false);
-
+
// give the entity resolver a chance
XMLInputSource xmlInputSource = null;
-
+
if (fEntityResolver != null) {
resourceIdentifier.setBaseSystemId(baseSystemId);
resourceIdentifier.setExpandedSystemId(expandedSystemId);
xmlInputSource = fEntityResolver.resolveEntity(resourceIdentifier);
}
-
+
// do default resolution
// REVISIT: what's the correct behavior if the user provided an entity
// resolver (fEntityResolver != null), but resolveEntity doesn't return
@@ -1087,16 +1064,16 @@
//if (systemId != null)
xmlInputSource = new XMLInputSource(publicId, literalSystemId, baseSystemId);
}
-
+
if (DEBUG_RESOLVER) {
System.err.println("XMLEntityManager.resolveEntity(" + publicId + ")");
System.err.println(" = " + xmlInputSource);
}
-
+
return xmlInputSource;
-
+
} // resolveEntity(XMLResourceIdentifier):XMLInputSource
-
+
/**
* Starts a named entity.
*
@@ -1109,9 +1086,9 @@
*/
public void startEntity(String entityName, boolean literal)
throws IOException, XNIException {
-
+
// was entity declared?
- Entity entity = (Entity)fEntityStorage.getDeclaredEntities().get(entityName);
+ Entity entity = (Entity)fEntityStorage.getEntity(entityName);
if (entity == null) {
if (fEntityHandler != null) {
String encoding = null;
@@ -1125,7 +1102,7 @@
}
return;
}
-
+
// should we skip external entities?
boolean external = entity.isExternal();
if (external) {
@@ -1134,7 +1111,7 @@
boolean general = !parameter;
if (unparsed || (general && !fExternalGeneralEntities) ||
(parameter && !fExternalParameterEntities)) {
-
+
if (fEntityHandler != null) {
fResourceIdentifier.clear();
final String encoding = null;
@@ -1158,7 +1135,7 @@
return;
}
}
-
+
// is entity recursive?
int size = fEntityStack.size();
for (int i = size; i >= 0; i--) {
@@ -1177,7 +1154,7 @@
"RecursiveReference",
new Object[] { entityName, path },
XMLErrorReporter.SEVERITY_FATAL_ERROR);
-
+
if (fEntityHandler != null) {
fResourceIdentifier.clear();
final String encoding = null;
@@ -1198,15 +1175,15 @@
fEntityAugs.putItem(Constants.ENTITY_SKIPPED, Boolean.TRUE);
fEntityHandler.endEntity(entityName, fEntityAugs);
}
-
+
return;
}
}
-
+
// resolve external entity
StaxXMLInputSource staxInputSource = null;
XMLInputSource xmlInputSource = null ;
-
+
if (external) {
Entity.ExternalEntity externalEntity = (Entity.ExternalEntity)entity;
staxInputSource = resolveEntityAsPerStax(externalEntity.entityLocation);
@@ -1223,12 +1200,12 @@
Reader reader = new StringReader(internalEntity.text);
xmlInputSource = new XMLInputSource(null, null, null, reader, null);
}
-
+
// start the entity
startEntity(entityName, xmlInputSource, literal, external);
-
+
} // startEntity(String,boolean)
-
+
/**
* Starts the document entity. The document entity has the "[xml]"
* pseudo-name.
@@ -1242,7 +1219,7 @@
throws IOException, XNIException {
startEntity(XMLEntity, xmlInputSource, false, true);
} // startDocumentEntity(XMLInputSource)
-
+
//xxx these methods are not required.
/**
* Starts the DTD entity. The DTD entity has the "[dtd]"
@@ -1257,17 +1234,17 @@
throws IOException, XNIException {
startEntity(DTDEntity, xmlInputSource, false, true);
} // startDTDEntity(XMLInputSource)
-
+
// indicate start of external subset so that
// location of entity decls can be tracked
public void startExternalSubset() {
fInExternalSubset = true;
}
-
+
public void endExternalSubset() {
fInExternalSubset = false;
}
-
+
/**
* Starts an entity.
*
@@ -1287,9 +1264,9 @@
XMLInputSource xmlInputSource,
boolean literal, boolean isExternal)
throws IOException, XNIException {
-
+
String encoding = setupCurrentEntity(name, xmlInputSource, literal, isExternal);
-
+
//when entity expansion limit is set by the Application, we need to
//check for the entity expansion limit set by the parser, if number of entity
//expansions exceeds the entity expansion limit, parser will throw fatal error.
@@ -1310,57 +1287,64 @@
if (fEntityHandler != null) {
fEntityHandler.startEntity(name, fResourceIdentifier, encoding, null);
}
-
+
} // startEntity(String,XMLInputSource)
-
+
/**
* Return the current entity being scanned. Current entity is SET using startEntity function.
* @return Entity.ScannedEntity
*/
-
+
public Entity.ScannedEntity getCurrentEntity(){
return fCurrentEntity ;
}
-
+
/**
* Return the top level entity handled by this manager, or null
* if no entity was added.
*/
public Entity.ScannedEntity getTopLevelEntity() {
- return (Entity.ScannedEntity)
+ return (Entity.ScannedEntity)
(fEntityStack.empty() ? null : fEntityStack.elementAt(0));
}
-
- // a list of Readers ever seen
- protected Vector fOwnReaders = new Vector();
-
+
+
/**
* Close all opened InputStreams and Readers opened by this parser.
*/
public void closeReaders() {
- // close all readers
- for (int i = fOwnReaders.size()-1; i >= 0; i--) {
- try {
- ((Reader)fOwnReaders.elementAt(i)).close();
- } catch (IOException e) {
- // ignore
- }
- }
- // and clear the list
- fOwnReaders.removeAllElements();
+ /** this call actually does nothing, readers are closed in the endEntity method
+ * through the current entity.
+ * The change seems to have happened during the jdk6 development with the
+ * addition of StAX
+ **/
}
-
+
public void endEntity() throws IOException, XNIException {
-
+
// call handler
if (DEBUG_BUFFER) {
System.out.print("(endEntity: ");
print();
System.out.println();
- }
- //pop the entity from the stack
+ }
+ //pop the entity from the stack
Entity.ScannedEntity entity = fEntityStack.size() > 0 ? (Entity.ScannedEntity)fEntityStack.pop() : null ;
-
+
+ /** need to close the reader first since the program can end
+ * prematurely (e.g. fEntityHandler.endEntity may throw exception)
+ * leaving the reader open
+ */
+ //close the reader
+ if(fCurrentEntity != null){
+ //close the reader
+ try{
+ fCurrentEntity.close();
+ }catch(IOException ex){
+ throw new XNIException(ex);
+ }
+ }
+
if (fEntityHandler != null) {
//so this is the last opened entity, signal it to current fEntityHandler using Augmentation
if(entity == null){
@@ -1374,38 +1358,28 @@
}
//check if it is a document entity
boolean documentEntity = fCurrentEntity.name == XMLEntity;
-
- //close the reader
- if(fCurrentEntity != null){
- //close the reader
- try{
- fCurrentEntity.close();
- }catch(IOException ex){
- throw new XNIException(ex);
- }
- }
-
+
//set popped entity as current entity
fCurrentEntity = entity;
fEntityScanner.setCurrentEntity(fCurrentEntity);
-
+
//check if there are any entity left in the stack -- if there are
- //no entries EOF has been reached.
+ //no entries EOF has been reached.
// throw exception when it is the last entity but it is not a document entity
-
+
if(fCurrentEntity == null & !documentEntity){
throw new EOFException() ;
}
-
+
if (DEBUG_BUFFER) {
System.out.print(")endEntity: ");
print();
System.out.println();
}
-
+
} // endEntity()
-
-
+
+
//
// XMLComponent methods
//
@@ -1422,7 +1396,7 @@
} catch (XMLConfigurationException e) {
fStaxEntityResolver = null;
}
-
+
// initialize state
//fStandalone = false;
fEntities.clear();
@@ -1432,10 +1406,10 @@
fExternalGeneralEntities = true;
fExternalParameterEntities = true;
fAllowJavaEncodings = true ;
-
+
//test();
}
-
+
/**
* Resets the component. The component can query the component manager
* about any features and properties that affect the operation of the
@@ -1462,11 +1436,11 @@
fEntityScanner.reset(componentManager);
}
if(fEntityStorage != null){
- fEntityStorage.reset(componentManager);
+ fEntityStorage.reset(componentManager);
}
return;
}
-
+
// sax features
fValidation = componentManager.getFeature(VALIDATION, false);
fExternalGeneralEntities = componentManager.getFeature(EXTERNAL_GENERAL_ENTITIES, true);
@@ -1487,18 +1461,18 @@
//reset general state
reset();
-
+
fEntityScanner.reset(componentManager);
fEntityStorage.reset(componentManager);
-
+
} // reset(XMLComponentManager)
-
+
// reset general state. Should not be called other than by
// a class acting as a component manager but not
// implementing that interface for whatever reason.
public void reset() {
fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0;
-
+
// initialize state
fStandalone = false;
fEntities.clear();
@@ -1536,21 +1510,12 @@
}
}
- // copy declared entities
- if (fDeclaredEntities != null) {
- java.util.Enumeration keys = fDeclaredEntities.keys();
- while (keys.hasMoreElements()) {
- Object key = keys.nextElement();
- Object value = fDeclaredEntities.get(key);
- fEntities.put(key, value);
- }
- }
fEntityHandler = null;
-
+
// reset scanner
//if(fEntityScanner!=null)
// fEntityScanner.reset(fSymbolTable, this,fErrorReporter);
-
+
}
/**
* Returns a list of feature identifiers that are recognized by
@@ -1560,7 +1525,7 @@
public String[] getRecognizedFeatures() {
return (String[])(RECOGNIZED_FEATURES.clone());
} // getRecognizedFeatures():String[]
-
+
/**
* Sets the state of a feature. This method is called by the component
* manager any time after reset when a feature changes state.
@@ -1578,18 +1543,18 @@
*/
public void setFeature(String featureId, boolean state)
throws XMLConfigurationException {
-
+
// xerces features
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
- if (suffixLength == Constants.ALLOW_JAVA_ENCODINGS_FEATURE.length() &&
+ if (suffixLength == Constants.ALLOW_JAVA_ENCODINGS_FEATURE.length() &&
featureId.endsWith(Constants.ALLOW_JAVA_ENCODINGS_FEATURE)) {
fAllowJavaEncodings = state;
}
}
-
+
} // setFeature(String,boolean)
-
+
/**
* Sets the value of a property. This method is called by the component
* manager any time after reset when a property changes value.
@@ -1609,23 +1574,23 @@
// Xerces properties
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
-
- if (suffixLength == Constants.SYMBOL_TABLE_PROPERTY.length() &&
+
+ if (suffixLength == Constants.SYMBOL_TABLE_PROPERTY.length() &&
propertyId.endsWith(Constants.SYMBOL_TABLE_PROPERTY)) {
fSymbolTable = (SymbolTable)value;
return;
}
- if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
+ if (suffixLength == Constants.ERROR_REPORTER_PROPERTY.length() &&
propertyId.endsWith(Constants.ERROR_REPORTER_PROPERTY)) {
fErrorReporter = (XMLErrorReporter)value;
return;
}
- if (suffixLength == Constants.ENTITY_RESOLVER_PROPERTY.length() &&
+ if (suffixLength == Constants.ENTITY_RESOLVER_PROPERTY.length() &&
propertyId.endsWith(Constants.ENTITY_RESOLVER_PROPERTY)) {
fEntityResolver = (XMLEntityResolver)value;
return;
}
- if (suffixLength == Constants.BUFFER_SIZE_PROPERTY.length() &&
+ if (suffixLength == Constants.BUFFER_SIZE_PROPERTY.length() &&
propertyId.endsWith(Constants.BUFFER_SIZE_PROPERTY)) {
Integer bufferSize = (Integer)value;
if (bufferSize != null &&
@@ -1635,13 +1600,13 @@
fBufferPool.setExternalBufferSize(fBufferSize);
}
}
- if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
+ if (suffixLength == Constants.SECURITY_MANAGER_PROPERTY.length() &&
propertyId.endsWith(Constants.SECURITY_MANAGER_PROPERTY)) {
- fSecurityManager = (SecurityManager)value;
+ fSecurityManager = (SecurityManager)value;
fEntityExpansionLimit = (fSecurityManager != null)?fSecurityManager.getEntityExpansionLimit():0;
}
}
-
+
}
/**
* Returns a list of property identifiers that are recognized by
@@ -1668,7 +1633,7 @@
}
return null;
} // getFeatureDefault(String):Boolean
-
+
/**
* Returns the default state for a property, or null if this
* component does not want to report a default value for this
@@ -1686,11 +1651,11 @@
}
return null;
} // getPropertyDefault(String):Object
-
+
//
// Public static methods
//
-
+
/**
* Expands a system id and returns the system id as a URI, if
* it can be expanded. A return value of null means that the
@@ -1707,7 +1672,7 @@
public static String expandSystemId(String systemId) {
return expandSystemId(systemId, null);
} // expandSystemId(String):String
-
+
//
// Public static methods
//
@@ -1766,7 +1731,7 @@
}
// return empty string if property value is empty string.
- if (userDir.length() == 0)
+ if (userDir.length() == 0)
return new URI("file", "", "", null, null);
// compute the new escaped value if the new property value doesn't
// match the previous one
@@ -1850,19 +1815,19 @@
return gUserDirURI;
}
-
+
/**
* Absolutizes a URI using the current value
* of the "user.dir" property as the base URI. If
* the URI is already absolute, this is a no-op.
- *
+ *
* @param uri the URI to absolutize
*/
- public static void absolutizeAgainstUserDir(URI uri)
+ public static void absolutizeAgainstUserDir(URI uri)
throws URI.MalformedURIException {
uri.absolutize(getUserDir());
}
-
+
/**
* Expands a system id and returns the system id as a URI, if
* it can be expanded. A return value of null means that the
@@ -1948,7 +1913,7 @@
boolean strict)
throws URI.MalformedURIException {
- // check if there is a system id before
+ // check if there is a system id before
// trying to expand it.
if (systemId == null) {
return null;
@@ -1958,7 +1923,7 @@
if (strict) {
- // check if there is a system id before
+ // check if there is a system id before
// trying to expand it.
if (systemId == null) {
return null;
@@ -2019,7 +1984,7 @@
// normalize id
String id = fixURI(systemId);
-
+
// normalize base
URI base = null;
URI uri = null;
@@ -2048,7 +2013,7 @@
}
catch (Exception e) {
// let it go through
-
+
}
if (uri == null) {
@@ -2395,7 +2360,7 @@
System.out.println();
}
return new BufferedReader( new InputStreamReader(inputStream, javaEncoding));
-
+
} // createReader(InputStream,String, Boolean): Reader
@@ -2591,7 +2556,7 @@
str = "file:" + str;
}
}
-
+
// replace spaces in file names with %20.
// Original comment from JDK5: the following algorithm might not be
// very performant, but people who want to use invalid URI's have to
@@ -2613,12 +2578,12 @@
}
str = sb.toString();
}
-
+
// done
return str;
} // fixURI(String):String
-
+
/**
* Escape invalid URI characters.
*
@@ -2642,7 +2607,7 @@
if (str == null) {
return str;
}
-
+
// get UTF-8 bytes for the string
StringBuffer buffer = new StringBuffer();
byte[] bytes = null;
@@ -2676,7 +2641,7 @@
}
}
return buffer.toString();
- }
+ }
//
// Package visible methods
@@ -2733,36 +2698,36 @@
}
}
} // print()
-
+
/**
* Buffer used in entity manager to reuse character arrays instead
* of creating new ones every time.
- *
+ *
* @xerces.internal
- *
+ *
* @author Ankit Pasricha, IBM
*/
private static class CharacterBuffer {
/** character buffer */
private char[] ch;
-
+
/** whether the buffer is for an external or internal scanned entity */
private boolean isExternal;
-
+
public CharacterBuffer(boolean isExternal, int size) {
this.isExternal = isExternal;
ch = new char[size];
}
}
-
-
+
+
/**
* Stores a number of character buffers and provides it to the entity
* manager to use when an entity is seen.
- *
- * @xerces.internal
- *
+ *
+ * @xerces.internal
+ *
* @author Ankit Pasricha, IBM
*/
private static class CharacterBufferPool {
@@ -2837,7 +2802,7 @@
fExternalTop = -1;
}
}
-
+
/**
* This class wraps the byte inputstreams we're presented with.
* We need it because java.io.InputStreams don't provide
@@ -2856,7 +2821,7 @@
* won't buffer data read this way!
*
* @xerces.internal
- *
+ *
* @author Neil Graham, IBM
* @author Glenn Marcy, IBM
*/
@@ -2911,21 +2876,21 @@
fOffset++;
return b & 0xff;
}
-
+
public int read(byte[] b, int off, int len) throws IOException {
int bytesLeft = fLength - fOffset;
if (bytesLeft == 0) {
if (fOffset == fEndOffset) {
return -1;
}
-
+
/**
* //System.out.println("fCurrentEntitty = " + fCurrentEntity );
* //System.out.println("fInputStream = " + fInputStream );
* // better get some more for the voracious reader... */
-
+
if(fCurrentEntity.mayReadChunks || !fCurrentEntity.xmlDeclChunkRead) {
-
+
if (!fCurrentEntity.xmlDeclChunkRead)
{
fCurrentEntity.xmlDeclChunkRead = true;
@@ -2933,15 +2898,15 @@
}
return fInputStream.read(b, off, len);
}
-
+
int returnedVal = read();
if(returnedVal == -1) {
fEndOffset = fOffset;
return -1;
}
b[off] = (byte)returnedVal;
- return 1;
-
+ return 1;
+
}
if (len < bytesLeft) {
if (len <= 0) {
@@ -3022,7 +2987,7 @@
}
}
} // end of RewindableInputStream class
-
+
public void test(){
//System.out.println("TESTING: Added familytree to entityManager");
//Usecase1
@@ -3046,5 +3011,5 @@
fEntityStorage.addInternalEntity("ch1","T");
fEntityStorage.addInternalEntity("% ch2","param");
}
-
+
} // class XMLEntityManager
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLEntityScanner.java Wed May 02 13:32:36 2012 +0100
@@ -59,20 +59,20 @@
*
*/
public class XMLEntityScanner implements XMLLocator {
-
-
+
+
protected Entity.ScannedEntity fCurrentEntity = null ;
protected int fBufferSize = XMLEntityManager.DEFAULT_BUFFER_SIZE;
-
+
protected XMLEntityManager fEntityManager ;
-
+
/** Debug switching readers for encodings. */
private static final boolean DEBUG_ENCODINGS = false;
/** Listeners which should know when load is being called */
private Vector listeners = new Vector();
-
+
public static final boolean [] VALID_NAMES = new boolean[127];
-
+
/**
* Debug printing of buffer. This debugging flag works best when you
* resize the DEFAULT_BUFFER_SIZE down to something reasonable like
@@ -89,39 +89,39 @@
return this;
}
};
-
+
protected SymbolTable fSymbolTable = null;
protected XMLErrorReporter fErrorReporter = null;
int [] whiteSpaceLookup = new int[100];
int whiteSpaceLen = 0;
boolean whiteSpaceInfoNeeded = true;
-
+
/**
* Allow Java encoding names. This feature identifier is:
* http://apache.org/xml/features/allow-java-encodings
*/
protected boolean fAllowJavaEncodings;
-
+
//Will be used only during internal subsets.
//for appending data.
-
+
/** Property identifier: symbol table. */
protected static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: error reporter. */
protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Feature identifier: allow Java encodings. */
protected static final String ALLOW_JAVA_ENCODINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-
+
protected PropertyManager fPropertyManager = null ;
-
+
boolean isExternal = false;
static {
-
+
for(int i=0x0041;i<=0x005A ; i++){
VALID_NAMES[i]=true;
}
@@ -136,16 +136,18 @@
VALID_NAMES[58]=true;
VALID_NAMES[95]=true;
}
-
+ // SAPJVM: Remember, that the XML version has explicitly been set,
+ // so that XMLStreamReader.getVersion() can find that out.
+ boolean xmlVersionSetExplicitly = false;
//
// Constructors
//
-
+
/** Default constructor. */
public XMLEntityScanner() {
} //
@@ -487,16 +490,16 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// peek at character
int c = fCurrentEntity.ch[fCurrentEntity.position];
-
+
// return peeked character
if (DEBUG_BUFFER) {
System.out.print(")peekChar: ");
@@ -512,9 +515,9 @@
} else {
return c;
}
-
+
} // peekChar():int
-
+
/**
* Returns the next character on the input.
*
@@ -529,13 +532,13 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// scan character
int c = fCurrentEntity.ch[fCurrentEntity.position++];
if (c == '\n' ||
@@ -554,7 +557,7 @@
c = '\n';
}
}
-
+
// return character that was scanned
if (DEBUG_BUFFER) {
System.out.print(")scanChar: ");
@@ -563,9 +566,9 @@
}
fCurrentEntity.columnNumber++;
return c;
-
+
} // scanChar():int
-
+
/**
* Returns a string matching the NMTOKEN production appearing immediately
* on the input as a symbol, or null if NMTOKEN Name string is present.
@@ -587,13 +590,13 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// scan nmtoken
int offset = fCurrentEntity.position;
boolean vc = false;
@@ -607,7 +610,7 @@
vc = XMLChar.isName(c);
}
if(!vc)break;
-
+
if (++fCurrentEntity.position == fCurrentEntity.count) {
int length = fCurrentEntity.position - offset;
invokeListeners(length);
@@ -630,7 +633,7 @@
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length;
-
+
// return nmtoken
String symbol = null;
if (length > 0) {
@@ -642,9 +645,9 @@
System.out.println(" -> "+String.valueOf(symbol));
}
return symbol;
-
+
} // scanNmtoken():String
-
+
/**
* Returns a string matching the Name production appearing immediately
* on the input as a symbol, or null if no Name string is present.
@@ -667,13 +670,13 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// scan name
int offset = fCurrentEntity.position;
if (XMLChar.isNameStart(fCurrentEntity.ch[offset])) {
@@ -684,7 +687,7 @@
if (load(1, false)) {
fCurrentEntity.columnNumber++;
String symbol = fSymbolTable.addSymbol(fCurrentEntity.ch, 0, 1);
-
+
if (DEBUG_BUFFER) {
System.out.print(")scanName: ");
print();
@@ -726,7 +729,7 @@
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length;
-
+
// return name
String symbol;
if (length > 0) {
@@ -739,9 +742,9 @@
System.out.println(" -> "+String.valueOf(symbol));
}
return symbol;
-
+
} // scanName():String
-
+
/**
* Scans a qualified name from the input, setting the fields of the
* QName structure appropriately.
@@ -770,26 +773,26 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// scan qualified name
int offset = fCurrentEntity.position;
-
+
//making a check if if the specified character is a valid name start character
//as defined by production [5] in the XML 1.0 specification.
// Name ::= (Letter | '_' | ':') (NameChar)*
-
+
if (XMLChar.isNameStart(fCurrentEntity.ch[offset])) {
if (++fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(1);
fCurrentEntity.ch[0] = fCurrentEntity.ch[offset];
offset = 0;
-
+
if (load(1, false)) {
fCurrentEntity.columnNumber++;
//adding into symbol table.
@@ -807,7 +810,7 @@
int index = -1;
boolean vc = false;
while ( true){
-
+
//XMLChar.isName(fCurrentEntity.ch[fCurrentEntity.position])) ;
char c = fCurrentEntity.ch[fCurrentEntity.position];
if(c < 127){
@@ -852,7 +855,7 @@
String localpart = null;
String rawname = fSymbolTable.addSymbol(fCurrentEntity.ch,
offset, length);
-
+
if (index != -1) {
int prefixLength = index - offset;
prefix = fSymbolTable.addSymbol(fCurrentEntity.ch,
@@ -860,7 +863,7 @@
int len = length - prefixLength - 1;
localpart = fSymbolTable.addSymbol(fCurrentEntity.ch,
index + 1, len);
-
+
} else {
localpart = rawname;
}
@@ -873,7 +876,7 @@
return true;
}
}
-
+
// no qualified name found
if (DEBUG_BUFFER) {
System.out.print(")scanQName, "+qname+": ");
@@ -881,9 +884,9 @@
System.out.println(" -> false");
}
return false;
-
+
} // scanQName(QName):boolean
-
+
/**
* CHANGED:
* Scans a range of parsed character data, This function appends the character data to
@@ -912,7 +915,7 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
@@ -923,7 +926,7 @@
load(1, false);
fCurrentEntity.position = 0;
}
-
+
// normalize newlines
int offset = fCurrentEntity.position;
int c = fCurrentEntity.ch[offset];
@@ -995,7 +998,7 @@
System.out.println();
}
}
-
+
while (fCurrentEntity.position < fCurrentEntity.count) {
c = fCurrentEntity.ch[fCurrentEntity.position++];
if (!XMLChar.isContent(c)) {
@@ -1005,7 +1008,7 @@
}
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
-
+
//CHANGED: dont replace the value.. append to the buffer. This gives control to the callee
//on buffering the data..
content.setValues(fCurrentEntity.ch, offset, length);
@@ -1027,9 +1030,9 @@
System.out.println(" -> '"+(char)c+"'");
}
return c;
-
+
} // scanContent(XMLString):int
-
+
/**
* Scans a range of attribute value data, setting the fields of the
* XMLString structure, appropriately.
@@ -1072,11 +1075,11 @@
} else if (fCurrentEntity.position == fCurrentEntity.count - 1) {
invokeListeners(0);
fCurrentEntity.ch[0] = fCurrentEntity.ch[fCurrentEntity.count - 1];
-
+
load(1, false);
fCurrentEntity.position = 0;
}
-
+
// normalize newlines
int offset = fCurrentEntity.position;
int c = fCurrentEntity.ch[offset];
@@ -1141,7 +1144,7 @@
fCurrentEntity.ch[i] = '\n';
whiteSpaceLookup[whiteSpaceLen++]=i;
}
-
+
int length = fCurrentEntity.position - offset;
if (fCurrentEntity.position == fCurrentEntity.count - 1) {
content.setValues(fCurrentEntity.ch, offset, length);
@@ -1158,8 +1161,8 @@
System.out.println();
}
}
-
- // scan literal value
+
+ // scan literal value
while (fCurrentEntity.position < fCurrentEntity.count) {
c = fCurrentEntity.ch[fCurrentEntity.position++];
if ((c == quote &&
@@ -1167,7 +1170,7 @@
|| c == '%' || !XMLChar.isContent(c)) {
fCurrentEntity.position--;
break;
- }
+ }
if(whiteSpaceInfoNeeded){
if(c == 0x20 || c == 0x9){
if(whiteSpaceLen < whiteSpaceLookup.length){
@@ -1184,7 +1187,7 @@
int length = fCurrentEntity.position - offset;
fCurrentEntity.columnNumber += length - newlines;
content.setValues(fCurrentEntity.ch, offset, length);
-
+
// return next character
if (fCurrentEntity.position != fCurrentEntity.count) {
c = fCurrentEntity.ch[fCurrentEntity.position];
@@ -1203,9 +1206,9 @@
System.out.println(" -> '"+(char)c+"'");
}
return c;
-
+
} // scanLiteral(int,XMLString):int
-
+
//CHANGED:
/**
* Scans a range of character data up to the specified delimiter,
@@ -1232,7 +1235,7 @@
*/
public boolean scanData(String delimiter, XMLStringBuffer buffer)
throws IOException {
-
+
boolean done = false;
int delimLen = delimiter.length();
char charAt0 = delimiter.charAt(0);
@@ -1242,7 +1245,7 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
@@ -1268,15 +1271,15 @@
if (fCurrentEntity.position > fCurrentEntity.count - delimLen) {
// something must be wrong with the input: e.g., file ends in an unterminated comment
int length = fCurrentEntity.count - fCurrentEntity.position;
- buffer.append (fCurrentEntity.ch, fCurrentEntity.position, length);
+ buffer.append (fCurrentEntity.ch, fCurrentEntity.position, length);
fCurrentEntity.columnNumber += fCurrentEntity.count;
fCurrentEntity.baseCharOffset += (fCurrentEntity.position - fCurrentEntity.startPosition);
fCurrentEntity.position = fCurrentEntity.count;
fCurrentEntity.startPosition = fCurrentEntity.count;
load(0, true);
return false;
- }
-
+ }
+
// normalize newlines
int offset = fCurrentEntity.position;
int c = fCurrentEntity.ch[offset];
@@ -1346,7 +1349,7 @@
System.out.println();
}
}
-
+
// iterate over buffer looking for delimiter
OUTER: while (fCurrentEntity.position < fCurrentEntity.count) {
c = fCurrentEntity.ch[fCurrentEntity.position++];
@@ -1385,7 +1388,7 @@
length -= delimLen;
}
buffer.append(fCurrentEntity.ch, offset, length);
-
+
// return true if string was skipped
if (DEBUG_BUFFER) {
System.out.print(")scanData: ");
@@ -1394,9 +1397,9 @@
}
} while (!done);
return !done;
-
+
} // scanData(String,XMLString)
-
+
/**
* Skips a character appearing immediately on the input.
*
@@ -1416,13 +1419,13 @@
print();
System.out.println();
}
-
+
// load more characters, if needed
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
}
-
+
// skip character
int cc = fCurrentEntity.ch[fCurrentEntity.position];
if (cc == c) {
@@ -1459,7 +1462,7 @@
}
return true;
}
-
+
// character was not skipped
if (DEBUG_BUFFER) {
System.out.print(")skipChar, '"+(char)c+"': ");
@@ -1467,9 +1470,9 @@
System.out.println(" -> false");
}
return false;
-
+
} // skipChar(int):boolean
-
+
public boolean isSpace(char ch){
return (ch == ' ') || (ch == '\n') || (ch == '\t') || (ch == '\r');
}
@@ -1498,7 +1501,7 @@
invokeListeners(0);
load(0, true);
}
-
+
//we are doing this check only in skipSpace() because it is called by
//fMiscDispatcher and we want the parser to exit gracefully when document
//is well-formed.
@@ -1508,7 +1511,7 @@
if(fCurrentEntity == null){
return false ;
}
-
+
// skip spaces
int c = fCurrentEntity.ch[fCurrentEntity.position];
if (XMLChar.isSpace(c)) {
@@ -1544,22 +1547,22 @@
if (!entityChanged){
fCurrentEntity.position++;
}
-
+
if (fCurrentEntity.position == fCurrentEntity.count) {
invokeListeners(0);
load(0, true);
-
+
//we are doing this check only in skipSpace() because it is called by
//fMiscDispatcher and we want the parser to exit gracefully when document
//is well-formed.
-
+
//it is possible that end of document is reached and
//fCurrentEntity becomes null
//nothing was read so entity changed 'false' should be returned.
if(fCurrentEntity == null){
return true ;
}
-
+
}
} while (XMLChar.isSpace(c = fCurrentEntity.ch[fCurrentEntity.position]));
if (DEBUG_BUFFER) {
@@ -1569,7 +1572,7 @@
}
return true;
}
-
+
// no spaces were found
if (DEBUG_BUFFER) {
System.out.print(")skipSpaces: ");
@@ -1577,10 +1580,10 @@
System.out.println(" -> false");
}
return false;
-
+
} // skipSpaces():boolean
-
-
+
+
/**
* @param legnth This function checks that following number of characters are available.
* to the underlying buffer.
@@ -1589,7 +1592,7 @@
public boolean arrangeCapacity(int length) throws IOException{
return arrangeCapacity(length, false);
}
-
+
/**
* @param legnth This function checks that following number of characters are available.
* to the underlying buffer.
@@ -1619,7 +1622,7 @@
fCurrentEntity.count = fCurrentEntity.count - fCurrentEntity.position;
fCurrentEntity.position = 0;
}
-
+
if((fCurrentEntity.count - fCurrentEntity.position) < length){
int pos = fCurrentEntity.position;
invokeListeners(pos);
@@ -1634,7 +1637,7 @@
}
}
//load changes the position.. set it back to the point where we started.
-
+
//after loading check again.
if((fCurrentEntity.count - fCurrentEntity.position) >= length) {
return true;
@@ -1642,7 +1645,7 @@
return false;
}
}
-
+
/**
* Skips the specified string appearing immediately on the input.
*
@@ -1657,9 +1660,9 @@
* @throws EOFException Thrown on end of file.
*/
public boolean skipString(String s) throws IOException {
-
+
final int length = s.length();
-
+
//first make sure that required capacity is avaible
if(arrangeCapacity(length, false)){
final int beforeSkip = fCurrentEntity.position ;
@@ -1668,7 +1671,7 @@
System.out.println("skipString,length = " + s + "," + length);
System.out.println("Buffer string to be skipped = " + new String(fCurrentEntity.ch, beforeSkip, length));
}
-
+
//s.charAt() indexes are 0 to 'Length -1' based.
int i = length - 1 ;
//check from reverse
@@ -1680,23 +1683,23 @@
}
}
}
-
+
return false;
} // skipString(String):boolean
-
+
public boolean skipString(char [] s) throws IOException {
-
+
final int length = s.length;
//first make sure that required capacity is avaible
if(arrangeCapacity(length, false)){
int beforeSkip = fCurrentEntity.position ;
int afterSkip = fCurrentEntity.position + length ;
-
+
if(DEBUG_SKIP_STRING){
System.out.println("skipString,length = " + new String(s) + "," + length);
System.out.println("skipString,length = " + new String(s) + "," + length);
}
-
+
for(int i=0;i
* Note: This method is not called for entity references
* appearing as part of attribute values.
- *
+ *
* @param name The name of the general entity.
* @param identifier The resource identifier.
* @param encoding The auto-detected IANA encoding name of the entity
@@ -394,12 +394,12 @@
* internal entities or a document entity that is
* parsed from a java.io.Reader).
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException Thrown by handler to signal an error.
*/
public void startGeneralEntity(String name,
XMLResourceIdentifier identifier,
- String encoding, Augmentations augs)
+ String encoding, Augmentations augs)
throws XNIException {
if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
fDocumentHandler.startGeneralEntity(name, identifier, encoding, augs);
@@ -452,15 +452,15 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startDocument(XMLLocator locator, String encoding,
+ public void startDocument(XMLLocator locator, String encoding,
NamespaceContext namespaceContext, Augmentations augs)
- throws XNIException {
- fNamespaceContext = namespaceContext;
+ throws XNIException {
+ fNamespaceContext = namespaceContext;
- if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
- fDocumentHandler.startDocument(locator, encoding, namespaceContext, augs);
- }
- } // startDocument(XMLLocator,String)
+ if (fDocumentHandler != null && !fOnlyPassPrefixMappingEvents) {
+ fDocumentHandler.startDocument(locator, encoding, namespaceContext, augs);
+ }
+ } // startDocument(XMLLocator,String)
/**
* Notifies of the presence of an XMLDecl line in the document. If
@@ -684,10 +684,10 @@
*
* Note: This method is not called for entity references
* appearing as part of attribute values.
- *
+ *
* @param name The name of the entity.
* @param augs Additional information that may include infoset augmentations
- *
+ *
* @exception XNIException
* Thrown by handler to signal an error.
*/
@@ -715,7 +715,7 @@
new Object[]{element.rawname},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
-
+
// search for new namespace bindings
int length = attributes.getLength();
for (int i = 0; i < length; i++) {
@@ -736,7 +736,7 @@
new Object[]{attributes.getQName(i)},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
-
+
// 2. the namespace for "xmlns" can't be bound to any prefix
if (uri == NamespaceContext.XMLNS_URI) {
fErrorReporter.reportError(XMLMessageFormatter.XMLNS_DOMAIN,
@@ -744,7 +744,7 @@
new Object[]{attributes.getQName(i)},
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
-
+
// 3. "xml" can't be bound to any other namespace than it's own
if (localpart == XMLSymbols.PREFIX_XML) {
if (uri != NamespaceContext.XML_URI) {
@@ -883,7 +883,7 @@
// returns true iff the given prefix is bound to "" *and*
// this is disallowed by the version of XML namespaces in use.
protected boolean prefixBoundToNullURI(String uri, String localpart) {
- return (uri == XMLSymbols.EMPTY_STRING && localpart != XMLSymbols.PREFIX_XMLNS);
+ return (uri == XMLSymbols.EMPTY_STRING && localpart != XMLSymbols.PREFIX_XMLNS);
} // prefixBoundToNullURI(String, String): boolean
} // class XMLNamespaceBinder
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLScanner.java Wed May 02 13:32:36 2012 +0100
@@ -71,167 +71,167 @@
*/
public abstract class XMLScanner
implements XMLComponent {
-
+
//
// Constants
//
-
+
// feature identifiers
-
+
/** Feature identifier: namespaces. */
protected static final String NAMESPACES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
+
/** Feature identifier: validation. */
protected static final String VALIDATION =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
+
/** Feature identifier: notify character references. */
protected static final String NOTIFY_CHAR_REFS =
Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;
-
+
// property identifiers
-
- protected static final String PARSER_SETTINGS =
- Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
+
+ protected static final String PARSER_SETTINGS =
+ Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
/** Property identifier: symbol table. */
protected static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: error reporter. */
protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: entity manager. */
protected static final String ENTITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+
// debugging
-
+
/** Debug attribute normalization. */
protected static final boolean DEBUG_ATTR_NORMALIZATION = false;
-
-
+
+
//xxx: setting the default value as false, as we dont need to calculate this value
//we should have a feature when set to true computes this value
private boolean fNeedNonNormalizedValue = false;
-
+
protected ArrayList attributeValueCache = new ArrayList();
protected ArrayList stringBufferCache = new ArrayList();
protected int fStringBufferIndex = 0;
protected boolean fAttributeCacheInitDone = false;
protected int fAttributeCacheUsedCount = 0;
-
+
//
// Data
//
-
+
// features
-
+
/**
* Validation. This feature identifier is:
* http://xml.org/sax/features/validation
*/
protected boolean fValidation = false;
-
+
/** Namespaces. */
protected boolean fNamespaces;
-
+
/** Character references notification. */
protected boolean fNotifyCharRefs = false;
/** Internal parser-settings feature */
- protected boolean fParserSettings = true;
-
+ protected boolean fParserSettings = true;
+
// properties
-
+
protected PropertyManager fPropertyManager = null ;
/** Symbol table. */
protected SymbolTable fSymbolTable;
-
+
/** Error reporter. */
protected XMLErrorReporter fErrorReporter;
-
+
/** Entity manager. */
//protected XMLEntityManager fEntityManager = PropertyManager.getEntityManager();
protected XMLEntityManager fEntityManager = null ;
-
+
/** xxx this should be available from EntityManager Entity storage */
protected XMLEntityStorage fEntityStore = null ;
-
+
// protected data
-
+
/** event type */
protected XMLEvent fEvent ;
-
+
/** Entity scanner, this alwasy works on last entity that was opened. */
protected XMLEntityScanner fEntityScanner = null;
-
+
/** Entity depth. */
protected int fEntityDepth;
-
+
/** Literal value of the last character refence scanned. */
protected String fCharRefLiteral = null;
-
+
/** Scanning attribute. */
protected boolean fScanningAttribute;
-
+
/** Report entity boundary. */
protected boolean fReportEntity;
-
+
// symbols
-
+
/** Symbol: "version". */
protected final static String fVersionSymbol = "version".intern();
-
+
/** Symbol: "encoding". */
protected final static String fEncodingSymbol = "encoding".intern();
-
+
/** Symbol: "standalone". */
protected final static String fStandaloneSymbol = "standalone".intern();
-
+
/** Symbol: "amp". */
protected final static String fAmpSymbol = "amp".intern();
-
+
/** Symbol: "lt". */
protected final static String fLtSymbol = "lt".intern();
-
+
/** Symbol: "gt". */
protected final static String fGtSymbol = "gt".intern();
-
+
/** Symbol: "quot". */
protected final static String fQuotSymbol = "quot".intern();
-
+
/** Symbol: "apos". */
protected final static String fAposSymbol = "apos".intern();
-
+
// temporary variables
-
+
// NOTE: These objects are private to help prevent accidental modification
// of values by a subclass. If there were protected *and* the sub-
// modified the values, it would be difficult to track down the real
// cause of the bug. By making these private, we avoid this
// possibility.
-
+
/** String. */
private XMLString fString = new XMLString();
-
+
/** String buffer. */
private XMLStringBuffer fStringBuffer = new XMLStringBuffer();
-
+
/** String buffer. */
private XMLStringBuffer fStringBuffer2 = new XMLStringBuffer();
-
+
/** String buffer. */
private XMLStringBuffer fStringBuffer3 = new XMLStringBuffer();
-
+
// temporary location for Resource identification information.
protected XMLResourceIdentifierImpl fResourceIdentifier = new XMLResourceIdentifierImpl();
int initialCacheCount = 6;
//
// XMLComponent methods
//
-
+
/**
*
*
@@ -242,24 +242,24 @@
*/
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {
-
- fParserSettings = componentManager.getFeature(PARSER_SETTINGS, true);
+
+ fParserSettings = componentManager.getFeature(PARSER_SETTINGS, true);
- if (!fParserSettings) {
- // parser settings have not been changed
- init();
- return;
- }
+ if (!fParserSettings) {
+ // parser settings have not been changed
+ init();
+ return;
+ }
-
+
// Xerces properties
fSymbolTable = (SymbolTable)componentManager.getProperty(SYMBOL_TABLE);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
-
+
//this step is extra because we have separated the storage of entity
fEntityStore = fEntityManager.getEntityStore() ;
-
+
// sax features
fValidation = componentManager.getFeature(VALIDATION, false);
fNamespaces = componentManager.getFeature(NAMESPACES, true);
@@ -267,11 +267,11 @@
init();
} // reset(XMLComponentManager)
-
+
protected void setPropertyManager(PropertyManager propertyManager){
fPropertyManager = propertyManager ;
}
-
+
/**
* Sets the value of a property during parsing.
*
@@ -280,7 +280,7 @@
*/
public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
-
+
// Xerces properties
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
String property =
@@ -298,28 +298,28 @@
//TODO::discuss with neeraj what are his thoughts on passing properties.
//For now use this
}*/
-
+
} // setProperty(String,Object)
-
+
/*
* Sets the feature of the scanner.
*/
public void setFeature(String featureId, boolean value)
throws XMLConfigurationException {
-
+
if (VALIDATION.equals(featureId)) {
fValidation = value;
} else if (NOTIFY_CHAR_REFS.equals(featureId)) {
fNotifyCharRefs = value;
}
}
-
+
/*
* Gets the state of the feature of the scanner.
*/
public boolean getFeature(String featureId)
throws XMLConfigurationException {
-
+
if (VALIDATION.equals(featureId)) {
return fValidation;
} else if (NOTIFY_CHAR_REFS.equals(featureId)) {
@@ -327,11 +327,11 @@
}
throw new XMLConfigurationException(Status.NOT_RECOGNIZED, featureId);
}
-
+
//
// Protected methods
//
-
+
// anybody calling this had better have set Symtoltable!
protected void reset() {
init();
@@ -341,14 +341,14 @@
fNotifyCharRefs = false;
}
-
+
public void reset(PropertyManager propertyManager) {
init();
// Xerces properties
fSymbolTable = (SymbolTable)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
-
+
fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
-
+
fEntityManager = (XMLEntityManager)propertyManager.getProperty(ENTITY_MANAGER);
fEntityStore = fEntityManager.getEntityStore() ;
fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ;
@@ -356,10 +356,10 @@
// DTD preparsing defaults:
fValidation = false;
fNotifyCharRefs = false;
-
+
}
// common scanning methods
-
+
/**
* Scans an XML or text declaration.
*
@@ -387,19 +387,19 @@
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl,
String[] pseudoAttributeValues)
throws IOException, XNIException {
-
+
// pseudo-attribute values
String version = null;
String encoding = null;
String standalone = null;
-
+
// scan pseudo-attributes
final int STATE_VERSION = 0;
final int STATE_ENCODING = 1;
final int STATE_STANDALONE = 2;
final int STATE_DONE = 3;
int state = STATE_VERSION;
-
+
boolean dataFoundForTarget = false;
boolean sawSpace = fEntityScanner.skipSpaces();
while (fEntityScanner.peekChar() != '?') {
@@ -420,7 +420,7 @@
reportFatalError("VersionNotSupported",
new Object[]{version});
}
-
+
if (version.equals("1.1")) {
Entity.ScannedEntity top = fEntityManager.getTopLevelEntity();
if (top != null && (top.version == null || top.version.equals("1.0"))) {
@@ -428,7 +428,7 @@
}
fEntityManager.setScannerVersion(Constants.XML_VERSION_1_1);
}
-
+
} else if (name.equals(fEncodingSymbol)) {
if (!scanningTextDecl) {
reportFatalError("VersionInfoRequired", null);
@@ -503,7 +503,7 @@
if (scanningTextDecl && state != STATE_DONE) {
reportFatalError("MorePseudoAttributes", null);
}
-
+
// If there is no data in the xml or text decl then we fail to report error
// for version or encoding info above.
if (scanningTextDecl) {
@@ -515,23 +515,23 @@
reportFatalError("VersionInfoRequired", null);
}
}
-
+
// end
if (!fEntityScanner.skipChar('?')) {
reportFatalError("XMLDeclUnterminated", null);
}
if (!fEntityScanner.skipChar('>')) {
reportFatalError("XMLDeclUnterminated", null);
-
+
}
-
+
// fill in return array
pseudoAttributeValues[0] = version;
pseudoAttributeValues[1] = encoding;
pseudoAttributeValues[2] = standalone;
-
+
} // scanXMLDeclOrTextDecl(boolean)
-
+
/**
* Scans a pseudo attribute.
*
@@ -550,10 +550,10 @@
public String scanPseudoAttribute(boolean scanningTextDecl,
XMLString value)
throws IOException, XNIException {
-
+
String name = fEntityScanner.scanName();
// XMLEntityManager.print(fEntityManager.getCurrentEntity());
-
+
if (name == null) {
reportFatalError("PseudoAttrNameExpected", null);
}
@@ -597,12 +597,12 @@
: "CloseQuoteMissingInXMLDecl",
new Object[]{name});
}
-
+
// return
return name;
-
+
} // scanPseudoAttribute(XMLString):String
-
+
/**
* Scans a processing instruction.
*
@@ -616,22 +616,22 @@
//NOW: scanPI(XMLStringBuffer)
//it makes things more easy if XMLStringBUffer is passed. Motivation for this change is same
// as that for scanContent()
-
+
protected void scanPI(XMLStringBuffer data) throws IOException, XNIException {
-
+
// target
fReportEntity = false;
String target = fEntityScanner.scanName();
if (target == null) {
reportFatalError("PITargetRequired", null);
}
-
+
// scan data
scanPIData(target, data);
fReportEntity = true;
-
+
} // scanPI(XMLStringBuffer)
-
+
/**
* Scans a processing data. This is needed to handle the situation
* where a document starts with a processing instruction whose
@@ -643,16 +643,16 @@
* @param target The PI target
* @param data The string to fill in with the data
*/
-
+
//CHANGED:
//Earlier:This method uses the fStringBuffer and later buffer values are set to
//the supplied XMLString....
//Now: Changed the signature of this function to pass XMLStringBuffer.. and data would
//be appended to that buffer
-
+
protected void scanPIData(String target, XMLStringBuffer data)
throws IOException, XNIException {
-
+
// check target
if (target.length() == 3) {
char c0 = Character.toLowerCase(target.charAt(0));
@@ -662,7 +662,7 @@
reportFatalError("ReservedPITarget", null);
}
}
-
+
// spaces
if (!fEntityScanner.skipSpaces()) {
if (fEntityScanner.skipString("?>")) {
@@ -673,7 +673,7 @@
reportFatalError("SpaceRequiredInPI", null);
}
}
-
+
// since scanData appends the parsed data to the buffer passed
// a while loop would append the whole of parsed data to the buffer(data:XMLStringBuffer)
//until all of the data is buffered.
@@ -691,9 +691,9 @@
}
} while (fEntityScanner.scanData("?>", data));
}
-
+
} // scanPIData(String,XMLString)
-
+
/**
* Scans a comment.
*
@@ -709,17 +709,17 @@
*/
protected void scanComment(XMLStringBuffer text)
throws IOException, XNIException {
-
+
//System.out.println( "XMLScanner#scanComment# In Scan Comment" );
// text
// REVISIT: handle invalid character, eof
text.clear();
while (fEntityScanner.scanData("--", text)) {
int c = fEntityScanner.peekChar();
-
+
//System.out.println( "XMLScanner#scanComment#text.toString() == " + text.toString() );
//System.out.println( "XMLScanner#scanComment#c == " + c );
-
+
if (c != -1) {
if (XMLChar.isHighSurrogate(c)) {
scanSurrogates(text);
@@ -734,9 +734,9 @@
if (!fEntityScanner.skipChar('>')) {
reportFatalError("DashDashInComment", null);
}
-
+
} // scanComment()
-
+
/**
* Scans an attribute value and normalizes whitespace converting all
* whitespace characters to space characters.
@@ -767,10 +767,10 @@
if (quote != '\'' && quote != '"') {
reportFatalError("OpenQuoteExpected", new Object[]{atName});
}
-
+
fEntityScanner.scanChar();
int entityDepth = fEntityDepth;
-
+
int c = fEntityScanner.scanLiteral(quote, value);
if (DEBUG_ATTR_NORMALIZATION) {
System.out.println("** scanLiteral -> \""
@@ -810,7 +810,7 @@
ch = scanCharReferenceValue(stringBuffer, fStringBuffer2);
else
ch = scanCharReferenceValue(stringBuffer, null);
-
+
if (ch != -1) {
if (DEBUG_ATTR_NORMALIZATION) {
System.out.println("** value3: \""
@@ -951,15 +951,15 @@
}
if(fNeedNonNormalizedValue)
nonNormalizedValue.setValues(fStringBuffer2);
-
+
// quote
int cquote = fEntityScanner.scanChar();
if (cquote != quote) {
reportFatalError("CloseQuoteExpected", new Object[]{atName});
}
} // scanAttributeValue()
-
-
+
+
/**
* Scans External ID and return the public and system IDs.
*
@@ -973,7 +973,7 @@
protected void scanExternalID(String[] identifiers,
boolean optionalSystemId)
throws IOException, XNIException {
-
+
String systemId = null;
String publicId = null;
if (fEntityScanner.skipString("PUBLIC")) {
@@ -982,12 +982,12 @@
}
scanPubidLiteral(fString);
publicId = fString.toString();
-
+
if (!fEntityScanner.skipSpaces() && !optionalSystemId) {
reportFatalError("SpaceRequiredBetweenPublicAndSystem", null);
}
}
-
+
if (publicId != null || fEntityScanner.skipString("SYSTEM")) {
if (publicId == null && !fEntityScanner.skipSpaces()) {
reportFatalError("SpaceRequiredAfterSYSTEM", null);
@@ -1025,13 +1025,13 @@
reportFatalError("SystemIDUnterminated", null);
}
}
-
+
// store result in array
identifiers[0] = systemId;
identifiers[1] = publicId;
}
-
-
+
+
/**
* Scans public ID literal.
*
@@ -1058,7 +1058,7 @@
reportFatalError("QuoteRequiredInPublicID", null);
return false;
}
-
+
fStringBuffer.clear();
// skip leading whitespace
boolean skipSpace = true;
@@ -1092,8 +1092,8 @@
}
return dataok;
}
-
-
+
+
/**
* Normalize whitespace in an XMLString converting all whitespace
* characters to space characters.
@@ -1112,11 +1112,11 @@
i++;
}
}
-
+
//
// XMLEntityHandler methods
//
-
+
/**
* This method notifies of the start of an entity. The document entity
* has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]"
@@ -1136,14 +1136,14 @@
public void startEntity(String name,
XMLResourceIdentifier identifier,
String encoding, Augmentations augs) throws XNIException {
-
+
// keep track of the entity depth
fEntityDepth++;
// must reset entity scanner
fEntityScanner = fEntityManager.getEntityScanner();
fEntityStore = fEntityManager.getEntityStore() ;
} // startEntity(String,XMLResourceIdentifier,String)
-
+
/**
* This method notifies the end of an entity. The document entity has
* the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]"
@@ -1155,12 +1155,12 @@
* @throws XNIException Thrown by handler to signal an error.
*/
public void endEntity(String name, Augmentations augs) throws IOException, XNIException {
-
+
// keep track of the entity depth
fEntityDepth--;
-
+
} // endEntity(String)
-
+
/**
* Scans a character reference and append the corresponding chars to the
* specified buffer.
@@ -1187,7 +1187,7 @@
hex = true;
fStringBuffer3.clear();
boolean digit = true;
-
+
int c = fEntityScanner.peekChar();
digit = (c >= '0' && c <= '9') ||
(c >= 'a' && c <= 'f') ||
@@ -1196,7 +1196,7 @@
if (buf2 != null) { buf2.append((char)c); }
fEntityScanner.scanChar();
fStringBuffer3.append((char)c);
-
+
do {
c = fEntityScanner.peekChar();
digit = (c >= '0' && c <= '9') ||
@@ -1212,19 +1212,19 @@
reportFatalError("HexdigitRequiredInCharRef", null);
}
}
-
+
// scan decimal value
else {
fStringBuffer3.clear();
boolean digit = true;
-
+
int c = fEntityScanner.peekChar();
digit = c >= '0' && c <= '9';
if (digit) {
if (buf2 != null) { buf2.append((char)c); }
fEntityScanner.scanChar();
fStringBuffer3.append((char)c);
-
+
do {
c = fEntityScanner.peekChar();
digit = c >= '0' && c <= '9';
@@ -1238,19 +1238,19 @@
reportFatalError("DigitRequiredInCharRef", null);
}
}
-
+
// end
if (!fEntityScanner.skipChar(';')) {
reportFatalError("SemicolonRequiredInCharRef", null);
}
if (buf2 != null) { buf2.append(';'); }
-
+
// convert string to number
int value = -1;
try {
value = Integer.parseInt(fStringBuffer3.toString(),
hex ? 16 : 10);
-
+
// character reference must be a valid XML character
if (isInvalid(value)) {
StringBuffer errorBuf = new StringBuffer(fStringBuffer3.length + 1);
@@ -1268,7 +1268,7 @@
reportFatalError("InvalidCharRef",
new Object[]{errorBuf.toString()});
}
-
+
// append corresponding chars to the given buffer
if (!XMLChar.isSupplemental(value)) {
buf.append((char) value);
@@ -1277,7 +1277,7 @@
buf.append(XMLChar.highSurrogate(value));
buf.append(XMLChar.lowSurrogate(value));
}
-
+
// char refs notification code
if (fNotifyCharRefs && value != -1) {
String literal = "#" + (hex ? "x" : "") + fStringBuffer3.toString();
@@ -1285,7 +1285,7 @@
fCharRefLiteral = literal;
}
}
-
+
return value;
}
// returns true if the given character is not
@@ -1294,39 +1294,39 @@
protected boolean isInvalid(int value) {
return (XMLChar.isInvalid(value));
} // isInvalid(int): boolean
-
+
// returns true if the given character is not
// valid or may not be used outside a character reference
// with respect to the version of XML understood by this scanner.
protected boolean isInvalidLiteral(int value) {
return (XMLChar.isInvalid(value));
} // isInvalidLiteral(int): boolean
-
+
// returns true if the given character is
// a valid nameChar with respect to the version of
// XML understood by this scanner.
protected boolean isValidNameChar(int value) {
return (XMLChar.isName(value));
} // isValidNameChar(int): boolean
-
+
// returns true if the given character is
// a valid NCName character with respect to the version of
// XML understood by this scanner.
protected boolean isValidNCName(int value) {
return (XMLChar.isNCName(value));
} // isValidNCName(int): boolean
-
+
// returns true if the given character is
// a valid nameStartChar with respect to the version of
// XML understood by this scanner.
protected boolean isValidNameStartChar(int value) {
return (XMLChar.isNameStart(value));
} // isValidNameStartChar(int): boolean
-
+
protected boolean versionSupported(String version ) {
return version.equals("1.0") || version.equals("1.1");
} // version Supported
-
+
/**
* Scans surrogates and append them to the specified buffer.
*
@@ -1338,7 +1338,7 @@
*/
protected boolean scanSurrogates(XMLStringBuffer buf)
throws IOException, XNIException {
-
+
int high = fEntityScanner.scanChar();
int low = fEntityScanner.peekChar();
if (!XMLChar.isLowSurrogate(low)) {
@@ -1347,26 +1347,26 @@
return false;
}
fEntityScanner.scanChar();
-
+
// convert surrogates to supplemental character
int c = XMLChar.supplemental((char)high, (char)low);
-
+
// supplemental character must be a valid XML character
if (isInvalid(c)) {
reportFatalError("InvalidCharInContent",
new Object[]{Integer.toString(c, 16)});
return false;
}
-
+
// fill in the buffer
buf.append((char)high);
buf.append((char)low);
-
+
return true;
-
+
} // scanSurrogates():boolean
-
-
+
+
/**
* Convenience function used in all XML scanners.
*/
@@ -1376,11 +1376,11 @@
msgId, args,
XMLErrorReporter.SEVERITY_FATAL_ERROR);
}
-
+
// private methods
private void init() {
// initialize scanner
- fEntityScanner = null;
+ fEntityScanner = null;
// initialize vars
fEntityDepth = 0;
fReportEntity = true;
@@ -1395,9 +1395,9 @@
}
fStringBufferIndex = 0;
fAttributeCacheUsedCount = 0;
-
+
}
-
+
XMLStringBuffer getStringBuffer(){
if((fStringBufferIndex < initialCacheCount )|| (fStringBufferIndex < stringBufferCache.size())){
return (XMLStringBuffer)stringBufferCache.get(fStringBufferIndex++);
@@ -1408,6 +1408,6 @@
return tmpObj;
}
}
-
-
+
+
} // class XMLScanner
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/XMLStreamReaderImpl.java Wed May 02 13:32:36 2012 +0100
@@ -72,42 +72,42 @@
* @author Sunitha Reddy Sun Microsystems,Inc.
*/
public class XMLStreamReaderImpl implements javax.xml.stream.XMLStreamReader {
-
+
/** Property identifier: entity manager. */
protected static final String ENTITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+
/** Property identifier: Error Reporter. */
protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: Symbol table. */
protected static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
protected static final String READER_IN_DEFINED_STATE =
Constants.READER_IN_DEFINED_STATE;
-
+
private SymbolTable fSymbolTable = new SymbolTable();
-
+
/** Document scanner. */
protected XMLDocumentScannerImpl fScanner = new XMLNSDocumentScannerImpl();
-
+
//make Global NamespaceContextWrapper object, fScanner.getNamespaceContext() is dynamic object and ita value changes
//as per the state of the parser.
protected NamespaceContextWrapper fNamespaceContextWrapper = new NamespaceContextWrapper((NamespaceSupport)fScanner.getNamespaceContext()) ;
protected XMLEntityManager fEntityManager = new XMLEntityManager();
protected StaxErrorReporter fErrorReporter = new StaxErrorReporter();
-
-
+
+
/** Entity scanner, this alwasy works on last entity that was opened. */
protected XMLEntityScanner fEntityScanner = null;
-
+
/** Input Source */
protected XMLInputSource fInputSource = null;
/** Store properties*/
protected PropertyManager fPropertyManager = null ;
-
+
/** current event type */
private int fEventType ;
/** debug flag*/
@@ -118,7 +118,7 @@
private boolean fBindNamespaces = true;
private String fDTDDecl = null;
private String versionStr = null;
-
+
/**
* @param inputStream
* @param props
@@ -131,7 +131,7 @@
//pass the input source to document scanner impl.
setInputSource(inputSource);
}
-
+
public XMLDocumentScannerImpl getScanner(){
System.out.println("returning scanner");
return fScanner;
@@ -148,8 +148,8 @@
//pass the input source to document scanner impl.
setInputSource(inputSource);
}
-
-
+
+
/**
* @param inputStream
* @param encoding
@@ -163,7 +163,7 @@
//pass the input source to document scanner impl.
setInputSource(inputSource);
}
-
+
/**
* @param reader
* @param props
@@ -177,7 +177,7 @@
//pass the input source to document scanner impl.
setInputSource(inputSource);
}
-
+
/**
* @param inputSource
* @param props
@@ -188,7 +188,7 @@
//pass the input source to document scanner impl.
setInputSource(inputSource);
}
-
+
/**
* @param inputSource
* @throws XMLStreamException
@@ -198,20 +198,20 @@
//this instances is free for reuse if parser has reached END_DOCUMENT state or application has
//called close()
fReuse = false;
-
+
try{
-
+
fScanner.setInputSource(inputSource) ;
//XMLStreamReader should be in defined state
if(fReaderInDefinedState){
fEventType = fScanner.next();
if (versionStr == null)
versionStr = getVersion();
-
+
if (fEventType == XMLStreamConstants.START_DOCUMENT && versionStr != null && versionStr.equals("1.1")){
switchToXML11Scanner();
}
-
+
}
}catch(java.io.IOException ex){
throw new XMLStreamException(ex);
@@ -219,7 +219,7 @@
throw new XMLStreamException(ex.getMessage(), getLocation(), ex.getException());
}
}//setInputSource
-
+
void init(PropertyManager propertyManager) throws XMLStreamException {
fPropertyManager = propertyManager;
//set Stax internal properties -- Note that these instances are being created in XMLReaderImpl.
@@ -236,7 +236,7 @@
//4.
reset();
}
-
+
/** This function tells if this instances is available for reuse.
* One must call reset() and setInputSource() to be able to reuse
* this instance.
@@ -250,7 +250,7 @@
//fReuse is set to 'true' when application calls close()
return fReuse;
}
-
+
/**
* Resets this instance so that this instance is ready for reuse.
*/
@@ -271,8 +271,8 @@
fBindNamespaces = ((Boolean)fPropertyManager.getProperty(XMLInputFactory.IS_NAMESPACE_AWARE)).booleanValue();
versionStr = null;
}
-
-
+
+
/** Frees any resources associated with this Reader. This method does not close the underlying input source.
* @throws XMLStreamException if there are errors freeing associated resources
*/
@@ -281,45 +281,45 @@
//reset();
fReuse = true ;
}
-
-
+
+
/** Returns the character encoding declared on the xml declaration Returns null if none was declared
* @return the encoding declared in the document or null
*/
public String getCharacterEncodingScheme() {
return fScanner.getCharacterEncodingScheme();
-
+
}
-
-
+
+
/**
* @return
*/
public int getColumnNumber() {
return fEntityScanner.getColumnNumber();
}//getColumnNumber
-
+
/** Return input encoding if known or null if unknown.
* @return the encoding of this instance or null
*/
public String getEncoding() {
return fEntityScanner.getEncoding();
}//getEncoding
-
+
/** Returns the current value of the parse event as a string, this returns the string value of a CHARACTERS event, returns the value of a COMMENT, the replacement value for an ENTITY_REFERENCE, the string value of a CDATA section, the string value for a SPACE event, or the String value of the internal subset of the DTD. If an ENTITY_REFERENCE has been resolved, any character data will be reported as CHARACTERS events.
* @return the current text or null
*/
public int getEventType() {
return fEventType ;
}//getEventType
-
+
/**
* @return
*/
public int getLineNumber() {
return fEntityScanner.getLineNumber() ;
}//getLineNumber
-
+
public String getLocalName() {
if(fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.END_ELEMENT){
//xxx check whats the value of fCurrentElement
@@ -331,7 +331,7 @@
throw new IllegalStateException("Method getLocalName() cannot be called for " +
getEventTypeString(fEventType) + " event.");
}//getLocalName()
-
+
/**
* @return
*/
@@ -342,11 +342,11 @@
}
return null ;
}//getNamespaceURI
-
+
/** Get the data section of a processing instruction
* @return the data or null
*/
-
+
public String getPIData() {
if( fEventType == XMLEvent.PROCESSING_INSTRUCTION){
return fScanner.getPIData().toString();
@@ -354,8 +354,8 @@
else throw new java.lang.IllegalStateException("Current state of the parser is " + getEventTypeString(fEventType) +
" But Expected state is " + XMLEvent.PROCESSING_INSTRUCTION ) ;
}//getPIData
-
-
+
+
/** Get the target of a processing instruction
* @return the target or null
*/
@@ -365,13 +365,13 @@
}
else throw new java.lang.IllegalStateException("Current state of the parser is " + getEventTypeString(fEventType) +
" But Expected state is " + XMLEvent.PROCESSING_INSTRUCTION ) ;
-
+
}//getPITarget
-
-
+
+
/**
- * @return the prefix of the current event, or null if the event does
- * not have a prefix. For START_ELEMENT and END_ELEMENT, return
+ * @return the prefix of the current event, or null if the event does
+ * not have a prefix. For START_ELEMENT and END_ELEMENT, return
* XMLConstants.DEFAULT_NS_PREFIX when no prefix is available.
*/
public String getPrefix() {
@@ -381,9 +381,9 @@
}
return null ;
}//getPrefix()
-
-
-
+
+
+
/**
* @return
*/
@@ -398,7 +398,7 @@
+ " , " + getEventTypeString(XMLEvent.SPACE) +" valid for getTextCharacters() " ) ;
}
}
-
+
/**
* @return
*/
@@ -407,14 +407,14 @@
|| fEventType == XMLEvent.CDATA || fEventType == XMLEvent.SPACE){
return fScanner.getCharacterData().length;
} else{
- throw new IllegalStateException("Current state = " + getEventTypeString(fEventType)
- + " is not among the states " + getEventTypeString(XMLEvent.CHARACTERS) + " , "
- + getEventTypeString(XMLEvent.COMMENT) + " , " + getEventTypeString(XMLEvent.CDATA)
+ throw new IllegalStateException("Current state = " + getEventTypeString(fEventType)
+ + " is not among the states " + getEventTypeString(XMLEvent.CHARACTERS) + " , "
+ + getEventTypeString(XMLEvent.COMMENT) + " , " + getEventTypeString(XMLEvent.CDATA)
+ " , " + getEventTypeString(XMLEvent.SPACE) +" valid for getTextLength() " ) ;
}
-
+
}
-
+
/**
* @return
*/
@@ -428,7 +428,7 @@
+ " , " + getEventTypeString(XMLEvent.SPACE) +" valid for getTextStart() " ) ;
}
}
-
+
/**
* @return
*/
@@ -444,19 +444,25 @@
}
return null;
}//getValue()
-
+
/** Get the XML language version of the current document being parsed */
public String getVersion() {
- return fEntityScanner.getXMLVersion();
+ //apply SAP's patch: the default version in the scanner was set to 1.0 because of DOM and SAX
+ //so this patch is a workaround of the difference between StAX and DOM
+ // SAPJVM: Return null if the XML version has not been declared (as specified in the JavaDoc).
+
+ String version = fEntityScanner.getXMLVersion();
+
+ return "1.0".equals(version) && !fEntityScanner.xmlVersionSetExplicitly ? null : version;
}
-
+
/**
* @return
*/
public boolean hasAttributes() {
return fScanner.getAttributeIterator().getLength() > 0 ? true : false ;
}
-
+
/** this Funtion returns true if the current event has name */
public boolean hasName() {
if(fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.END_ELEMENT) {
@@ -465,7 +471,7 @@
return false;
}
}//hasName()
-
+
/**
* @throws XMLStreamException
* @return
@@ -473,11 +479,11 @@
public boolean hasNext() throws XMLStreamException {
//the scanner returns -1 when it detects a broken stream
if (fEventType == -1) return false;
- //we can check in scanners if the scanner state is not set to
+ //we can check in scanners if the scanner state is not set to
//terminating, we still have more events.
return fEventType != XMLEvent.END_DOCUMENT;
}
-
+
/**
* @return
*/
@@ -489,30 +495,30 @@
} else {
return false;
}
-
+
}
-
+
/**
* @return
*/
public boolean isEndElement() {
return fEventType == XMLEvent.END_ELEMENT;
}
-
+
/**
* @return
*/
public boolean isStandalone() {
return fScanner.isStandAlone();
}
-
+
/**
* @return
*/
public boolean isStartElement() {
return fEventType == XMLEvent.START_ELEMENT;
}
-
+
/**
* Returns true if the cursor points to a character data event that consists of all whitespace
* Application calling this method needs to cache the value and avoid calling this method again
@@ -533,9 +539,9 @@
}
return false;
}
-
-
-
+
+
+
/**
* @throws XMLStreamException
* @return
@@ -544,8 +550,8 @@
if( !hasNext() ) {
if (fEventType != -1) {
throw new java.util.NoSuchElementException( "END_DOCUMENT reached: no more elements on the stream." );
- } else {
- throw new XMLStreamException( "Error processing input source. The input stream is not complete." );
+ } else {
+ throw new XMLStreamException( "Error processing input source. The input stream is not complete." );
}
}
try {
@@ -570,7 +576,7 @@
XMLInputFactory.IS_VALIDATING);
if (isValidating != null
&& !isValidating.booleanValue()) {
- // ignore the error, set scanner to known state
+ // ignore the error, set scanner to known state
fEventType = XMLEvent.DTD;
fScanner.setScannerState(fScanner.SCANNER_STATE_PROLOG);
fScanner.setDriver(fScanner.fPrologDriver);
@@ -597,26 +603,26 @@
} //next()
private void switchToXML11Scanner() throws IOException{
-
+
int oldEntityDepth = fScanner.fEntityDepth;
com.sun.org.apache.xerces.internal.xni.NamespaceContext oldNamespaceContext = fScanner.fNamespaceContext;
-
+
fScanner = new XML11NSDocumentScannerImpl();
-
+
//get the new scanner state to old scanner's previous state
fScanner.reset(fPropertyManager);
fScanner.setPropertyManager(fPropertyManager);
fEntityScanner = (XMLEntityScanner)fEntityManager.getEntityScanner() ;
fEntityManager.fCurrentEntity.mayReadChunks = true;
fScanner.setScannerState(XMLEvent.START_DOCUMENT);
-
+
fScanner.fEntityDepth = oldEntityDepth;
fScanner.fNamespaceContext = oldNamespaceContext;
fEventType = fScanner.next();
}
-
-
-
+
+
+
final static String getEventTypeString(int eventType) {
switch (eventType){
case XMLEvent.START_ELEMENT:
@@ -646,7 +652,7 @@
}
return "UNKNOWN_EVENT_TYPE, " + String.valueOf(eventType);
}
-
+
/** Returns the count of attributes on this START_ELEMENT,
* this method is only valid on a START_ELEMENT or ATTRIBUTE. This
* count excludes namespace definitions. Attribute indices are
@@ -657,18 +663,18 @@
public int getAttributeCount() {
//xxx: recognize SAX properties namespace, namespace-prefix to get XML Namespace declarations
//does length includes namespace declarations ?
-
+
//State should be either START_ELEMENT or ATTRIBUTE
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return fScanner.getAttributeIterator().getLength() ;
} else{
- throw new java.lang.IllegalStateException( "Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException( "Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeCount()") ;
}
}//getAttributeCount
-
+
/** Returns the localName of the attribute at the provided
* index
* @param index the position of the attribute
@@ -680,13 +686,13 @@
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return convertXNIQNametoJavaxQName(fScanner.getAttributeIterator().getQualifiedName(index)) ;
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeName()") ;
}
}//getAttributeName
-
+
/**
* @param index
* @return
@@ -699,7 +705,7 @@
throw new java.lang.IllegalStateException() ;
}
}//getAttributeName
-
+
/** Returns the namespace of the attribute at the provided
* index
* @param index the position of the attribute
@@ -711,14 +717,14 @@
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return fScanner.getAttributeIterator().getURI(index);
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeNamespace()") ;
}
-
+
}//getAttributeNamespace
-
+
/** Returns the prefix of this attribute at the
* provided index
* @param index the position of the attribute
@@ -730,13 +736,13 @@
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return fScanner.getAttributeIterator().getPrefix(index);
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributePrefix()") ;
}
}//getAttributePrefix
-
+
/** Returns the qname of the attribute at the provided index
*
* @param index the position of the attribute
@@ -751,13 +757,13 @@
String uri = fScanner.getAttributeIterator().getURI(index) ;
return new javax.xml.namespace.QName(uri, localName) ;
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeQName()") ;
}
}//getAttributeQName
-
+
/** Returns the XML type of the attribute at the provided
* index
* @param index the position of the attribute
@@ -769,14 +775,14 @@
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return fScanner.getAttributeIterator().getType(index) ;
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeType()") ;
}
-
+
}//getAttributeType
-
+
/** Returns the value of the attribute at the
* index
* @param index the position of the attribute
@@ -788,14 +794,14 @@
if( fEventType == XMLEvent.START_ELEMENT || fEventType == XMLEvent.ATTRIBUTE) {
return fScanner.getAttributeIterator().getValue(index) ;
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeValue()") ;
}
-
+
}//getAttributeValue
-
+
/**
* @param namespaceURI
* @param localName
@@ -811,16 +817,16 @@
return fScanner.getAttributeIterator().getValue(
namespaceURI.length() == 0 ? null : namespaceURI, localName) ;
}
-
+
} else{
- throw new java.lang.IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new java.lang.IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for getAttributeValue()") ;
}
-
+
}
-
+
/** Reads the content of a text-only element. Precondition:
* the current event is START_ELEMENT. Postcondition:
* The current event is the corresponding END_ELEMENT.
@@ -828,7 +834,7 @@
* a non text element is encountered
*/
public String getElementText() throws XMLStreamException {
-
+
if(getEventType() != XMLStreamConstants.START_ELEMENT) {
throw new XMLStreamException(
"parser must be on START_ELEMENT to read next text", getLocation());
@@ -857,7 +863,7 @@
}
return content.toString();
}
-
+
/** Return the current location of the processor.
* If the Location is unknown the processor should return
* an implementation of Location that returns -1 for the
@@ -871,31 +877,31 @@
String _publicId = fEntityScanner.getPublicId();
int _offset = fEntityScanner.getCharacterOffset();
int _columnNumber = fEntityScanner.getColumnNumber();
- int _lineNumber = fEntityScanner.getLineNumber();
+ int _lineNumber = fEntityScanner.getLineNumber();
public String getLocationURI(){
return _systemId;
}
-
+
public int getCharacterOffset(){
return _offset;
}
-
+
public int getColumnNumber() {
return _columnNumber;
}
-
+
public int getLineNumber(){
return _lineNumber;
}
-
+
public String getPublicId(){
return _publicId;
}
-
+
public String getSystemId(){
return _systemId;
}
-
+
public String toString(){
StringBuffer sbuffer = new StringBuffer() ;
sbuffer.append("Line number = " + getLineNumber());
@@ -913,9 +919,9 @@
return sbuffer.toString();
}
} ;
-
+
}
-
+
/** Returns a QName for the current START_ELEMENT or END_ELEMENT event
* @return the QName for the current START_ELEMENT or END_ELEMENT event
*/
@@ -928,7 +934,7 @@
+ " Valid states are " + getEventTypeString(XMLEvent.START_ELEMENT) + ", "
+ getEventTypeString(XMLEvent.END_ELEMENT));
}
-
+
/** Returns a read only namespace context for the current
* position. The context is transient and only valid until
* a call to next() changes the state of the reader.
@@ -937,7 +943,7 @@
public NamespaceContext getNamespaceContext() {
return fNamespaceContextWrapper ;
}
-
+
/** Returns the count of namespaces declared on this START_ELEMENT or END_ELEMENT,
* this method is only valid on a START_ELEMENT, END_ELEMENT or NAMESPACE. On
* an END_ELEMENT the count is of the namespaces that are about to go
@@ -959,7 +965,7 @@
+ " valid for getNamespaceCount()." );
}
}
-
+
/** Returns the prefix for the namespace declared at the
* index. Returns null if this is the default namespace
* declaration
@@ -982,7 +988,7 @@
+ " valid for getNamespacePrefix()." );
}
}
-
+
/** Returns the uri for the namespace declared at the
* index.
*
@@ -1002,9 +1008,9 @@
+ getEventTypeString(XMLEvent.NAMESPACE)
+ " valid for getNamespaceURI()." );
}
-
+
}
-
+
/** Get the value of a feature/property from the underlying implementation
* @param name The name of the property, may not be null
* @return The value of the property
@@ -1022,7 +1028,7 @@
}
return null;
}
-
+
/** Returns the current value of the parse event as a string,
* this returns the string value of a CHARACTERS event,
* returns the value of a COMMENT, the replacement value
@@ -1033,7 +1039,7 @@
* a valid text state.
*/
public String getText() {
- if( fEventType == XMLEvent.CHARACTERS || fEventType == XMLEvent.COMMENT
+ if( fEventType == XMLEvent.CHARACTERS || fEventType == XMLEvent.COMMENT
|| fEventType == XMLEvent.CDATA || fEventType == XMLEvent.SPACE){
//this requires creation of new string
//fEventType == XMLEvent.ENTITY_REFERENCE
@@ -1043,13 +1049,12 @@
if(name != null){
if(fScanner.foundBuiltInRefs)
return fScanner.getCharacterData().toString();
-
+
XMLEntityStorage entityStore = fEntityManager.getEntityStore();
- Hashtable ht = entityStore.getDeclaredEntities();
- Entity en = (Entity)ht.get(name);
- if(en == null)
- return null;
- if(en.isExternal())
+ Entity en = entityStore.getEntity(name);
+ if(en == null)
+ return null;
+ if(en.isExternal())
return ((Entity.ExternalEntity)en).entityLocation.getExpandedSystemId();
else
return ((Entity.InternalEntity)en).text;
@@ -1064,7 +1069,7 @@
fDTDDecl = tmpBuffer.toString();
return fDTDDecl;
} else{
- throw new IllegalStateException("Current state " + getEventTypeString(fEventType)
+ throw new IllegalStateException("Current state " + getEventTypeString(fEventType)
+ " is not among the states" + getEventTypeString(XMLEvent.CHARACTERS) + ", "
+ getEventTypeString(XMLEvent.COMMENT) + ", "
+ getEventTypeString(XMLEvent.CDATA) + ", "
@@ -1073,8 +1078,8 @@
+ getEventTypeString(XMLEvent.DTD) + " valid for getText() " ) ;
}
}//getText
-
-
+
+
/** Test if the current event is of the given type and if the namespace and name match the current namespace and name of the current event.
* If the namespaceURI is null it is not checked for equality, if the localName is null it is not checked for equality.
* @param type the event type
@@ -1094,7 +1099,7 @@
"current local name");
return;
}
-
+
/** Gets the the text associated with a CHARACTERS, SPACE or CDATA event.
* Text starting a "sourceStart" is copied into "destination" starting at "targetStart".
* Up to "length" characters are copied. The number of characters actually copied is returned.
@@ -1132,16 +1137,16 @@
* @throws NullPointerException is if target is null
*/
public int getTextCharacters(int sourceStart, char[] target, int targetStart, int length) throws XMLStreamException {
-
+
if(target == null){
throw new NullPointerException("target char array can't be null") ;
}
-
+
if(targetStart < 0 || length < 0 || sourceStart < 0 || targetStart >= target.length ||
(targetStart + length ) > target.length) {
throw new IndexOutOfBoundsException();
}
-
+
//getTextStart() + sourceStart should not be greater than the lenght of number of characters
//present
int copiedLength = 0;
@@ -1156,11 +1161,11 @@
} else{
copiedLength = length;
}
-
+
System.arraycopy(getTextCharacters(), getTextStart() + sourceStart , target, targetStart, copiedLength);
return copiedLength;
}
-
+
/** Return true if the current event has text, false otherwise
* The following events have text:
* CHARACTERS,DTD ,ENTITY_REFERENCE, COMMENT
@@ -1174,10 +1179,9 @@
if(name != null){
if(fScanner.foundBuiltInRefs)
return true;
-
+
XMLEntityStorage entityStore = fEntityManager.getEntityStore();
- Hashtable ht = entityStore.getDeclaredEntities();
- Entity en =(Entity)ht.get(name);
+ Entity en = entityStore.getEntity(name);
if(en == null)
return false;
if(en.isExternal()){
@@ -1193,7 +1197,7 @@
}
return false;
}
-
+
/** Returns a boolean which indicates if this
* attribute was created by default
* @param index the position of the attribute
@@ -1205,20 +1209,20 @@
if( (fEventType == XMLEvent.START_ELEMENT) || (fEventType == XMLEvent.ATTRIBUTE)){
return fScanner.getAttributeIterator().isSpecified(index) ;
} else{
- throw new IllegalStateException("Current state is not among the states "
- + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ throw new IllegalStateException("Current state is not among the states "
+ + getEventTypeString(XMLEvent.START_ELEMENT) + " , "
+ getEventTypeString(XMLEvent.ATTRIBUTE)
+ "valid for isAttributeSpecified()") ;
}
}
-
+
/** Returns true if the cursor points to a character data event
* @return true if the cursor points to character data, false otherwise
*/
public boolean isCharacters() {
return fEventType == XMLEvent.CHARACTERS ;
}
-
+
/** Skips any insignificant events (COMMENT and PROCESSING_INSTRUCTION)
* until a START_ELEMENT or
* END_ELEMENT is reached. If other than space characters are
@@ -1230,7 +1234,7 @@
* @throws XMLStreamException if the current event is not white space
*/
public int nextTag() throws XMLStreamException {
-
+
int eventType = next();
while((eventType == XMLStreamConstants.CHARACTERS && isWhiteSpace()) // skip whitespace
|| (eventType == XMLStreamConstants.CDATA && isWhiteSpace())
@@ -1252,7 +1256,7 @@
return eventType;
}
-
+
/** Checks if standalone was set in the document
* @return true if standalone was set in the document, or false otherwise
*/
@@ -1261,7 +1265,7 @@
// is standalone
return fScanner.standaloneSet() ;
}
-
+
/**
* @param qname
* @return
@@ -1275,7 +1279,7 @@
return new javax.xml.namespace.QName(qname.uri, qname.localpart, qname.prefix) ;
}
}
-
+
/** Return the uri for the given prefix.
* The uri returned depends on the current state of the processor.
*
@@ -1291,11 +1295,11 @@
*/
public String getNamespaceURI(String prefix) {
if(prefix == null) throw new java.lang.IllegalArgumentException("prefix cannot be null.") ;
-
+
//first add the string to symbol table.. since internally identity comparisons are done.
return fScanner.getNamespaceContext().getURI(fSymbolTable.addSymbol(prefix)) ;
}
-
+
//xxx: this function is not being used.
protected void setPropertyManager(PropertyManager propertyManager){
fPropertyManager = propertyManager ;
@@ -1303,30 +1307,29 @@
fScanner.setProperty("stax-properties",propertyManager);
fScanner.setPropertyManager(propertyManager) ;
}
-
+
/**
* @return returns the reference to property manager.
*/
protected PropertyManager getPropertyManager(){
return fPropertyManager ;
}
-
+
static void pr(String str) {
System.out.println(str) ;
}
-
+
protected List getEntityDecls(){
if(fEventType == XMLStreamConstants.DTD){
XMLEntityStorage entityStore = fEntityManager.getEntityStore();
- Hashtable ht = entityStore.getDeclaredEntities();
ArrayList list = null;
- if(ht != null){
+ if(entityStore.hasEntities()){
EntityDeclarationImpl decl = null;
- list = new ArrayList(ht.size());
- Enumeration enu = ht.keys();
+ list = new ArrayList(entityStore.getEntitySize());
+ Enumeration enu = entityStore.getEntityKeys();
while(enu.hasMoreElements()){
String key = (String)enu.nextElement();
- Entity en = (Entity)ht.get(key);
+ Entity en = (Entity)entityStore.getEntity(key);
decl = new EntityDeclarationImpl();
decl.setEntityName(key);
if(en.isExternal()){
@@ -1342,14 +1345,14 @@
}
return null;
}
-
+
protected List getNotationDecls(){
if(fEventType == XMLStreamConstants.DTD){
if(fScanner.fDTDScanner == null) return null;
DTDGrammar grammar = ((XMLDTDScannerImpl)(fScanner.fDTDScanner)).getGrammar();
if(grammar == null) return null;
List notations = grammar.getNotationDecls();
-
+
Iterator it = notations.iterator();
ArrayList list = new ArrayList();
while(it.hasNext()){
@@ -1362,7 +1365,7 @@
}
return null;
}
-
-
-
+
+
+
}//XMLReaderImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/BalancedDTDGrammar.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/BalancedDTDGrammar.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/BalancedDTDGrammar.java Wed May 02 13:32:36 2012 +0100
@@ -1,289 +1,288 @@
-/*
- * reserved comment block
- * DO NOT REMOVE OR ALTER!
- */
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.sun.org.apache.xerces.internal.impl.dtd;
-
-import com.sun.org.apache.xerces.internal.util.SymbolTable;
-import com.sun.org.apache.xerces.internal.xni.Augmentations;
-import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler;
-import com.sun.org.apache.xerces.internal.xni.XNIException;
-
-/**
- * A DTD grammar that produces balanced syntax trees. A DTD grammar that produces balanced syntax trees.
* Note: Upstream work insures that this class will never see
- * a content model with PCDATA in it. Any model with PCDATA is 'mixed'
- * and is handled via the MixedContentModel class since mixed models
- * are very constrained in form and easily handled via a special case.
+ * a content model with PCDATA in it. Any model with PCDATA is 'mixed'
+ * and is handled via the MixedContentModel class since mixed models
+ * are very constrained in form and easily handled via a special case.
* This also makes implementation of this class much easier.
- *
+ *
* @xerces.internal
- *
+ *
* @version $Id: DFAContentModel.java,v 1.4 2010/08/06 23:49:43 joehw Exp $
*/
public class DFAContentModel
@@ -458,17 +458,17 @@
// for that matter.)
//
- /* MODIFIED (Jan, 2001)
- *
- * Use following rules.
- * nullable(x+) := nullable(x), first(x+) := first(x), last(x+) := last(x)
- * nullable(x?) := true, first(x?) := first(x), last(x?) := last(x)
- *
- * The same computation of follow as x* is applied to x+
- *
- * The modification drastically reduces computation time of
- * "(a, (b, a+, (c, (b, a+)+, a+, (d, (c, (b, a+)+, a+)+, (b, a+)+, a+)+)+)+)+"
- */
+ /* MODIFIED (Jan, 2001)
+ *
+ * Use following rules.
+ * nullable(x+) := nullable(x), first(x+) := first(x), last(x+) := last(x)
+ * nullable(x?) := true, first(x?) := first(x), last(x?) := last(x)
+ *
+ * The same computation of follow as x* is applied to x+
+ *
+ * The modification drastically reduces computation time of
+ * "(a, (b, a+, (c, (b, a+)+, a+, (d, (c, (b, a+)+, a+)+, (b, a+)+, a+)+)+)+)+"
+ */
fQName.setValues(null, fEOCString, fEOCString, null);
CMLeaf nodeEOC = new CMLeaf(fQName);
@@ -567,27 +567,27 @@
fLeafNameTypeVector.setValues(fElemMap, fElemMapType, fElemMapSize);
}
- /***
- * Optimization(Jan, 2001); We sort fLeafList according to
- * elemIndex which is *uniquely* associated to each leaf.
- * We are *assuming* that each element appears in at least one leaf.
- **/
+ /***
+ * Optimization(Jan, 2001); We sort fLeafList according to
+ * elemIndex which is *uniquely* associated to each leaf.
+ * We are *assuming* that each element appears in at least one leaf.
+ **/
- int[] fLeafSorter = new int[fLeafCount + fElemMapSize];
- int fSortCount = 0;
+ int[] fLeafSorter = new int[fLeafCount + fElemMapSize];
+ int fSortCount = 0;
- for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
- for (int leafIndex = 0; leafIndex < fLeafCount; leafIndex++) {
- final QName leaf = fLeafList[leafIndex].getElement();
- final QName element = fElemMap[elemIndex];
- if (leaf.rawname == element.rawname) {
- fLeafSorter[fSortCount++] = leafIndex;
- }
- }
- fLeafSorter[fSortCount++] = -1;
- }
+ for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++) {
+ for (int leafIndex = 0; leafIndex < fLeafCount; leafIndex++) {
+ final QName leaf = fLeafList[leafIndex].getElement();
+ final QName element = fElemMap[elemIndex];
+ if (leaf.rawname == element.rawname) {
+ fLeafSorter[fSortCount++] = leafIndex;
+ }
+ }
+ fLeafSorter[fSortCount++] = -1;
+ }
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
//
// Next lets create some arrays, some that that hold transient
@@ -633,13 +633,13 @@
statesToDo[curState] = setT;
curState++;
- /* Optimization(Jan, 2001); This is faster for
- * a large content model such as, "(t001+|t002+|.... |t500+)".
- */
+ /* Optimization(Jan, 2001); This is faster for
+ * a large content model such as, "(t001+|t002+|.... |t500+)".
+ */
HashMap stateTable = new HashMap();
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
//
// Ok, almost done with the algorithm... We now enter the
@@ -663,9 +663,9 @@
// Loop through each possible input symbol in the element map
CMStateSet newSet = null;
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
int sorterIndex = 0;
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
for (int elemIndex = 0; elemIndex < fElemMapSize; elemIndex++)
{
//
@@ -679,11 +679,11 @@
else
newSet.zeroBits();
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
int leafIndex = fLeafSorter[sorterIndex++];
while (leafIndex != -1) {
- // If this leaf index (DFA position) is in the current set...
+ // If this leaf index (DFA position) is in the current set...
if (setT.getBit(leafIndex))
{
//
@@ -695,8 +695,8 @@
}
leafIndex = fLeafSorter[sorterIndex++];
- }
- /* Optimization(Jan, 2001) */
+ }
+ /* Optimization(Jan, 2001) */
//
// If this new set is not empty, then see if its in the list
@@ -709,10 +709,10 @@
// state set is already in there.
//
- /* Optimization(Jan, 2001) */
- Integer stateObj = (Integer)stateTable.get(newSet);
- int stateIndex = (stateObj == null ? curState : stateObj.intValue());
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
+ Integer stateObj = (Integer)stateTable.get(newSet);
+ int stateIndex = (stateObj == null ? curState : stateObj.intValue());
+ /* Optimization(Jan, 2001) */
// If we did not find it, then add it
if (stateIndex == curState)
@@ -725,9 +725,9 @@
statesToDo[curState] = newSet;
fTransTable[curState] = makeDefStateList();
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
stateTable.put(newSet, new Integer(curState));
- /* Optimization(Jan, 2001) */
+ /* Optimization(Jan, 2001) */
// We now have a new state to do so bump the count
curState++;
@@ -863,7 +863,7 @@
}
/***/
else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
- || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
+ || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE)
{
// Recurse first
calcFollowList(((CMUniOp)nodeCur).getChild());
@@ -1005,8 +1005,8 @@
curIndex = postTreeBuildInit(((CMBinOp)nodeCur).getRight(), curIndex);
}
else if (nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE
- || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE
- || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
+ || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE
+ || nodeCur.type() == XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE)
{
curIndex = postTreeBuildInit(((CMUniOp)nodeCur).getChild(), curIndex);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/DTDDVFactory.java Wed May 02 13:32:36 2012 +0100
@@ -21,6 +21,7 @@
package com.sun.org.apache.xerces.internal.impl.dv;
import java.util.Hashtable;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
/**
* The factory to create and return DTD types. The implementation should
@@ -31,6 +32,7 @@
*
* @author Sandy Gao, IBM
*
+ * @version $Id: DTDDVFactory.java,v 1.6 2010-11-01 04:39:43 joehw Exp $
*/
public abstract class DTDDVFactory {
@@ -60,7 +62,7 @@
try {
// if the class name is not specified, use the default one
return (DTDDVFactory)
- (ObjectFactory.newInstance(factoryClass, ObjectFactory.findClassLoader(), true));
+ (ObjectFactory.newInstance(factoryClass, true));
} catch (ClassCastException e) {
throw new DVFactoryException("DTD factory class " + factoryClass + " does not extend from DTDDVFactory.");
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/SchemaDVFactory.java Wed May 02 13:32:36 2012 +0100
@@ -22,6 +22,7 @@
import com.sun.org.apache.xerces.internal.util.SymbolHash;
import com.sun.org.apache.xerces.internal.xs.XSObjectList;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
/**
* Defines a factory API that enables applications to
@@ -39,6 +40,7 @@
*
* @author Sandy Gao, IBM
*
+ * @version $Id: SchemaDVFactory.java,v 1.6 2010-11-01 04:39:43 joehw Exp $
*/
public abstract class SchemaDVFactory {
@@ -68,8 +70,7 @@
try {
// if the class name is not specified, use the default one
- return (SchemaDVFactory)(ObjectFactory.newInstance(
- factoryClass, ObjectFactory.findClassLoader(), true));
+ return (SchemaDVFactory)(ObjectFactory.newInstance(factoryClass, true));
} catch (ClassCastException e4) {
throw new DVFactoryException("Schema factory class " + factoryClass + " does not extend from SchemaDVFactory.");
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/ValidationContext.java Wed May 02 13:32:36 2012 +0100
@@ -25,8 +25,8 @@
/**
* ValidationContext has all the information required for the
* validation of: id, idref, entity, notation, qname
- *
- * @xerces.internal
+ *
+ * @xerces.internal
*
* @author Sandy Gao, IBM
* @version $Id: ValidationContext.java,v 1.6 2010/07/23 02:09:29 joehw Exp $
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/util/ByteListImpl.java Wed May 02 13:32:36 2012 +0100
@@ -27,10 +27,10 @@
/**
* Implementation of This class only knows how to make XSDHandler do its thing.
* The caller must ensure that all its properties (schemaLocation, JAXPSchemaSource
* etc.) have been properly set.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Neil Graham, IBM
* @version $Id: XMLSchemaLoader.java,v 1.10 2010-11-01 04:39:55 joehw Exp $
*/
public class XMLSchemaLoader implements XMLGrammarLoader, XMLComponent,
-// XML Component API
+// XML Component API
XSLoader, DOMConfiguration {
-
+
// Feature identifiers:
-
+
/** Feature identifier: schema full checking*/
protected static final String SCHEMA_FULL_CHECKING =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
+
/** Feature identifier: continue after fatal error. */
protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
+
/** Feature identifier: allow java encodings to be recognized when parsing schema docs. */
protected static final String ALLOW_JAVA_ENCODINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-
+
/** Feature identifier: standard uri conformant feature. */
protected static final String STANDARD_URI_CONFORMANT_FEATURE =
Constants.XERCES_FEATURE_PREFIX + Constants.STANDARD_URI_CONFORMANT_FEATURE;
-
+
/** Feature identifier: validate annotations. */
protected static final String VALIDATE_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
-
+
/** Feature: disallow doctype*/
- protected static final String DISALLOW_DOCTYPE =
+ protected static final String DISALLOW_DOCTYPE =
Constants.XERCES_FEATURE_PREFIX + Constants.DISALLOW_DOCTYPE_DECL_FEATURE;
-
+
/** Feature: generate synthetic annotations */
- protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
+ protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
-
+
/** Feature identifier: honour all schemaLocations */
- protected static final String HONOUR_ALL_SCHEMALOCATIONS =
+ protected static final String HONOUR_ALL_SCHEMALOCATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.HONOUR_ALL_SCHEMALOCATIONS_FEATURE;
-
- protected static final String AUGMENT_PSVI =
+
+ protected static final String AUGMENT_PSVI =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_AUGMENT_PSVI;
-
- protected static final String PARSER_SETTINGS =
+
+ protected static final String PARSER_SETTINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
/** Feature identifier: namespace growth */
@@ -154,65 +154,68 @@
protected static final String SCHEMA_DV_FACTORY =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_DV_FACTORY_PROPERTY;
+ protected static final String USE_SERVICE_MECHANISM = Constants.ORACLE_FEATURE_SERVICE_MECHANISM;
+
// recognized features:
private static final String[] RECOGNIZED_FEATURES = {
SCHEMA_FULL_CHECKING,
AUGMENT_PSVI,
CONTINUE_AFTER_FATAL_ERROR,
ALLOW_JAVA_ENCODINGS,
- STANDARD_URI_CONFORMANT_FEATURE,
+ STANDARD_URI_CONFORMANT_FEATURE,
DISALLOW_DOCTYPE,
GENERATE_SYNTHETIC_ANNOTATIONS,
VALIDATE_ANNOTATIONS,
HONOUR_ALL_SCHEMALOCATIONS,
NAMESPACE_GROWTH,
- TOLERATE_DUPLICATES
+ TOLERATE_DUPLICATES,
+ USE_SERVICE_MECHANISM
};
-
+
// property identifiers
-
+
/** Property identifier: symbol table. */
public static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: error reporter. */
public static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: error handler. */
protected static final String ERROR_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
+
/** Property identifier: entity resolver. */
public static final String ENTITY_RESOLVER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
+
/** Property identifier: grammar pool. */
public static final String XMLGRAMMAR_POOL =
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
-
+
/** Property identifier: schema location. */
protected static final String SCHEMA_LOCATION =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_LOCATION;
-
+
/** Property identifier: no namespace schema location. */
protected static final String SCHEMA_NONS_LOCATION =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_NONS_LOCATION;
-
+
/** Property identifier: JAXP schema source. */
protected static final String JAXP_SCHEMA_SOURCE =
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE;
-
+
protected static final String SECURITY_MANAGER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
+ Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
/** Property identifier: locale. */
protected static final String LOCALE =
Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY;
-
+
protected static final String ENTITY_MANAGER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
+
// recognized properties
private static final String [] RECOGNIZED_PROPERTIES = {
ENTITY_MANAGER,
@@ -228,9 +231,9 @@
LOCALE,
SCHEMA_DV_FACTORY
};
-
+
// Data
-
+
// features and properties
private ParserConfigurationSettings fLoaderConfig = new ParserConfigurationSettings();
private SymbolTable fSymbolTable = null;
@@ -240,7 +243,7 @@
private XMLGrammarPool fGrammarPool = null;
private String fExternalSchemas = null;
private String fExternalNoNSSchema = null;
- // JAXP property: schema source
+ // JAXP property: schema source
private Object fJAXPSource = null;
// is Schema Full Checking enabled
private boolean fIsCheckedFully = false;
@@ -248,7 +251,7 @@
private boolean fJAXPProcessed = false;
// if features/properties has not been changed, the value of this attribute is "false"
private boolean fSettingsChanged = true;
-
+
// xml schema parsing
private XSDHandler fSchemaHandler;
private XSGrammarBucket fGrammarBucket;
@@ -257,30 +260,30 @@
private final CMNodeFactory fNodeFactory = new CMNodeFactory(); //component mgr will be set later
private CMBuilder fCMBuilder;
private XSDDescription fXSDDescription = new XSDDescription();
-
+
private Map fJAXPCache;
private Locale fLocale = Locale.getDefault();
-
+
// XSLoader attributes
private DOMStringList fRecognizedParameters = null;
-
+
/** DOM L3 error handler */
private DOMErrorHandlerWrapper fErrorHandler = null;
-
+
/** DOM L3 resource resolver */
private DOMEntityResolverWrapper fResourceResolver = null;
-
+
// default constructor. Create objects we absolutely need:
public XMLSchemaLoader() {
this( new SymbolTable(), null, new XMLEntityManager(), null, null, null);
}
-
+
public XMLSchemaLoader(SymbolTable symbolTable) {
this( symbolTable, null, new XMLEntityManager(), null, null, null);
}
-
+
/**
- * This constractor is used by the XMLSchemaValidator. Additional properties, i.e. XMLEntityManager,
+ * This constractor is used by the XMLSchemaValidator. Additional properties, i.e. XMLEntityManager,
* will be passed during reset(XMLComponentManager).
* @param errorReporter
* @param grammarBucket
@@ -292,26 +295,26 @@
SubstitutionGroupHandler sHandler, CMBuilder builder) {
this(null, errorReporter, null, grammarBucket, sHandler, builder);
}
-
+
XMLSchemaLoader(SymbolTable symbolTable,
XMLErrorReporter errorReporter,
XMLEntityManager entityResolver,
XSGrammarBucket grammarBucket,
SubstitutionGroupHandler sHandler,
CMBuilder builder) {
-
+
// store properties and features in configuration
fLoaderConfig.addRecognizedFeatures(RECOGNIZED_FEATURES);
- fLoaderConfig.addRecognizedProperties(RECOGNIZED_PROPERTIES);
- if (symbolTable != null){
- fLoaderConfig.setProperty(SYMBOL_TABLE, symbolTable);
+ fLoaderConfig.addRecognizedProperties(RECOGNIZED_PROPERTIES);
+ if (symbolTable != null){
+ fLoaderConfig.setProperty(SYMBOL_TABLE, symbolTable);
}
-
+
if(errorReporter == null) {
errorReporter = new XMLErrorReporter ();
errorReporter.setLocale(fLocale);
errorReporter.setProperty(ERROR_HANDLER, new DefaultErrorHandler());
-
+
}
fErrorReporter = errorReporter;
// make sure error reporter knows about schemas...
@@ -319,15 +322,15 @@
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
}
fLoaderConfig.setProperty(ERROR_REPORTER, fErrorReporter);
- fEntityManager = entityResolver;
- // entity manager is null if XMLSchemaValidator creates the loader
- if (fEntityManager != null){
+ fEntityManager = entityResolver;
+ // entity manager is null if XMLSchemaValidator creates the loader
+ if (fEntityManager != null){
fLoaderConfig.setProperty(ENTITY_MANAGER, fEntityManager);
}
-
+
// by default augment PSVI (i.e. don't use declaration pool)
fLoaderConfig.setFeature(AUGMENT_PSVI, true);
-
+
if(grammarBucket == null ) {
grammarBucket = new XSGrammarBucket();
}
@@ -336,7 +339,7 @@
sHandler = new SubstitutionGroupHandler(fGrammarBucket);
}
fSubGroupHandler = sHandler;
-
+
if(builder == null) {
builder = new CMBuilder(fNodeFactory);
}
@@ -346,10 +349,10 @@
fDeclPool.reset();
}
fJAXPCache = new HashMap();
-
+
fSettingsChanged = true;
}
-
+
/**
* Returns a list of feature identifiers that are recognized by
* this XMLGrammarLoader. This method may return null if no features
@@ -358,7 +361,7 @@
public String[] getRecognizedFeatures() {
return (String[])(RECOGNIZED_FEATURES.clone());
} // getRecognizedFeatures(): String[]
-
+
/**
* Returns the state of a feature.
*
@@ -367,10 +370,10 @@
* @throws XMLConfigurationException Thrown on configuration error.
*/
public boolean getFeature(String featureId)
- throws XMLConfigurationException {
- return fLoaderConfig.getFeature(featureId);
+ throws XMLConfigurationException {
+ return fLoaderConfig.getFeature(featureId);
} // getFeature (String): boolean
-
+
/**
* Sets the state of a feature.
*
@@ -382,16 +385,16 @@
*/
public void setFeature(String featureId,
boolean state) throws XMLConfigurationException {
- fSettingsChanged = true;
+ fSettingsChanged = true;
if(featureId.equals(CONTINUE_AFTER_FATAL_ERROR)) {
fErrorReporter.setFeature(CONTINUE_AFTER_FATAL_ERROR, state);
- }
+ }
else if(featureId.equals(GENERATE_SYNTHETIC_ANNOTATIONS)) {
fSchemaHandler.setGenerateSyntheticAnnotations(state);
}
fLoaderConfig.setFeature(featureId, state);
} // setFeature(String, boolean)
-
+
/**
* Returns a list of property identifiers that are recognized by
* this XMLGrammarLoader. This method may return null if no properties
@@ -400,7 +403,7 @@
public String[] getRecognizedProperties() {
return (String[])(RECOGNIZED_PROPERTIES.clone());
} // getRecognizedProperties(): String[]
-
+
/**
* Returns the state of a property.
*
@@ -412,7 +415,7 @@
throws XMLConfigurationException {
return fLoaderConfig.getProperty(propertyId);
} // getProperty(String): Object
-
+
/**
* Sets the state of a property.
*
@@ -423,16 +426,16 @@
* recognized or cannot be set.
*/
public void setProperty(String propertyId,
- Object state) throws XMLConfigurationException {
+ Object state) throws XMLConfigurationException {
fSettingsChanged = true;
- fLoaderConfig.setProperty(propertyId, state);
+ fLoaderConfig.setProperty(propertyId, state);
if (propertyId.equals(JAXP_SCHEMA_SOURCE)) {
fJAXPSource = state;
fJAXPProcessed = false;
- }
+ }
else if (propertyId.equals(XMLGRAMMAR_POOL)) {
fGrammarPool = (XMLGrammarPool)state;
- }
+ }
else if (propertyId.equals(SCHEMA_LOCATION)) {
fExternalSchemas = (String)state;
}
@@ -452,7 +455,7 @@
}
}
} // setProperty(String, Object)
-
+
/**
* Set the locale to use for messages.
*
@@ -465,12 +468,12 @@
fLocale = locale;
fErrorReporter.setLocale(locale);
} // setLocale(Locale)
-
+
/** Return the Locale the XMLGrammarLoader is using. */
public Locale getLocale() {
return fLocale;
} // getLocale(): Locale
-
+
/**
* Sets the error handler.
*
@@ -479,12 +482,12 @@
public void setErrorHandler(XMLErrorHandler errorHandler) {
fErrorReporter.setProperty(ERROR_HANDLER, errorHandler);
} // setErrorHandler(XMLErrorHandler)
-
+
/** Returns the registered error handler. */
public XMLErrorHandler getErrorHandler() {
return fErrorReporter.getErrorHandler();
} // getErrorHandler(): XMLErrorHandler
-
+
/**
* Sets the entity resolver.
*
@@ -495,30 +498,30 @@
fLoaderConfig.setProperty(ENTITY_RESOLVER, entityResolver);
fEntityManager.setProperty(ENTITY_RESOLVER, entityResolver);
} // setEntityResolver(XMLEntityResolver)
-
+
/** Returns the registered entity resolver. */
public XMLEntityResolver getEntityResolver() {
return fUserEntityResolver;
} // getEntityResolver(): XMLEntityResolver
-
+
/**
* Returns a Grammar object by parsing the contents of the
* entities pointed to by sources.
- *
- * @param source[] the locations of the entity which forms
+ *
+ * @param source[] the locations of the entity which forms
* the staring point of the grammars to be constructed
* @throws IOException when a problem is encounted reading the entity
* @throws XNIException when a condition arises (such as a FatalError) that requires parsing
* of the entity be terminated
*/
- public void loadGrammar(XMLInputSource source[])
+ public void loadGrammar(XMLInputSource source[])
throws IOException, XNIException {
int numSource = source.length;
for (int i = 0; i < numSource; ++i) {
loadGrammar(source[i]);
- }
+ }
}
-
+
/**
* Returns a Grammar object by parsing the contents of the
* entity pointed to by source.
@@ -531,11 +534,11 @@
*/
public Grammar loadGrammar(XMLInputSource source)
throws IOException, XNIException {
-
- // REVISIT: this method should have a namespace parameter specified by
+
+ // REVISIT: this method should have a namespace parameter specified by
// user. In this case we can easily detect if a schema asked to be loaded
// is already in the local cache.
-
+
reset(fLoaderConfig);
fSettingsChanged = false;
XSDDescription desc = new XSDDescription();
@@ -550,7 +553,7 @@
processExternalHints(fExternalSchemas, fExternalNoNSSchema,
locationPairs, fErrorReporter);
SchemaGrammar grammar = loadSchema(desc, source, locationPairs);
-
+
if(grammar != null && fGrammarPool != null) {
fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA, fGrammarBucket.getGrammars());
// NOTE: we only need to verify full checking in case the schema was not provided via JAXP
@@ -561,11 +564,11 @@
}
return grammar;
} // loadGrammar(XMLInputSource): Grammar
-
+
/**
* This method is called either from XMLGrammarLoader.loadGrammar or from XMLSchemaValidator.
* Note: in either case, the EntityManager (or EntityResolvers) are not going to be invoked
- * to resolve the location of the schema in XSDDescription
+ * to resolve the location of the schema in XSDDescription
* @param desc
* @param source
* @param locationPairs
@@ -576,17 +579,17 @@
SchemaGrammar loadSchema(XSDDescription desc,
XMLInputSource source,
Map locationPairs) throws IOException, XNIException {
-
+
// this should only be done once per invocation of this object;
// unless application alters JAXPSource in the mean time.
if(!fJAXPProcessed) {
processJAXPSchemaSource(locationPairs);
}
SchemaGrammar grammar = fSchemaHandler.parseSchema(source, desc, locationPairs);
-
+
return grammar;
} // loadSchema(XSDDescription, XMLInputSource): SchemaGrammar
-
+
/** This method tries to resolve location of the given schema.
* The loader stores the namespace/location pairs in a hashtable (use "" as the
* namespace of absent namespace). When resolving an entity, loader first tries
@@ -613,7 +616,7 @@
if(tempLA != null)
loc = tempLA.getFirstLocation();
}
-
+
// if it's not import, or if the target namespace is not set
// in the schema location properties, use location hint
if (loc == null) {
@@ -621,13 +624,13 @@
if (hints != null && hints.length > 0)
loc = hints[0];
}
-
+
String expandedLoc = XMLEntityManager.expandSystemId(loc, desc.getBaseSystemId(), false);
desc.setLiteralSystemId(loc);
desc.setExpandedSystemId(expandedLoc);
return entityResolver.resolveEntity(desc);
}
-
+
// add external schema locations to the location pairs
public static void processExternalHints(String sl, String nsl,
Map locations,
@@ -655,7 +658,7 @@
XMLErrorReporter.SEVERITY_WARNING);
}
}
-
+
if (nsl != null) {
try {
// similarly for no ns schema location property
@@ -703,7 +706,7 @@
}
return true;
} // tokenizeSchemaLocation(String, HashMap): boolean
-
+
/**
* Translate the various JAXP SchemaSource property types to XNI
* XMLInputSource. Valid types are: String, org.xml.sax.InputSource,
@@ -712,14 +715,14 @@
* should be available to imported schemas. I have assumed
* that it should. - NG
* Note: all JAXP schema files will be checked for full-schema validity if the feature was set up
- *
+ *
*/
private void processJAXPSchemaSource(Map locationPairs) throws IOException {
fJAXPProcessed = true;
if (fJAXPSource == null) {
return;
}
-
+
Class componentType = fJAXPSource.getClass().getComponentType();
XMLInputSource xis = null;
String sid = null;
@@ -769,7 +772,7 @@
"}. Possible types of the array supported are Object, String, File, "+
"InputStream, InputSource.");
}
-
+
// JAXP spec. allow []s of type String, File, InputStream,
// InputSource also, apart from [] of type Object.
Object[] objArr = (Object[]) fJAXPSource;
@@ -797,10 +800,10 @@
String targetNamespace = null ;
// load schema
SchemaGrammar grammar = fSchemaHandler.parseSchema(xis,fXSDDescription, locationPairs);
-
+
if(fIsCheckedFully) {
XSConstraints.fullSchemaChecking(fGrammarBucket, fSubGroupHandler, fCMBuilder, fErrorReporter);
- }
+ }
if(grammar != null){
targetNamespace = grammar.getTargetNamespace() ;
if(jaxpSchemaSourceNamespaces.contains(targetNamespace)){
@@ -823,14 +826,14 @@
}
}
}//processJAXPSchemaSource
-
+
private XMLInputSource xsdToXMLInputSource(
Object val)
{
if (val instanceof String) {
// String value is treated as a URI that is passed through the
// EntityResolver
- String loc = (String) val;
+ String loc = (String) val;
fXSDDescription.reset();
fXSDDescription.setValues(null, loc, null, null);
XMLInputSource xis = null;
@@ -870,65 +873,65 @@
"}. Possible types of the value supported are String, File, InputStream, "+
"InputSource OR an array of these types.");
}
-
-
+
+
//Convert a SAX InputSource to an equivalent XNI XMLInputSource
-
+
private static XMLInputSource saxToXMLInputSource(InputSource sis) {
String publicId = sis.getPublicId();
String systemId = sis.getSystemId();
-
+
Reader charStream = sis.getCharacterStream();
if (charStream != null) {
return new XMLInputSource(publicId, systemId, null, charStream,
null);
}
-
+
InputStream byteStream = sis.getByteStream();
if (byteStream != null) {
return new XMLInputSource(publicId, systemId, null, byteStream,
sis.getEncoding());
}
-
+
return new XMLInputSource(publicId, systemId, null);
}
-
+
static class LocationArray{
-
+
int length ;
String [] locations = new String[2];
-
+
public void resize(int oldLength , int newLength){
String [] temp = new String[newLength] ;
System.arraycopy(locations, 0, temp, 0, Math.min(oldLength, newLength));
locations = temp ;
length = Math.min(oldLength, newLength);
}
-
+
public void addLocation(String location){
if(length >= locations.length ){
resize(length, Math.max(1, length*2));
}
locations[length++] = location;
}//setLocation()
-
+
public String [] getLocationArray(){
if(length < locations.length ){
resize(locations.length, length);
}
return locations;
}//getLocationArray()
-
+
public String getFirstLocation(){
return length > 0 ? locations[0] : null;
}
-
+
public int getLength(){
return length ;
}
-
+
} //locationArray
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xni.parser.XMLComponent#getFeatureDefault(java.lang.String)
*/
@@ -938,7 +941,7 @@
}
return null;
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xni.parser.XMLComponent#getPropertyDefault(java.lang.String)
*/
@@ -946,16 +949,16 @@
// TODO Auto-generated method stub
return null;
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xni.parser.XMLComponent#reset(com.sun.org.apache.xerces.internal.xni.parser.XMLComponentManager)
*/
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException {
-
+
fGrammarBucket.reset();
-
- fSubGroupHandler.reset();
-
+
+ fSubGroupHandler.reset();
+
boolean parser_settings = componentManager.getFeature(PARSER_SETTINGS, true);
if (!parser_settings || !fSettingsChanged){
@@ -963,17 +966,17 @@
fJAXPProcessed = false;
// reinitialize grammar bucket
initGrammarBucket();
- return;
- }
+ return;
+ }
//pass the component manager to the factory..
fNodeFactory.reset(componentManager);
// get registered entity manager to be able to resolve JAXP schema-source property:
- // Note: in case XMLSchemaValidator has created the loader,
+ // Note: in case XMLSchemaValidator has created the loader,
// the entity manager property is null
- fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
-
+ fEntityManager = (XMLEntityManager)componentManager.getProperty(ENTITY_MANAGER);
+
// get the error reporter
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
@@ -984,7 +987,7 @@
dvFactory = SchemaDVFactory.getInstance();
fSchemaHandler.setDVFactory(dvFactory);
}
-
+
boolean psvi = componentManager.getFeature(AUGMENT_PSVI, false);
if (!psvi) {
@@ -1004,7 +1007,7 @@
fCMBuilder.setDeclPool(null);
fSchemaHandler.setDeclPool(null);
}
-
+
// get schema location properties
try {
fExternalSchemas = (String) componentManager.getProperty(SCHEMA_LOCATION);
@@ -1017,7 +1020,7 @@
// get JAXP sources if available
fJAXPSource = componentManager.getProperty(JAXP_SCHEMA_SOURCE, null);
fJAXPProcessed = false;
-
+
// clear grammars, and put the one for schema namespace there
fGrammarPool = (XMLGrammarPool) componentManager.getProperty(XMLGRAMMAR_POOL, null);
initGrammarBucket();
@@ -1029,14 +1032,14 @@
}
} catch (XMLConfigurationException e) {
}
- // set full validation to false
+ // set full validation to false
fIsCheckedFully = componentManager.getFeature(SCHEMA_FULL_CHECKING, false);
-
+
// get generate-synthetic-annotations feature
fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false));
fSchemaHandler.reset(componentManager);
}
-
+
private void initGrammarBucket(){
if(fGrammarPool != null) {
Grammar [] initialGrammars = fGrammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA);
@@ -1053,15 +1056,15 @@
}
}
}
-
-
+
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xs.XSLoader#getConfig()
*/
public DOMConfiguration getConfig() {
return this;
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xs.XSLoader#load(org.w3c.dom.ls.LSInput)
*/
@@ -1074,7 +1077,7 @@
return null;
}
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xs.XSLoader#loadInputList(com.sun.org.apache.xerces.internal.xs.DOMInputList)
*/
@@ -1091,7 +1094,7 @@
}
return new XSModelImpl(gs);
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xs.XSLoader#loadURI(java.lang.String)
*/
@@ -1105,7 +1108,7 @@
return null;
}
}
-
+
/* (non-Javadoc)
* @see com.sun.org.apache.xerces.internal.xs.XSLoader#loadURIList(com.sun.org.apache.xerces.internal.xs.StringList)
*/
@@ -1123,7 +1126,7 @@
}
return new XSModelImpl(gs);
}
-
+
void reportDOMFatalError(Exception e) {
if (fErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl();
@@ -1133,7 +1136,7 @@
fErrorHandler.getErrorHandler().handleError(error);
}
}
-
+
/* (non-Javadoc)
* @see DOMConfiguration#canSetParameter(String, Object)
*/
@@ -1148,11 +1151,12 @@
name.equals(GENERATE_SYNTHETIC_ANNOTATIONS) ||
name.equals(HONOUR_ALL_SCHEMALOCATIONS) ||
name.equals(NAMESPACE_GROWTH) ||
- name.equals(TOLERATE_DUPLICATES)) {
+ name.equals(TOLERATE_DUPLICATES) ||
+ name.equals(USE_SERVICE_MECHANISM)) {
return true;
-
+
}
- return false;
+ return false;
}
if (name.equals(Constants.DOM_ERROR_HANDLER) ||
name.equals(Constants.DOM_RESOURCE_RESOLVER) ||
@@ -1169,19 +1173,19 @@
}
return false;
}
-
+
/* (non-Javadoc)
* @see DOMConfiguration#getParameter(String)
*/
public Object getParameter(String name) throws DOMException {
-
+
if (name.equals(Constants.DOM_ERROR_HANDLER)){
return (fErrorHandler != null) ? fErrorHandler.getErrorHandler() : null;
}
else if (name.equals(Constants.DOM_RESOURCE_RESOLVER)) {
return (fResourceResolver != null) ? fResourceResolver.getEntityResolver() : null;
}
-
+
try {
boolean feature = getFeature(name);
return (feature) ? Boolean.TRUE : Boolean.FALSE;
@@ -1200,7 +1204,7 @@
}
}
}
-
+
/* (non-Javadoc)
* @see DOMConfiguration#getParameterNames()
*/
@@ -1227,11 +1231,12 @@
v.add(HONOUR_ALL_SCHEMALOCATIONS);
v.add(NAMESPACE_GROWTH);
v.add(TOLERATE_DUPLICATES);
- fRecognizedParameters = new DOMStringListImpl(v);
+ v.add(USE_SERVICE_MECHANISM);
+ fRecognizedParameters = new DOMStringListImpl(v);
}
return fRecognizedParameters;
}
-
+
/* (non-Javadoc)
* @see DOMConfiguration#setParameter(String, Object)
*/
@@ -1270,14 +1275,14 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
return;
-
+
}
if (name.equals(Constants.DOM_RESOURCE_RESOLVER)) {
if (value instanceof LSResourceResolver) {
try {
fResourceResolver = new DOMEntityResolverWrapper((LSResourceResolver) value);
setEntityResolver(fResourceResolver);
- }
+ }
catch (XMLConfigurationException e) {}
} else {
// REVISIT: type mismatch
@@ -1290,33 +1295,33 @@
}
return;
}
-
+
try {
setProperty(name, value);
} catch (Exception ex) {
-
+
String msg =
DOMMessageFormatter.formatMessage(
DOMMessageFormatter.DOM_DOMAIN,
"FEATURE_NOT_SUPPORTED",
new Object[] { name });
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
-
+
}
-
+
}
-
- XMLInputSource dom2xmlInputSource(LSInput is) {
+
+ XMLInputSource dom2xmlInputSource(LSInput is) {
// need to wrap the LSInput with an XMLInputSource
XMLInputSource xis = null;
-
+
/**
* An LSParser looks at inputs specified in LSInput in
* the following order: characterStream, byteStream,
* stringData, systemId, publicId. For consistency
* have the same behaviour for XSLoader.
*/
-
+
// check whether there is a Reader
// according to DOM, we need to treat such reader as "UTF-16".
if (is.getCharacterStream() != null) {
@@ -1342,9 +1347,8 @@
xis = new XMLInputSource(is.getPublicId(), is.getSystemId(),
is.getBaseURI());
}
-
+
return xis;
}
-
+
} // XMLGrammarLoader
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java Wed May 02 13:32:36 2012 +0100
@@ -100,8 +100,8 @@
* An implementation of XSLoader which wraps XMLSchemaLoader. Parser configuration for Xerces' XMLSchemaValidator. This filter records which unparsed entities have been
* declared in the DTD and provides this information to a ValidationManager.
* Events are forwarded to the registered XMLDTDHandler without modification. Factory that creates new {@link #newInstance()} is used to create a new Public constructor is empty.. Use {@link DatatypeFactory#newInstance()} to create a Public constructor is empty.. Use {@link DatatypeFactory#newInstance()} to create a Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines All six values are set and availabe from the created {@link Duration} The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded. Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines Obtain a new instance of a XML Schema Part 2: Datatypes, 3.2.6 duration, defines All six values are set by computing their values from the specified milliseconds
* and are availabe using the The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
- * {@link java.util.Calendar#YEAR} = 1970,
- * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
- * {@link java.util.Calendar#DATE} = 1, etc.
- * This is important as there are variations in the Gregorian Calendar,
- * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced. Obtain a new instance of a The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
+ * {@link java.util.Calendar#YEAR} = 1970,
+ * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
+ * {@link java.util.Calendar#DATE} = 1, etc.
+ * This is important as there are variations in the Gregorian Calendar,
+ * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
+ * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced. Obtain a new instance of a The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded. Create a Create a The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
@@ -205,20 +205,20 @@
*
* @param isPositive Set to Create a Create a A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set. Create a The datatype Create a The datatype Both values are set and availabe from the created {@link Duration} The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded. Create a The datatype Create a The datatype Both values are set by computing their values from the specified milliseconds
* and are availabe using the The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
- * {@link java.util.Calendar#YEAR} = 1970,
- * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
- * {@link java.util.Calendar#DATE} = 1, etc.
- * This is important as there are variations in the Gregorian Calendar,
- * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getMonths()} can be influenced. The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
+ * {@link java.util.Calendar#YEAR} = 1970,
+ * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
+ * {@link java.util.Calendar#DATE} = 1, etc.
+ * This is important as there are variations in the Gregorian Calendar,
+ * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
+ * so the result of {@link Duration#getMonths()} can be influenced. Any remaining milliseconds after determining the year and month are discarded. Create a The datatype Create a The datatype All four values are set and availabe from the created {@link Duration} The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
* if implementation capacities are exceeded. Create a The datatype Create a The datatype All four values are set by computing their values from the specified milliseconds
* and are availabe using the The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
- * {@link java.util.Calendar#YEAR} = 1970,
- * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
- * {@link java.util.Calendar#DATE} = 1, etc.
- * This is important as there are variations in the Gregorian Calendar,
- * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getDays()} can be influenced. The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
+ * {@link java.util.Calendar#YEAR} = 1970,
+ * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
+ * {@link java.util.Calendar#DATE} = 1, etc.
+ * This is important as there are variations in the Gregorian Calendar,
+ * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
+ * so the result of {@link Duration#getDays()} can be influenced. Any remaining milliseconds after determining the day, hour, minute and second are discarded. Create a The datatype Create a The datatype The XML Schema specification states that values can be of an arbitrary size.
* Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
* An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
@@ -423,98 +423,98 @@
*
* @param isPositive Set to Create a The datatype Create a The datatype A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set. Create a new instance of an Create a new instance of an All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null. Create a new XMLGregorianCalendar by parsing the String as a lexical representation. Parsing the lexical string representation is defined in
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendar() {
+
+ return new XMLGregorianCalendarImpl();
+ }
+
+ /**
+ * Create a new XMLGregorianCalendar by parsing the String as a lexical representation. Parsing the lexical string representation is defined in
* XML Schema 1.0 Part 2, Section 3.2.[7-14].1,
* Lexical Representation. The string representation may not have any leading and trailing whitespaces. The parsing is done field by field so that
* the following holds for any lexically correct String x: Except for the noted lexical/canonical representation mismatches
* listed in
* XML Schema 1.0 errata, Section 3.2.7.2. Create an *conversion loss of information. It is not possible to represent
- * a To compute the return value's Constructor allowing for complete value spaces allowed by
- * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
- * builtin datatypes. Note that Create an *conversion loss of information. It is not possible to represent
+ * a To compute the return value's Constructor allowing for complete value spaces allowed by
+ * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
+ * builtin datatypes. Note that Represent a subtype The DurationYearMonth object represents a period of Gregorian time,
- * with a lexical representation, "PnDTnHnMnS" that contains only year and month components.
- * Construct a The datatype All four values are set and availabe from the created {@link Duration} The XML Schema specification states that values can be of an arbitrary size.
- * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
- * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
- * if implementation capacities are exceeded. Create a The datatype All four values are set by computing their values from the specified milliseconds
- * and are availabe using the The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
- * {@link java.util.Calendar#YEAR} = 1970,
- * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
- * {@link java.util.Calendar#DATE} = 1, etc.
- * This is important as there are variations in the Gregorian Calendar,
- * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getDays()} can be influenced. Any remaining milliseconds after determining the day, hour, minute and second are discarded. Represent a subtype The DurationYearMonth object represents a period of Gregorian time,
+ * with a lexical representation, "PnDTnHnMnS" that contains only year and month components.
+ * Construct a The datatype All four values are set and availabe from the created {@link Duration} The XML Schema specification states that values can be of an arbitrary size.
+ * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
+ * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
+ * if implementation capacities are exceeded. Create a The datatype All four values are set by computing their values from the specified milliseconds
+ * and are availabe using the The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
+ * {@link java.util.Calendar#YEAR} = 1970,
+ * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
+ * {@link java.util.Calendar#DATE} = 1, etc.
+ * This is important as there are variations in the Gregorian Calendar,
+ * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
+ * so the result of {@link Duration#getDays()} can be influenced. Any remaining milliseconds after determining the day, hour, minute and second are discarded. Immutable representation of a time span as defined in
* the W3C XML Schema 1.0 specification. A Duration object represents a period of Gregorian time,
* which consists of six fields (years, months, days, hours,
* minutes, and seconds) plus a sign (+/-) field. The first five fields have non-negative (>=0) integers or null
* (which represents that the field is not set),
* and the seconds field has a non-negative decimal or null.
- * A negative sign indicates a negative duration.javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:41:00 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -5948733402959678002L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/SingleNodeCounter.java Wed May 02 13:32:36 2012 +0100
@@ -38,55 +38,55 @@
DTMAxisIterator _countSiblings = null;
public SingleNodeCounter(Translet translet,
- DOM document,
- DTMAxisIterator iterator) {
- super(translet, document, iterator);
+ DOM document,
+ DTMAxisIterator iterator) {
+ super(translet, document, iterator);
}
public SingleNodeCounter(Translet translet,
- DOM document,
- DTMAxisIterator iterator,
+ DOM document,
+ DTMAxisIterator iterator,
boolean hasFrom) {
- super(translet, document, iterator, hasFrom);
+ super(translet, document, iterator, hasFrom);
}
-
+
public NodeCounter setStartNode(int node) {
- _node = node;
- _nodeType = _document.getExpandedTypeID(node);
+ _node = node;
+ _nodeType = _document.getExpandedTypeID(node);
_countSiblings = _document.getAxisIterator(Axis.PRECEDINGSIBLING);
- return this;
+ return this;
}
public String getCounter() {
- int result;
- if (_value != Integer.MIN_VALUE) {
+ int result;
+ if (_value != Integer.MIN_VALUE) {
//See Errata E24
if (_value == 0) return "0";
else if (Double.isNaN(_value)) return "NaN";
else if (_value < 0 && Double.isInfinite(_value)) return "-Infinity";
else if (Double.isInfinite(_value)) return "Infinity";
else result = (int) _value;
- }
- else {
- int next = _node;
- result = 0;
+ }
+ else {
+ int next = _node;
+ result = 0;
boolean matchesCount = matchesCount(next);
-
- if (!matchesCount) {
- while ((next = _document.getParent(next)) > END) {
- if (matchesCount(next)) {
- break; // found target
- }
- if (matchesFrom(next)) {
- next = END;
- break; // no target found
- }
- }
- }
- if (next != END) {
+ if (!matchesCount) {
+ while ((next = _document.getParent(next)) > END) {
+ if (matchesCount(next)) {
+ break; // found target
+ }
+ if (matchesFrom(next)) {
+ next = END;
+ break; // no target found
+ }
+ }
+ }
+
+ if (next != END) {
int from = next;
-
+
if (!matchesCount && _hasFrom) {
// Target found, but need to check if ancestor matches from
while ((from = _document.getParent(from)) > END) {
@@ -95,65 +95,64 @@
}
}
}
-
+
// Have we found ancestor matching from?
if (from != END) {
_countSiblings.setStartNode(next);
do {
if (matchesCount(next)) result++;
} while ((next = _countSiblings.next()) != END);
-
+
return formatNumbers(result);
}
- }
-
+ }
+
// If no target found then pass the empty list
return formatNumbers(EmptyArray);
- }
- return formatNumbers(result);
+ }
+ return formatNumbers(result);
}
public static NodeCounter getDefaultNodeCounter(Translet translet,
- DOM document,
- DTMAxisIterator iterator) {
- return new DefaultSingleNodeCounter(translet, document, iterator);
+ DOM document,
+ DTMAxisIterator iterator) {
+ return new DefaultSingleNodeCounter(translet, document, iterator);
}
static class DefaultSingleNodeCounter extends SingleNodeCounter {
- public DefaultSingleNodeCounter(Translet translet,
- DOM document, DTMAxisIterator iterator) {
- super(translet, document, iterator);
- }
+ public DefaultSingleNodeCounter(Translet translet,
+ DOM document, DTMAxisIterator iterator) {
+ super(translet, document, iterator);
+ }
- public NodeCounter setStartNode(int node) {
- _node = node;
- _nodeType = _document.getExpandedTypeID(node);
- _countSiblings =
+ public NodeCounter setStartNode(int node) {
+ _node = node;
+ _nodeType = _document.getExpandedTypeID(node);
+ _countSiblings =
_document.getTypedAxisIterator(Axis.PRECEDINGSIBLING,
- _document.getExpandedTypeID(node));
- return this;
- }
+ _document.getExpandedTypeID(node));
+ return this;
+ }
- public String getCounter() {
- int result;
- if (_value != Integer.MIN_VALUE) {
+ public String getCounter() {
+ int result;
+ if (_value != Integer.MIN_VALUE) {
//See Errata E24
if (_value == 0) return "0";
else if (Double.isNaN(_value)) return "NaN";
else if (_value < 0 && Double.isInfinite(_value)) return "-Infinity";
else if (Double.isInfinite(_value)) return "Infinity";
else result = (int) _value;
- }
- else {
- int next;
- result = 1;
- _countSiblings.setStartNode(_node);
- while ((next = _countSiblings.next()) != END) {
- result++;
- }
- }
- return formatNumbers(result);
- }
+ }
+ else {
+ int next;
+ result = 1;
+ _countSiblings.setStartNode(_node);
+ while ((next = _countSiblings.next()) != END) {
+ result++;
+ }
+ }
+ return formatNumbers(result);
+ }
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/dom/XSLTCDTMManager.java Wed May 02 13:32:36 2012 +0100
@@ -42,6 +42,7 @@
import com.sun.org.apache.xalan.internal.xsltc.trax.DOM2SAX;
import com.sun.org.apache.xalan.internal.xsltc.trax.StAXEvent2SAX;
import com.sun.org.apache.xalan.internal.xsltc.trax.StAXStream2SAX;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
import org.xml.sax.InputSource;
import org.xml.sax.SAXNotRecognizedException;
@@ -102,9 +103,22 @@
* The default is com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager
.
*/
public static Class getDTMManagerClass() {
- Class mgrClass = ObjectFactory.lookUpFactoryClass(DEFAULT_PROP_NAME,
+ return getDTMManagerClass(true);
+ }
+
+ public static Class getDTMManagerClass(boolean useServicesMechanism) {
+ Class mgrClass = null;
+ if (useServicesMechanism) {
+ mgrClass = ObjectFactory.lookUpFactoryClass(DEFAULT_PROP_NAME,
null,
DEFAULT_CLASS_NAME);
+ } else {
+ try {
+ mgrClass = ObjectFactory.findProviderClass(DEFAULT_CLASS_NAME, true);
+ } catch (Exception e) {
+ //will not happen
+ }
+ }
// If no class found, default to this one. (This should never happen -
// the ObjectFactory has already been told that the current class is
// the default).
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet.java Wed May 02 13:32:36 2012 +0100
@@ -23,6 +23,7 @@
package com.sun.org.apache.xalan.internal.xsltc.runtime;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import java.io.File;
import java.io.FileOutputStream;
import java.io.BufferedOutputStream;
@@ -55,7 +56,7 @@
* @author Santiago Pericas-Geertsen
* @author Morten Jorgensen
* @author G. Todd Miller
- * @author John Howard, JohnH@schemasoft.com
+ * @author John Howard, JohnH@schemasoft.com
*/
public abstract class AbstractTranslet implements Translet {
@@ -89,10 +90,10 @@
protected String[] urisArray;
protected int[] typesArray;
protected String[] namespaceArray;
-
+
// The Templates object that is used to create this Translet instance
protected Templates _templates = null;
-
+
// Boolean flag to indicate whether this translet has id functions.
protected boolean _hasIdCall = false;
@@ -105,20 +106,21 @@
// This is the name of the index used for ID attributes
private final static String ID_INDEX_NAME = "##id";
-
+ private boolean _useServicesMechanism;
+
/************************************************************************
* Debugging
************************************************************************/
public void printInternalState() {
- System.out.println("-------------------------------------");
- System.out.println("AbstractTranslet this = " + this);
- System.out.println("pbase = " + pbase);
- System.out.println("vframe = " + pframe);
- System.out.println("paramsStack.size() = " + paramsStack.size());
- System.out.println("namesArray.size = " + namesArray.length);
- System.out.println("namespaceArray.size = " + namespaceArray.length);
- System.out.println("");
- System.out.println("Total memory = " + Runtime.getRuntime().totalMemory());
+ System.out.println("-------------------------------------");
+ System.out.println("AbstractTranslet this = " + this);
+ System.out.println("pbase = " + pbase);
+ System.out.println("vframe = " + pframe);
+ System.out.println("paramsStack.size() = " + paramsStack.size());
+ System.out.println("namesArray.size = " + namesArray.length);
+ System.out.println("namespaceArray.size = " + namespaceArray.length);
+ System.out.println("");
+ System.out.println("Total memory = " + Runtime.getRuntime().totalMemory());
}
/**
@@ -127,16 +129,16 @@
* code in the translet - see compiler/Stylesheet.compileTransform()).
*/
public final DOMAdapter makeDOMAdapter(DOM dom)
- throws TransletException {
+ throws TransletException {
setRootForKeys(dom.getDocument());
- return new DOMAdapter(dom, namesArray, urisArray, typesArray, namespaceArray);
+ return new DOMAdapter(dom, namesArray, urisArray, typesArray, namespaceArray);
}
/************************************************************************
* Parameter handling
************************************************************************/
- // Parameter's stack: pbase and pframe are used
+ // Parameter's stack: pbase and pframe are used
// to denote the current parameter frame.
protected int pbase = 0, pframe = 0;
protected ArrayList paramsStack = new ArrayList();
@@ -145,34 +147,34 @@
* Push a new parameter frame.
*/
public final void pushParamFrame() {
- paramsStack.add(pframe, new Integer(pbase));
- pbase = ++pframe;
+ paramsStack.add(pframe, new Integer(pbase));
+ pbase = ++pframe;
}
/**
* Pop the topmost parameter frame.
*/
public final void popParamFrame() {
- if (pbase > 0) {
- final int oldpbase = ((Integer)paramsStack.get(--pbase)).intValue();
- for (int i = pframe - 1; i >= pbase; i--) {
- paramsStack.remove(i);
- }
- pframe = pbase; pbase = oldpbase;
- }
+ if (pbase > 0) {
+ final int oldpbase = ((Integer)paramsStack.get(--pbase)).intValue();
+ for (int i = pframe - 1; i >= pbase; i--) {
+ paramsStack.remove(i);
+ }
+ pframe = pbase; pbase = oldpbase;
+ }
}
/**
* Add a new global parameter if not already in the current frame.
* To setParameters of the form {http://foo.bar}xyz
* This needs to get mapped to an instance variable in the class
- * The mapping created so that
- * the global variables in the generated class become
+ * The mapping created so that
+ * the global variables in the generated class become
* http$colon$$flash$$flash$foo$dot$bar$colon$xyz
*/
public final Object addParameter(String name, Object value) {
name = BasisLibrary.mapQNameToJavaName (name);
- return addParameter(name, value, false);
+ return addParameter(name, value, false);
}
/**
@@ -181,36 +183,36 @@
* default value from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:40:59 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -2293620736651286953L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/StringValueHandler.java Wed May 02 13:32:36 2012 +0100
@@ -39,50 +39,50 @@
private static final String EMPTY_STR = "";
private boolean m_escaping = false;
private int _nestedLevel = 0;
-
- public void characters(char[] ch, int off, int len)
- throws SAXException
+
+ public void characters(char[] ch, int off, int len)
+ throws SAXException
{
- if (_nestedLevel > 0)
- return;
-
- if (_str != null) {
- _buffer.append(_str);
- _str = null;
- }
- _buffer.append(ch, off, len);
+ if (_nestedLevel > 0)
+ return;
+
+ if (_str != null) {
+ _buffer.append(_str);
+ _str = null;
+ }
+ _buffer.append(ch, off, len);
}
public String getValue() {
- if (_buffer.length() != 0) {
- String result = _buffer.toString();
- _buffer.setLength(0);
- return result;
- }
- else {
- String result = _str;
- _str = null;
- return (result != null) ? result : EMPTY_STR;
- }
+ if (_buffer.length() != 0) {
+ String result = _buffer.toString();
+ _buffer.setLength(0);
+ return result;
+ }
+ else {
+ String result = _str;
+ _str = null;
+ return (result != null) ? result : EMPTY_STR;
+ }
}
public void characters(String characters) throws SAXException {
- if (_nestedLevel > 0)
- return;
+ if (_nestedLevel > 0)
+ return;
- if (_str == null && _buffer.length() == 0) {
- _str = characters;
- }
- else {
- if (_str != null) {
- _buffer.append(_str);
- _str = null;
- }
-
- _buffer.append(characters);
- }
+ if (_str == null && _buffer.length() == 0) {
+ _str = characters;
+ }
+ else {
+ if (_str != null) {
+ _buffer.append(_str);
+ _str = null;
+ }
+
+ _buffer.append(characters);
+ }
}
-
+
public void startElement(String qname) throws SAXException {
_nestedLevel++;
}
@@ -102,26 +102,26 @@
/**
* The value of a PI must not contain the substring "?>". Should
- * that substring be present, replace it by "? >".
+ * that substring be present, replace it by "? >".
*/
public String getValueOfPI() {
- final String value = getValue();
+ final String value = getValue();
- if (value.indexOf("?>") > 0) {
- final int n = value.length();
- final StringBuilder valueOfPI = new StringBuilder();
+ if (value.indexOf("?>") > 0) {
+ final int n = value.length();
+ final StringBuilder valueOfPI = new StringBuilder();
- for (int i = 0; i < n;) {
- final char ch = value.charAt(i++);
- if (ch == '?' && value.charAt(i) == '>') {
- valueOfPI.append("? >"); i++;
- }
- else {
- valueOfPI.append(ch);
- }
- }
- return valueOfPI.toString();
- }
- return value;
+ for (int i = 0; i < n;) {
+ final char ch = value.charAt(i++);
+ if (ch == '?' && value.charAt(i) == '>') {
+ valueOfPI.append("? >"); i++;
+ }
+ else {
+ valueOfPI.append(ch);
+ }
+ }
+ return valueOfPI.toString();
+ }
+ return value;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/runtime/output/TransletOutputHandlerFactory.java Wed May 02 13:32:36 2012 +0100
@@ -72,10 +72,18 @@
private ContentHandler _handler = null;
private LexicalHandler _lexHandler = null;
+ private boolean _useServicesMechanism;
+
static public TransletOutputHandlerFactory newInstance() {
- return new TransletOutputHandlerFactory();
+ return new TransletOutputHandlerFactory(true);
+ }
+ static public TransletOutputHandlerFactory newInstance(boolean useServicesMechanism) {
+ return new TransletOutputHandlerFactory(useServicesMechanism);
}
+ public TransletOutputHandlerFactory(boolean useServicesMechanism) {
+ _useServicesMechanism = useServicesMechanism;
+ }
public void setOutputType(int outputType) {
_outputType = outputType;
}
@@ -188,7 +196,7 @@
return result;
case DOM :
- _handler = (_node != null) ? new SAX2DOM(_node, _nextSibling) : new SAX2DOM();
+ _handler = (_node != null) ? new SAX2DOM(_node, _nextSibling, _useServicesMechanism) : new SAX2DOM(_useServicesMechanism);
_lexHandler = (LexicalHandler) _handler;
// falls through
case STAX :
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
* javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.9 2008/04/02 00:41:02 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -1877553852268428278L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SAX2DOM.java Wed May 02 13:32:36 2012 +0100
@@ -49,6 +49,7 @@
/**
* @author G. Todd Miller
* @author Sunitha Reddy
+ * @author Huizhe Wang
*/
public class SAX2DOM implements ContentHandler, LexicalHandler, Constants {
@@ -60,57 +61,46 @@
private Node _lastSibling = null;
private Locator locator = null;
private boolean needToSetDocumentInfo = true;
-
+
//Replace StringBuffer with StringBuilder now that we no long support jdk1.4
private StringBuilder _textBuffer = new StringBuilder();
private Node _nextSiblingCache = null;
/**
* JAXP document builder factory. Create a single instance and use
- * synchronization because the Javadoc is not explicit about
+ * synchronization because the Javadoc is not explicit about
* thread safety.
*/
- static final DocumentBuilderFactory _factory =
+ private DocumentBuilderFactory _factory =
DocumentBuilderFactory.newInstance();
- static final DocumentBuilder _internalBuilder;
- static {
- DocumentBuilder tmpBuilder = null;
- try {
- if (_factory instanceof com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl) {
- tmpBuilder = _factory.newDocumentBuilder();
- }
- } catch(Exception e) {
- // It's OK. Will create DocumentBuilder every time
- }
- _internalBuilder = tmpBuilder;
- }
-
- public SAX2DOM() throws ParserConfigurationException {
- _document = createDocument();
- _root = _document;
+ private boolean _internal = true;
+
+ public SAX2DOM(boolean useServicesMachnism) throws ParserConfigurationException {
+ _document = createDocument(useServicesMachnism);
+ _root = _document;
}
- public SAX2DOM(Node root, Node nextSibling) throws ParserConfigurationException {
- _root = root;
- if (root instanceof Document) {
- _document = (Document)root;
- }
- else if (root != null) {
- _document = root.getOwnerDocument();
- }
- else {
- _document = createDocument();
- _root = _document;
- }
-
- _nextSibling = nextSibling;
+ public SAX2DOM(Node root, Node nextSibling, boolean useServicesMachnism) throws ParserConfigurationException {
+ _root = root;
+ if (root instanceof Document) {
+ _document = (Document)root;
+ }
+ else if (root != null) {
+ _document = root.getOwnerDocument();
+ }
+ else {
+ _document = createDocument(useServicesMachnism);
+ _root = _document;
+ }
+
+ _nextSibling = nextSibling;
}
-
- public SAX2DOM(Node root) throws ParserConfigurationException {
- this(root, null);
+
+ public SAX2DOM(Node root, boolean useServicesMachnism) throws ParserConfigurationException {
+ this(root, null, useServicesMachnism);
}
public Node getDOM() {
- return _root;
+ return _root;
}
public void characters(char[] ch, int start, int length) {
@@ -118,8 +108,8 @@
if (length == 0) {
return;
}
-
- final Node last = (Node)_nodeStk.peek();
+
+ final Node last = (Node)_nodeStk.peek();
// No text nodes can be children of root (DOM006 exception)
if (last != _document) {
@@ -140,65 +130,65 @@
}
}
public void startDocument() {
- _nodeStk.push(_root);
+ _nodeStk.push(_root);
}
public void endDocument() {
_nodeStk.pop();
}
-
+
private void setDocumentInfo() {
//try to set document version
if (locator == null) return;
try{
_document.setXmlVersion(((Locator2)locator).getXMLVersion());
}catch(ClassCastException e){}
-
+
}
-
+
public void startElement(String namespace, String localName, String qName,
- Attributes attrs)
+ Attributes attrs)
{
appendTextNode();
if (needToSetDocumentInfo) {
setDocumentInfo();
needToSetDocumentInfo = false;
}
-
- final Element tmp = (Element)_document.createElementNS(namespace, qName);
+
+ final Element tmp = (Element)_document.createElementNS(namespace, qName);
- // Add namespace declarations first
- if (_namespaceDecls != null) {
- final int nDecls = _namespaceDecls.size();
- for (int i = 0; i < nDecls; i++) {
- final String prefix = (String) _namespaceDecls.elementAt(i++);
+ // Add namespace declarations first
+ if (_namespaceDecls != null) {
+ final int nDecls = _namespaceDecls.size();
+ for (int i = 0; i < nDecls; i++) {
+ final String prefix = (String) _namespaceDecls.elementAt(i++);
- if (prefix == null || prefix.equals(EMPTYSTRING)) {
- tmp.setAttributeNS(XMLNS_URI, XMLNS_PREFIX,
- (String) _namespaceDecls.elementAt(i));
- }
- else {
- tmp.setAttributeNS(XMLNS_URI, XMLNS_STRING + prefix,
- (String) _namespaceDecls.elementAt(i));
- }
- }
- _namespaceDecls.clear();
- }
+ if (prefix == null || prefix.equals(EMPTYSTRING)) {
+ tmp.setAttributeNS(XMLNS_URI, XMLNS_PREFIX,
+ (String) _namespaceDecls.elementAt(i));
+ }
+ else {
+ tmp.setAttributeNS(XMLNS_URI, XMLNS_STRING + prefix,
+ (String) _namespaceDecls.elementAt(i));
+ }
+ }
+ _namespaceDecls.clear();
+ }
- // Add attributes to element
-/* final int nattrs = attrs.getLength();
- for (int i = 0; i < nattrs; i++) {
- if (attrs.getLocalName(i) == null) {
- tmp.setAttribute(attrs.getQName(i), attrs.getValue(i));
- }
- else {
- tmp.setAttributeNS(attrs.getURI(i), attrs.getQName(i),
- attrs.getValue(i));
- }
- } */
-
-
- // Add attributes to element
+ // Add attributes to element
+/* final int nattrs = attrs.getLength();
+ for (int i = 0; i < nattrs; i++) {
+ if (attrs.getLocalName(i) == null) {
+ tmp.setAttribute(attrs.getQName(i), attrs.getValue(i));
+ }
+ else {
+ tmp.setAttributeNS(attrs.getURI(i), attrs.getQName(i),
+ attrs.getValue(i));
+ }
+ } */
+
+
+ // Add attributes to element
final int nattrs = attrs.getLength();
for (int i = 0; i < nattrs; i++) {
// checking if Namespace processing is being done
@@ -216,39 +206,39 @@
}
}
}
-
+
+
+ // Append this new node onto current stack node
+ Node last = (Node)_nodeStk.peek();
- // Append this new node onto current stack node
- Node last = (Node)_nodeStk.peek();
-
- // If the SAX2DOM is created with a non-null next sibling node,
- // insert the result nodes before the next sibling under the root.
- if (last == _root && _nextSibling != null)
- last.insertBefore(tmp, _nextSibling);
- else
- last.appendChild(tmp);
+ // If the SAX2DOM is created with a non-null next sibling node,
+ // insert the result nodes before the next sibling under the root.
+ if (last == _root && _nextSibling != null)
+ last.insertBefore(tmp, _nextSibling);
+ else
+ last.appendChild(tmp);
- // Push this node onto stack
- _nodeStk.push(tmp);
+ // Push this node onto stack
+ _nodeStk.push(tmp);
_lastSibling = null;
}
public void endElement(String namespace, String localName, String qName) {
appendTextNode();
- _nodeStk.pop();
+ _nodeStk.pop();
_lastSibling = null;
}
public void startPrefixMapping(String prefix, String uri) {
- if (_namespaceDecls == null) {
- _namespaceDecls = new Vector(2);
- }
- _namespaceDecls.addElement(prefix);
- _namespaceDecls.addElement(uri);
+ if (_namespaceDecls == null) {
+ _namespaceDecls = new Vector(2);
+ }
+ _namespaceDecls.addElement(prefix);
+ _namespaceDecls.addElement(uri);
}
public void endPrefixMapping(String prefix) {
- // do nothing
+ // do nothing
}
/**
@@ -263,15 +253,15 @@
*/
public void processingInstruction(String target, String data) {
appendTextNode();
- final Node last = (Node)_nodeStk.peek();
- ProcessingInstruction pi = _document.createProcessingInstruction(
- target, data);
- if (pi != null){
+ final Node last = (Node)_nodeStk.peek();
+ ProcessingInstruction pi = _document.createProcessingInstruction(
+ target, data);
+ if (pi != null){
if (last == _root && _nextSibling != null)
last.insertBefore(pi, _nextSibling);
else
last.appendChild(pi);
-
+
_lastSibling = pi;
}
}
@@ -297,14 +287,14 @@
*/
public void comment(char[] ch, int start, int length) {
appendTextNode();
- final Node last = (Node)_nodeStk.peek();
- Comment comment = _document.createComment(new String(ch,start,length));
- if (comment != null){
+ final Node last = (Node)_nodeStk.peek();
+ Comment comment = _document.createComment(new String(ch,start,length));
+ if (comment != null){
if (last == _root && _nextSibling != null)
last.insertBefore(comment, _nextSibling);
else
last.appendChild(comment);
-
+
_lastSibling = comment;
}
}
@@ -317,12 +307,24 @@
public void endEntity(String name) { }
public void startDTD(String name, String publicId, String systemId)
throws SAXException {}
-
- private static Document createDocument() throws ParserConfigurationException {
+
+ private Document createDocument(boolean useServicesMachnism) throws ParserConfigurationException {
+ if (_factory == null) {
+ if (useServicesMachnism)
+ _factory = DocumentBuilderFactory.newInstance();
+ if (!(_factory instanceof com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl)) {
+ _internal = false;
+ }
+ else
+ _factory = DocumentBuilderFactory.newInstance(
+ "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl",
+ SAX2DOM.class.getClassLoader()
+ );
+ }
Document doc;
- if (_internalBuilder != null) {
+ if (_internal) {
//default implementation is thread safe
- doc = _internalBuilder.newDocument();
+ doc = _factory.newDocumentBuilder().newDocument();
} else {
synchronized(SAX2DOM.class) {
doc = _factory.newDocumentBuilder().newDocument();
@@ -330,5 +332,5 @@
}
return doc;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SmartTransformerFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SmartTransformerFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/SmartTransformerFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -43,6 +43,7 @@
import javax.xml.transform.stream.StreamSource;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
import org.xml.sax.XMLFilter;
/**
@@ -93,7 +94,7 @@
try {
Class xalanFactClass = ObjectFactory.findProviderClass(
"com.sun.org.apache.xalan.internal.processor.TransformerFactoryImpl",
- ObjectFactory.findClassLoader(), true);
+ true);
_xalanFactory = (SAXTransformerFactory)
xalanFactClass.newInstance();
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesHandlerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -95,10 +95,15 @@
_tfactory = tfactory;
// Instantiate XSLTC and get reference to parser object
- XSLTC xsltc = new XSLTC();
+ XSLTC xsltc = new XSLTC(tfactory.useServicesMechnism());
if (tfactory.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING))
xsltc.setSecureProcessing(true);
+ if ("true".equals(tfactory.getAttribute(TransformerFactoryImpl.ENABLE_INLINING)))
+ xsltc.setTemplateInlining(true);
+ else
+ xsltc.setTemplateInlining(false);
+
_parser = xsltc.getParser();
}
@@ -188,7 +193,7 @@
XSLTC xsltc = _parser.getXSLTC();
// Set the translet class name if not already set
- String transletName = null;
+ String transletName;
if (_systemId != null) {
transletName = Util.baseName(_systemId);
}
@@ -210,6 +215,11 @@
stylesheet.setSystemId(_systemId);
stylesheet.setParentStylesheet(null);
+ if (xsltc.getTemplateInlining())
+ stylesheet.setTemplateInlining(true);
+ else
+ stylesheet.setTemplateInlining(false);
+
// Set a document loader (for xsl:include/import) if defined
if (_uriResolver != null) {
stylesheet.setSourceLoader(this);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TemplatesImpl.java Wed May 02 13:32:36 2012 +0100
@@ -42,6 +42,7 @@
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
import com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet;
import com.sun.org.apache.xalan.internal.xsltc.runtime.Hashtable;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
* @author Morten Jorgensen
@@ -118,6 +119,8 @@
*/
private transient TransformerFactoryImpl _tfactory = null;
+ private boolean _useServicesMechanism;
+
static final class TransletClassLoader extends ClassLoader {
TransletClassLoader(ClassLoader parent) {
super(parent);
@@ -142,10 +145,7 @@
TransformerFactoryImpl tfactory)
{
_bytecodes = bytecodes;
- _name = transletName;
- _outputProperties = outputProperties;
- _indentNumber = indentNumber;
- _tfactory = tfactory;
+ init(transletName, outputProperties, indentNumber, tfactory);
}
/**
@@ -156,14 +156,19 @@
TransformerFactoryImpl tfactory)
{
_class = transletClasses;
+ _transletIndex = 0;
+ init(transletName, outputProperties, indentNumber, tfactory);
+ }
+
+ private void init(String transletName,
+ Properties outputProperties, int indentNumber,
+ TransformerFactoryImpl tfactory) {
_name = transletName;
- _transletIndex = 0;
_outputProperties = outputProperties;
_indentNumber = indentNumber;
_tfactory = tfactory;
+ _useServicesMechanism = tfactory.useServicesMechnism();
}
-
-
/**
* Need for de-serialization, see readObject().
*/
@@ -207,6 +212,12 @@
}
}
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return _useServicesMechanism;
+ }
/**
* Store URIResolver needed for Transformers.
@@ -357,6 +368,7 @@
AbstractTranslet translet = (AbstractTranslet) _class[_transletIndex].newInstance();
translet.postInitialization();
translet.setTemplates(this);
+ translet.setServicesMechnism(_useServicesMechanism);
if (_auxClasses != null) {
translet.setAuxiliaryClasses(_auxClasses);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TrAXFilter.java Wed May 02 13:32:36 2012 +0100
@@ -55,6 +55,7 @@
private Templates _templates;
private TransformerImpl _transformer;
private TransformerHandlerImpl _transformerHandler;
+ private boolean _useServicesMechanism = true;
public TrAXFilter(Templates templates) throws
TransformerConfigurationException
@@ -62,6 +63,7 @@
_templates = templates;
_transformer = (TransformerImpl) templates.newTransformer();
_transformerHandler = new TransformerHandlerImpl(_transformer);
+ _useServicesMechanism = _transformer.useServicesMechnism();
}
public Transformer getTransformer() {
@@ -106,7 +108,7 @@
try {
if (getParent() == null) {
try {
- managedReader = XMLReaderManager.getInstance()
+ managedReader = XMLReaderManager.getInstance(_useServicesMechanism)
.getXMLReader();
setParent(managedReader);
} catch (SAXException e) {
@@ -118,7 +120,7 @@
getParent().parse(input);
} finally {
if (managedReader != null) {
- XMLReaderManager.getInstance().releaseXMLReader(managedReader);
+ XMLReaderManager.getInstance(_useServicesMechanism).releaseXMLReader(managedReader);
}
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -49,6 +49,7 @@
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
import javax.xml.transform.URIResolver;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.dom.DOMSource;
@@ -64,11 +65,14 @@
import com.sun.org.apache.xml.internal.utils.StylesheetPIHandler;
import com.sun.org.apache.xml.internal.utils.StopParseException;
+import com.sun.org.apache.xalan.internal.XalanConstants;
import com.sun.org.apache.xalan.internal.xsltc.compiler.Constants;
import com.sun.org.apache.xalan.internal.xsltc.compiler.SourceLoader;
import com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC;
import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ErrorMsg;
import com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import org.xml.sax.InputSource;
@@ -78,12 +82,12 @@
/**
* Implementation of a JAXP1.1 TransformerFactory for Translets.
- * @author G. Todd Miller
+ * @author G. Todd Miller
* @author Morten Jorgensen
* @author Santiago Pericas-Geertsen
*/
public class TransformerFactoryImpl
- extends SAXTransformerFactory implements SourceLoader, ErrorListener
+ extends SAXTransformerFactory implements SourceLoader, ErrorListener
{
// Public constants for attributes supported by the XSLTC TransformerFactory.
public final static String TRANSLET_NAME = "translet-name";
@@ -96,19 +100,19 @@
public final static String DEBUG = "debug";
public final static String ENABLE_INLINING = "enable-inlining";
public final static String INDENT_NUMBER = "indent-number";
-
+
/**
* This error listener is used only for this factory and is not passed to
* the Templates or Transformer objects that we create.
*/
- private ErrorListener _errorListener = this;
+ private ErrorListener _errorListener = this;
/**
* This URIResolver is passed to all created Templates and Transformers
*/
private URIResolver _uriResolver = null;
- /**
+ /**
* As Gregor Samsa awoke one morning from uneasy dreams he found himself
* transformed in his bed into a gigantic insect. He was lying on his hard,
* as it were armour plated, back, and if he lifted his head a little he
@@ -119,22 +123,22 @@
* "What has happened to me?", he thought. It was no dream....
*/
protected final static String DEFAULT_TRANSLET_NAME = "GregorSamsa";
-
+
/**
* The class name of the translet
*/
private String _transletName = DEFAULT_TRANSLET_NAME;
-
+
/**
* The destination directory for the translet
*/
private String _destinationDirectory = null;
-
+
/**
* The package name prefix for all generated translet classes
*/
private String _packageName = null;
-
+
/**
* The jar file name which the translet classes are packaged into
*/
@@ -150,15 +154,15 @@
* The above hashtable stores objects of this class.
*/
private static class PIParamWrapper {
- public String _media = null;
- public String _title = null;
- public String _charset = null;
-
- public PIParamWrapper(String media, String title, String charset) {
- _media = media;
- _title = title;
- _charset = charset;
- }
+ public String _media = null;
+ public String _title = null;
+ public String _charset = null;
+
+ public PIParamWrapper(String media, String title, String charset) {
+ _media = media;
+ _title = title;
+ _charset = charset;
+ }
}
/**
@@ -170,13 +174,13 @@
* Set to true
when templates are inlined.
*/
private boolean _enableInlining = false;
-
+
/**
- * Set to true
when we want to generate
+ * Set to true
when we want to generate
* translet classes from the stylesheet.
*/
private boolean _generateTranslet = false;
-
+
/**
* If this is set to true
, we attempt to use translet classes
* for transformation if possible without compiling the stylesheet. The
@@ -184,7 +188,7 @@
* of the stylesheet.
*/
private boolean _autoTranslet = false;
-
+
/**
* If this is set to true
, we attempt to load the translet
* from the CLASSPATH.
@@ -212,11 +216,28 @@
* TransformerFactory
and Transformer
s
* or Template
s created by this factory.Transformer
s or Template
s it creates cannot support the feature.
* It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
* true
or false
.
- *
+ *
* @throws TransformerConfigurationException if this TransformerFactory
* or the Transformer
s or Template
s it creates cannot support this feature.
* @throws NullPointerException If the name
parameter is null.
@@ -405,23 +432,26 @@
public void setFeature(String name, boolean value)
throws TransformerConfigurationException {
- // feature name cannot be null
- if (name == null) {
+ // feature name cannot be null
+ if (name == null) {
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_SET_FEATURE_NULL_NAME);
- throw new NullPointerException(err.toString());
- }
- // secure processing?
- else if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
+ throw new NullPointerException(err.toString());
+ }
+ // secure processing?
+ else if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if ((_isSecureMode) && (!value)) {
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_SECUREPROCESSING_FEATURE);
throw new TransformerConfigurationException(err.toString());
}
- _isNotSecureProcessing = !value;
- // all done processing feature
- return;
- }
- else {
- // unknown feature
+ _isNotSecureProcessing = !value;
+ // all done processing feature
+ return;
+ }
+ else if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+ _useServicesMechanism = value;
+ }
+ else {
+ // unknown feature
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_UNSUPPORTED_FEATURE, name);
throw new TransformerConfigurationException(err.toString());
}
@@ -436,40 +466,47 @@
* @param name The feature name
* @return 'true' if feature is supported, 'false' if not
*/
- public boolean getFeature(String name) {
- // All supported features should be listed here
- String[] features = {
- DOMSource.FEATURE,
- DOMResult.FEATURE,
- SAXSource.FEATURE,
- SAXResult.FEATURE,
- StAXSource.FEATURE,
- StAXResult.FEATURE,
- StreamSource.FEATURE,
- StreamResult.FEATURE,
- SAXTransformerFactory.FEATURE,
- SAXTransformerFactory.FEATURE_XMLFILTER
- };
+ public boolean getFeature(String name) {
+ // All supported features should be listed here
+ String[] features = {
+ DOMSource.FEATURE,
+ DOMResult.FEATURE,
+ SAXSource.FEATURE,
+ SAXResult.FEATURE,
+ StAXSource.FEATURE,
+ StAXResult.FEATURE,
+ StreamSource.FEATURE,
+ StreamResult.FEATURE,
+ SAXTransformerFactory.FEATURE,
+ SAXTransformerFactory.FEATURE_XMLFILTER,
+ XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM
+ };
- // feature name cannot be null
- if (name == null) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_GET_FEATURE_NULL_NAME);
- throw new NullPointerException(err.toString());
- }
+ // feature name cannot be null
+ if (name == null) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_GET_FEATURE_NULL_NAME);
+ throw new NullPointerException(err.toString());
+ }
- // Inefficient, but array is small
- for (int i =0; i < features.length; i++) {
- if (name.equals(features[i])) {
- return true;
- }
- }
- // secure processing?
- if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
- return !_isNotSecureProcessing;
- }
+ // Inefficient, but array is small
+ for (int i =0; i < features.length; i++) {
+ if (name.equals(features[i])) {
+ return true;
+ }
+ }
+ // secure processing?
+ if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
+ return !_isNotSecureProcessing;
+ }
- // Feature not supported
- return false;
+ // Feature not supported
+ return false;
+ }
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return _useServicesMechanism;
}
/**
@@ -479,10 +516,10 @@
*
* @return The URLResolver used for this TransformerFactory and all
* Templates and Transformer objects created using this factory
- */
+ */
public URIResolver getURIResolver() {
- return _uriResolver;
- }
+ return _uriResolver;
+ }
/**
* javax.xml.transform.sax.TransformerFactory implementation.
@@ -493,9 +530,9 @@
*
* @param resolver The URLResolver used for this TransformerFactory and all
* Templates and Transformer objects created using this factory
- */
+ */
public void setURIResolver(URIResolver resolver) {
- _uriResolver = resolver;
+ _uriResolver = resolver;
}
/**
@@ -514,8 +551,8 @@
* @throws TransformerConfigurationException
*/
public Source getAssociatedStylesheet(Source source, String media,
- String title, String charset)
- throws TransformerConfigurationException {
+ String title, String charset)
+ throws TransformerConfigurationException {
String baseId;
XMLReader reader = null;
@@ -528,7 +565,7 @@
StylesheetPIHandler _stylesheetPIHandler = new StylesheetPIHandler(null,media,title,charset);
try {
-
+
if (source instanceof DOMSource ) {
final DOMSource domsrc = (DOMSource) source;
baseId = domsrc.getSystemId();
@@ -543,16 +580,16 @@
isource = SAXSource.sourceToInputSource(source);
baseId = isource.getSystemId();
- SAXParserFactory factory = SAXParserFactory.newInstance();
+ SAXParserFactory factory = FactoryImpl.getSAXFactory(_useServicesMechanism);
factory.setNamespaceAware(true);
-
+
if (!_isNotSecureProcessing) {
try {
factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);
}
catch (org.xml.sax.SAXException e) {}
}
-
+
SAXParser jaxpParser = factory.newSAXParser();
reader = jaxpParser.getXMLReader();
@@ -600,20 +637,20 @@
*
* @return A Transformer object that simply copies the source to the result.
* @throws TransformerConfigurationException
- */
+ */
public Transformer newTransformer()
- throws TransformerConfigurationException
- {
- TransformerImpl result = new TransformerImpl(new Properties(),
- _indentNumber, this);
- if (_uriResolver != null) {
- result.setURIResolver(_uriResolver);
- }
-
- if (!_isNotSecureProcessing) {
- result.setSecureProcessing(true);
- }
- return result;
+ throws TransformerConfigurationException
+ {
+ TransformerImpl result = new TransformerImpl(new Properties(),
+ _indentNumber, this);
+ if (_uriResolver != null) {
+ result.setURIResolver(_uriResolver);
+ }
+
+ if (!_isNotSecureProcessing) {
+ result.setSecureProcessing(true);
+ }
+ return result;
}
/**
@@ -627,57 +664,57 @@
* @throws TransformerConfigurationException
*/
public Transformer newTransformer(Source source) throws
- TransformerConfigurationException
+ TransformerConfigurationException
{
- final Templates templates = newTemplates(source);
- final Transformer transformer = templates.newTransformer();
- if (_uriResolver != null) {
- transformer.setURIResolver(_uriResolver);
- }
- return(transformer);
+ final Templates templates = newTemplates(source);
+ final Transformer transformer = templates.newTransformer();
+ if (_uriResolver != null) {
+ transformer.setURIResolver(_uriResolver);
+ }
+ return(transformer);
}
/**
* Pass warning messages from the compiler to the error listener
*/
- private void passWarningsToListener(Vector messages)
- throws TransformerException
+ private void passWarningsToListener(Vector messages)
+ throws TransformerException
{
- if (_errorListener == null || messages == null) {
- return;
- }
- // Pass messages to listener, one by one
- final int count = messages.size();
- for (int pos = 0; pos < count; pos++) {
- ErrorMsg msg = (ErrorMsg)messages.elementAt(pos);
- // Workaround for the TCK failure ErrorListener.errorTests.error001.
- if (msg.isWarningError())
- _errorListener.error(
- new TransformerConfigurationException(msg.toString()));
- else
- _errorListener.warning(
- new TransformerConfigurationException(msg.toString()));
- }
+ if (_errorListener == null || messages == null) {
+ return;
+ }
+ // Pass messages to listener, one by one
+ final int count = messages.size();
+ for (int pos = 0; pos < count; pos++) {
+ ErrorMsg msg = (ErrorMsg)messages.elementAt(pos);
+ // Workaround for the TCK failure ErrorListener.errorTests.error001.
+ if (msg.isWarningError())
+ _errorListener.error(
+ new TransformerConfigurationException(msg.toString()));
+ else
+ _errorListener.warning(
+ new TransformerConfigurationException(msg.toString()));
+ }
}
/**
* Pass error messages from the compiler to the error listener
*/
private void passErrorsToListener(Vector messages) {
- try {
- if (_errorListener == null || messages == null) {
- return;
- }
- // Pass messages to listener, one by one
- final int count = messages.size();
- for (int pos = 0; pos < count; pos++) {
- String message = messages.elementAt(pos).toString();
- _errorListener.error(new TransformerException(message));
- }
- }
- catch (TransformerException e) {
- // nada
- }
+ try {
+ if (_errorListener == null || messages == null) {
+ return;
+ }
+ // Pass messages to listener, one by one
+ final int count = messages.size();
+ for (int pos = 0; pos < count; pos++) {
+ String message = messages.elementAt(pos).toString();
+ _errorListener.error(new TransformerException(message));
+ }
+ }
+ catch (TransformerException e) {
+ // nada
+ }
}
/**
@@ -690,162 +727,165 @@
* @throws TransformerConfigurationException
*/
public Templates newTemplates(Source source)
- throws TransformerConfigurationException
+ throws TransformerConfigurationException
{
- // If the _useClasspath attribute is true, try to load the translet from
- // the CLASSPATH and create a template object using the loaded
- // translet.
- if (_useClasspath) {
- String transletName = getTransletBaseName(source);
-
- if (_packageName != null)
- transletName = _packageName + "." + transletName;
-
- try {
- final Class clazz = ObjectFactory.findProviderClass(
- transletName, ObjectFactory.findClassLoader(), true);
- resetTransientAttributes();
-
- return new TemplatesImpl(new Class[]{clazz}, transletName, null, _indentNumber, this);
- }
- catch (ClassNotFoundException cnfe) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, transletName);
- throw new TransformerConfigurationException(err.toString());
- }
- catch (Exception e) {
- ErrorMsg err = new ErrorMsg(
+ // If the _useClasspath attribute is true, try to load the translet from
+ // the CLASSPATH and create a template object using the loaded
+ // translet.
+ if (_useClasspath) {
+ String transletName = getTransletBaseName(source);
+
+ if (_packageName != null)
+ transletName = _packageName + "." + transletName;
+
+ try {
+ final Class clazz = ObjectFactory.findProviderClass(transletName, true);
+ resetTransientAttributes();
+
+ return new TemplatesImpl(new Class[]{clazz}, transletName, null, _indentNumber, this);
+ }
+ catch (ClassNotFoundException cnfe) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.CLASS_NOT_FOUND_ERR, transletName);
+ throw new TransformerConfigurationException(err.toString());
+ }
+ catch (Exception e) {
+ ErrorMsg err = new ErrorMsg(
new ErrorMsg(ErrorMsg.RUNTIME_ERROR_KEY)
+ e.getMessage());
- throw new TransformerConfigurationException(err.toString());
- }
- }
-
- // If _autoTranslet is true, we will try to load the bytecodes
- // from the translet classes without compiling the stylesheet.
- if (_autoTranslet) {
- byte[][] bytecodes = null;
- String transletClassName = getTransletBaseName(source);
-
- if (_packageName != null)
- transletClassName = _packageName + "." + transletClassName;
-
- if (_jarFileName != null)
- bytecodes = getBytecodesFromJar(source, transletClassName);
- else
- bytecodes = getBytecodesFromClasses(source, transletClassName);
-
- if (bytecodes != null) {
- if (_debug) {
- if (_jarFileName != null)
- System.err.println(new ErrorMsg(
- ErrorMsg.TRANSFORM_WITH_JAR_STR, transletClassName, _jarFileName));
- else
- System.err.println(new ErrorMsg(
- ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, transletClassName));
- }
+ throw new TransformerConfigurationException(err.toString());
+ }
+ }
+
+ // If _autoTranslet is true, we will try to load the bytecodes
+ // from the translet classes without compiling the stylesheet.
+ if (_autoTranslet) {
+ byte[][] bytecodes = null;
+ String transletClassName = getTransletBaseName(source);
+
+ if (_packageName != null)
+ transletClassName = _packageName + "." + transletClassName;
+
+ if (_jarFileName != null)
+ bytecodes = getBytecodesFromJar(source, transletClassName);
+ else
+ bytecodes = getBytecodesFromClasses(source, transletClassName);
+
+ if (bytecodes != null) {
+ if (_debug) {
+ if (_jarFileName != null)
+ System.err.println(new ErrorMsg(
+ ErrorMsg.TRANSFORM_WITH_JAR_STR, transletClassName, _jarFileName));
+ else
+ System.err.println(new ErrorMsg(
+ ErrorMsg.TRANSFORM_WITH_TRANSLET_STR, transletClassName));
+ }
- // Reset the per-session attributes to their default values
- // after each newTemplates() call.
- resetTransientAttributes();
-
- return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this);
- }
- }
-
- // Create and initialize a stylesheet compiler
- final XSLTC xsltc = new XSLTC();
- if (_debug) xsltc.setDebug(true);
- if (_enableInlining) xsltc.setTemplateInlining(true);
- if (!_isNotSecureProcessing) xsltc.setSecureProcessing(true);
- xsltc.init();
+ // Reset the per-session attributes to their default values
+ // after each newTemplates() call.
+ resetTransientAttributes();
+
+ return new TemplatesImpl(bytecodes, transletClassName, null, _indentNumber, this);
+ }
+ }
+
+ // Create and initialize a stylesheet compiler
+ final XSLTC xsltc = new XSLTC(_useServicesMechanism);
+ if (_debug) xsltc.setDebug(true);
+ if (_enableInlining)
+ xsltc.setTemplateInlining(true);
+ else
+ xsltc.setTemplateInlining(false);
- // Set a document loader (for xsl:include/import) if defined
- if (_uriResolver != null) {
- xsltc.setSourceLoader(this);
- }
+ if (!_isNotSecureProcessing) xsltc.setSecureProcessing(true);
+ xsltc.init();
+
+ // Set a document loader (for xsl:include/import) if defined
+ if (_uriResolver != null) {
+ xsltc.setSourceLoader(this);
+ }
- // Pass parameters to the Parser to make sure it locates the correct
- // PI in an XML input document
- if ((_piParams != null) && (_piParams.get(source) != null)) {
- // Get the parameters for this Source object
- PIParamWrapper p = (PIParamWrapper)_piParams.get(source);
- // Pass them on to the compiler (which will pass then to the parser)
- if (p != null) {
- xsltc.setPIParameters(p._media, p._title, p._charset);
- }
- }
+ // Pass parameters to the Parser to make sure it locates the correct
+ // PI in an XML input document
+ if ((_piParams != null) && (_piParams.get(source) != null)) {
+ // Get the parameters for this Source object
+ PIParamWrapper p = (PIParamWrapper)_piParams.get(source);
+ // Pass them on to the compiler (which will pass then to the parser)
+ if (p != null) {
+ xsltc.setPIParameters(p._media, p._title, p._charset);
+ }
+ }
- // Set the attributes for translet generation
- int outputType = XSLTC.BYTEARRAY_OUTPUT;
- if (_generateTranslet || _autoTranslet) {
- // Set the translet name
- xsltc.setClassName(getTransletBaseName(source));
-
- if (_destinationDirectory != null)
- xsltc.setDestDirectory(_destinationDirectory);
- else {
- String xslName = getStylesheetFileName(source);
- if (xslName != null) {
- File xslFile = new File(xslName);
- String xslDir = xslFile.getParent();
-
- if (xslDir != null)
- xsltc.setDestDirectory(xslDir);
- }
- }
-
- if (_packageName != null)
- xsltc.setPackageName(_packageName);
-
- if (_jarFileName != null) {
- xsltc.setJarFileName(_jarFileName);
- outputType = XSLTC.BYTEARRAY_AND_JAR_OUTPUT;
- }
- else
- outputType = XSLTC.BYTEARRAY_AND_FILE_OUTPUT;
- }
+ // Set the attributes for translet generation
+ int outputType = XSLTC.BYTEARRAY_OUTPUT;
+ if (_generateTranslet || _autoTranslet) {
+ // Set the translet name
+ xsltc.setClassName(getTransletBaseName(source));
+
+ if (_destinationDirectory != null)
+ xsltc.setDestDirectory(_destinationDirectory);
+ else {
+ String xslName = getStylesheetFileName(source);
+ if (xslName != null) {
+ File xslFile = new File(xslName);
+ String xslDir = xslFile.getParent();
+
+ if (xslDir != null)
+ xsltc.setDestDirectory(xslDir);
+ }
+ }
+
+ if (_packageName != null)
+ xsltc.setPackageName(_packageName);
+
+ if (_jarFileName != null) {
+ xsltc.setJarFileName(_jarFileName);
+ outputType = XSLTC.BYTEARRAY_AND_JAR_OUTPUT;
+ }
+ else
+ outputType = XSLTC.BYTEARRAY_AND_FILE_OUTPUT;
+ }
- // Compile the stylesheet
- final InputSource input = Util.getInputSource(xsltc, source);
- byte[][] bytecodes = xsltc.compile(null, input, outputType);
- final String transletName = xsltc.getClassName();
+ // Compile the stylesheet
+ final InputSource input = Util.getInputSource(xsltc, source);
+ byte[][] bytecodes = xsltc.compile(null, input, outputType);
+ final String transletName = xsltc.getClassName();
- // Output to the jar file if the jar file name is set.
- if ((_generateTranslet || _autoTranslet)
- && bytecodes != null && _jarFileName != null) {
- try {
- xsltc.outputToJar();
- }
- catch (java.io.IOException e) { }
- }
+ // Output to the jar file if the jar file name is set.
+ if ((_generateTranslet || _autoTranslet)
+ && bytecodes != null && _jarFileName != null) {
+ try {
+ xsltc.outputToJar();
+ }
+ catch (java.io.IOException e) { }
+ }
- // Reset the per-session attributes to their default values
- // after each newTemplates() call.
- resetTransientAttributes();
+ // Reset the per-session attributes to their default values
+ // after each newTemplates() call.
+ resetTransientAttributes();
- // Pass compiler warnings to the error listener
- if (_errorListener != this) {
- try {
- passWarningsToListener(xsltc.getWarnings());
- }
- catch (TransformerException e) {
- throw new TransformerConfigurationException(e);
- }
- }
- else {
- xsltc.printWarnings();
- }
+ // Pass compiler warnings to the error listener
+ if (_errorListener != this) {
+ try {
+ passWarningsToListener(xsltc.getWarnings());
+ }
+ catch (TransformerException e) {
+ throw new TransformerConfigurationException(e);
+ }
+ }
+ else {
+ xsltc.printWarnings();
+ }
- // Check that the transformation went well before returning
+ // Check that the transformation went well before returning
if (bytecodes == null) {
-
+
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_COMPILE_ERR);
TransformerConfigurationException exc = new TransformerConfigurationException(err.toString());
-
+
// Pass compiler errors to the error listener
if (_errorListener != null) {
passErrorsToListener(xsltc.getErrors());
-
+
// As required by TCK 1.2, send a fatalError to the
// error listener because compilation of the stylesheet
// failed and no further processing will be possible.
@@ -853,7 +893,7 @@
_errorListener.fatalError(exc);
} catch (TransformerException te) {
// well, we tried.
- }
+ }
}
else {
xsltc.printErrors();
@@ -861,8 +901,8 @@
throw exc;
}
- return new TemplatesImpl(bytecodes, transletName,
- xsltc.getOutputProperties(), _indentNumber, this);
+ return new TemplatesImpl(bytecodes, transletName,
+ xsltc.getOutputProperties(), _indentNumber, this);
}
/**
@@ -873,15 +913,15 @@
* @return A TemplatesHandler object that can handle SAX events
* @throws TransformerConfigurationException
*/
- public TemplatesHandler newTemplatesHandler()
- throws TransformerConfigurationException
- {
- final TemplatesHandlerImpl handler =
- new TemplatesHandlerImpl(_indentNumber, this);
- if (_uriResolver != null) {
- handler.setURIResolver(_uriResolver);
- }
- return handler;
+ public TemplatesHandler newTemplatesHandler()
+ throws TransformerConfigurationException
+ {
+ final TemplatesHandlerImpl handler =
+ new TemplatesHandlerImpl(_indentNumber, this);
+ if (_uriResolver != null) {
+ handler.setURIResolver(_uriResolver);
+ }
+ return handler;
}
/**
@@ -892,14 +932,14 @@
* @return A TransformerHandler object that can handle SAX events
* @throws TransformerConfigurationException
*/
- public TransformerHandler newTransformerHandler()
- throws TransformerConfigurationException
+ public TransformerHandler newTransformerHandler()
+ throws TransformerConfigurationException
{
- final Transformer transformer = newTransformer();
- if (_uriResolver != null) {
- transformer.setURIResolver(_uriResolver);
- }
- return new TransformerHandlerImpl((TransformerImpl) transformer);
+ final Transformer transformer = newTransformer();
+ if (_uriResolver != null) {
+ transformer.setURIResolver(_uriResolver);
+ }
+ return new TransformerHandlerImpl((TransformerImpl) transformer);
}
/**
@@ -912,14 +952,14 @@
* @return A TransformerHandler object that can handle SAX events
* @throws TransformerConfigurationException
*/
- public TransformerHandler newTransformerHandler(Source src)
- throws TransformerConfigurationException
- {
- final Transformer transformer = newTransformer(src);
- if (_uriResolver != null) {
- transformer.setURIResolver(_uriResolver);
- }
- return new TransformerHandlerImpl((TransformerImpl) transformer);
+ public TransformerHandler newTransformerHandler(Source src)
+ throws TransformerConfigurationException
+ {
+ final Transformer transformer = newTransformer(src);
+ if (_uriResolver != null) {
+ transformer.setURIResolver(_uriResolver);
+ }
+ return new TransformerHandlerImpl((TransformerImpl) transformer);
}
/**
@@ -931,13 +971,13 @@
* @param templates Represents a pre-processed stylesheet
* @return A TransformerHandler object that can handle SAX events
* @throws TransformerConfigurationException
- */
- public TransformerHandler newTransformerHandler(Templates templates)
- throws TransformerConfigurationException
+ */
+ public TransformerHandler newTransformerHandler(Templates templates)
+ throws TransformerConfigurationException
{
- final Transformer transformer = templates.newTransformer();
- final TransformerImpl internal = (TransformerImpl)transformer;
- return new TransformerHandlerImpl(internal);
+ final Transformer transformer = templates.newTransformer();
+ final TransformerImpl internal = (TransformerImpl)transformer;
+ return new TransformerHandlerImpl(internal);
}
/**
@@ -949,12 +989,12 @@
* @return An XMLFilter object, or null if this feature is not supported.
* @throws TransformerConfigurationException
*/
- public XMLFilter newXMLFilter(Source src)
- throws TransformerConfigurationException
+ public XMLFilter newXMLFilter(Source src)
+ throws TransformerConfigurationException
{
- Templates templates = newTemplates(src);
- if (templates == null) return null;
- return newXMLFilter(templates);
+ Templates templates = newTemplates(src);
+ if (templates == null) return null;
+ return newXMLFilter(templates);
}
/**
@@ -966,41 +1006,41 @@
* @return An XMLFilter object, or null if this feature is not supported.
* @throws TransformerConfigurationException
*/
- public XMLFilter newXMLFilter(Templates templates)
- throws TransformerConfigurationException
+ public XMLFilter newXMLFilter(Templates templates)
+ throws TransformerConfigurationException
{
- try {
- return new com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter(templates);
- }
- catch (TransformerConfigurationException e1) {
- if (_errorListener != null) {
+ try {
+ return new com.sun.org.apache.xalan.internal.xsltc.trax.TrAXFilter(templates);
+ }
+ catch (TransformerConfigurationException e1) {
+ if (_errorListener != null) {
try {
- _errorListener.fatalError(e1);
- return null;
- }
- catch (TransformerException e2) {
- new TransformerConfigurationException(e2);
- }
- }
- throw e1;
- }
+ _errorListener.fatalError(e1);
+ return null;
+ }
+ catch (TransformerException e2) {
+ new TransformerConfigurationException(e2);
+ }
+ }
+ throw e1;
+ }
}
/**
- * Receive notification of a recoverable error.
+ * Receive notification of a recoverable error.
* The transformer must continue to provide normal parsing events after
* invoking this method. It should still be possible for the application
* to process the document through to the end.
*
- * @param e The warning information encapsulated in a transformer
+ * @param e The warning information encapsulated in a transformer
* exception.
* @throws TransformerException if the application chooses to discontinue
* the transformation (always does in our case).
*/
public void error(TransformerException e)
- throws TransformerException
+ throws TransformerException
{
- Throwable wrapped = e.getException();
+ Throwable wrapped = e.getException();
if (wrapped != null) {
System.err.println(new ErrorMsg(ErrorMsg.ERROR_PLUS_WRAPPED_MSG,
e.getMessageAndLocation(),
@@ -1008,12 +1048,12 @@
} else {
System.err.println(new ErrorMsg(ErrorMsg.ERROR_MSG,
e.getMessageAndLocation()));
- }
- throw e;
+ }
+ throw e;
}
/**
- * Receive notification of a non-recoverable error.
+ * Receive notification of a non-recoverable error.
* The application must assume that the transformation cannot continue
* after the Transformer has invoked this method, and should continue
* (if at all) only to collect addition error messages. In fact,
@@ -1026,9 +1066,9 @@
* the transformation (always does in our case).
*/
public void fatalError(TransformerException e)
- throws TransformerException
+ throws TransformerException
{
- Throwable wrapped = e.getException();
+ Throwable wrapped = e.getException();
if (wrapped != null) {
System.err.println(new ErrorMsg(ErrorMsg.FATAL_ERR_PLUS_WRAPPED_MSG,
e.getMessageAndLocation(),
@@ -1037,7 +1077,7 @@
System.err.println(new ErrorMsg(ErrorMsg.FATAL_ERR_MSG,
e.getMessageAndLocation()));
}
- throw e;
+ throw e;
}
/**
@@ -1054,14 +1094,14 @@
* the transformation (never does in our case).
*/
public void warning(TransformerException e)
- throws TransformerException
+ throws TransformerException
{
- Throwable wrapped = e.getException();
- if (wrapped != null) {
+ Throwable wrapped = e.getException();
+ if (wrapped != null) {
System.err.println(new ErrorMsg(ErrorMsg.WARNING_PLUS_WRAPPED_MSG,
e.getMessageAndLocation(),
wrapped.getMessage()));
- } else {
+ } else {
System.err.println(new ErrorMsg(ErrorMsg.WARNING_MSG,
e.getMessageAndLocation()));
}
@@ -1077,33 +1117,33 @@
* @return An InputSource with the loaded document
*/
public InputSource loadSource(String href, String context, XSLTC xsltc) {
- try {
- if (_uriResolver != null) {
- final Source source = _uriResolver.resolve(href, context);
- if (source != null) {
- return Util.getInputSource(xsltc, source);
- }
- }
- }
- catch (TransformerException e) {
- // should catch it when the resolver explicitly throws the exception
+ try {
+ if (_uriResolver != null) {
+ final Source source = _uriResolver.resolve(href, context);
+ if (source != null) {
+ return Util.getInputSource(xsltc, source);
+ }
+ }
+ }
+ catch (TransformerException e) {
+ // should catch it when the resolver explicitly throws the exception
final ErrorMsg msg = new ErrorMsg(ErrorMsg.INVALID_URI_ERR, href + "\n" + e.getMessage(), this);
xsltc.getParser().reportError(Constants.FATAL, msg);
- }
-
- return null;
+ }
+
+ return null;
}
/**
* Reset the per-session attributes to their default values
*/
private void resetTransientAttributes() {
- _transletName = DEFAULT_TRANSLET_NAME;
- _destinationDirectory = null;
- _packageName = null;
- _jarFileName = null;
+ _transletName = DEFAULT_TRANSLET_NAME;
+ _destinationDirectory = null;
+ _packageName = null;
+ _jarFileName = null;
}
-
+
/**
* Load the translet classes from local .class files and return
* the bytecode array.
@@ -1114,134 +1154,134 @@
*/
private byte[][] getBytecodesFromClasses(Source source, String fullClassName)
{
- if (fullClassName == null)
- return null;
-
- String xslFileName = getStylesheetFileName(source);
- File xslFile = null;
- if (xslFileName != null)
- xslFile = new File(xslFileName);
-
- // Find the base name of the translet
- final String transletName;
- int lastDotIndex = fullClassName.lastIndexOf('.');
- if (lastDotIndex > 0)
- transletName = fullClassName.substring(lastDotIndex+1);
- else
- transletName = fullClassName;
-
- // Construct the path name for the translet class file
- String transletPath = fullClassName.replace('.', '/');
- if (_destinationDirectory != null) {
- transletPath = _destinationDirectory + "/" + transletPath + ".class";
- }
- else {
- if (xslFile != null && xslFile.getParent() != null)
- transletPath = xslFile.getParent() + "/" + transletPath + ".class";
- else
- transletPath = transletPath + ".class";
- }
-
- // Return null if the translet class file does not exist.
- File transletFile = new File(transletPath);
- if (!transletFile.exists())
- return null;
-
- // Compare the timestamps of the translet and the xsl file.
- // If the translet is older than the xsl file, return null
- // so that the xsl file is used for the transformation and
- // the translet is regenerated.
- if (xslFile != null && xslFile.exists()) {
- long xslTimestamp = xslFile.lastModified();
- long transletTimestamp = transletFile.lastModified();
- if (transletTimestamp < xslTimestamp)
- return null;
- }
-
- // Load the translet into a bytecode array.
- Vector bytecodes = new Vector();
- int fileLength = (int)transletFile.length();
- if (fileLength > 0) {
- FileInputStream input = null;
- try {
- input = new FileInputStream(transletFile);
- }
- catch (FileNotFoundException e) {
- return null;
- }
-
- byte[] bytes = new byte[fileLength];
- try {
- readFromInputStream(bytes, input, fileLength);
- input.close();
- }
- catch (IOException e) {
- return null;
- }
-
- bytecodes.addElement(bytes);
- }
- else
- return null;
-
- // Find the parent directory of the translet.
- String transletParentDir = transletFile.getParent();
- if (transletParentDir == null)
- transletParentDir = System.getProperty("user.dir");
-
- File transletParentFile = new File(transletParentDir);
-
- // Find all the auxiliary files which have a name pattern of "transletClass$nnn.class".
- final String transletAuxPrefix = transletName + "$";
- File[] auxfiles = transletParentFile.listFiles(new FilenameFilter() {
- public boolean accept(File dir, String name)
- {
- return (name.endsWith(".class") && name.startsWith(transletAuxPrefix));
- }
- });
-
- // Load the auxiliary class files and add them to the bytecode array.
- for (int i = 0; i < auxfiles.length; i++)
- {
- File auxfile = auxfiles[i];
- int auxlength = (int)auxfile.length();
- if (auxlength > 0) {
- FileInputStream auxinput = null;
- try {
- auxinput = new FileInputStream(auxfile);
- }
- catch (FileNotFoundException e) {
- continue;
- }
-
- byte[] bytes = new byte[auxlength];
-
- try {
- readFromInputStream(bytes, auxinput, auxlength);
- auxinput.close();
- }
- catch (IOException e) {
- continue;
- }
-
- bytecodes.addElement(bytes);
- }
- }
-
- // Convert the Vector of byte[] to byte[][].
- final int count = bytecodes.size();
- if ( count > 0) {
- final byte[][] result = new byte[count][1];
- for (int i = 0; i < count; i++) {
- result[i] = (byte[])bytecodes.elementAt(i);
- }
-
- return result;
- }
- else
- return null;
+ if (fullClassName == null)
+ return null;
+
+ String xslFileName = getStylesheetFileName(source);
+ File xslFile = null;
+ if (xslFileName != null)
+ xslFile = new File(xslFileName);
+
+ // Find the base name of the translet
+ final String transletName;
+ int lastDotIndex = fullClassName.lastIndexOf('.');
+ if (lastDotIndex > 0)
+ transletName = fullClassName.substring(lastDotIndex+1);
+ else
+ transletName = fullClassName;
+
+ // Construct the path name for the translet class file
+ String transletPath = fullClassName.replace('.', '/');
+ if (_destinationDirectory != null) {
+ transletPath = _destinationDirectory + "/" + transletPath + ".class";
+ }
+ else {
+ if (xslFile != null && xslFile.getParent() != null)
+ transletPath = xslFile.getParent() + "/" + transletPath + ".class";
+ else
+ transletPath = transletPath + ".class";
+ }
+
+ // Return null if the translet class file does not exist.
+ File transletFile = new File(transletPath);
+ if (!transletFile.exists())
+ return null;
+
+ // Compare the timestamps of the translet and the xsl file.
+ // If the translet is older than the xsl file, return null
+ // so that the xsl file is used for the transformation and
+ // the translet is regenerated.
+ if (xslFile != null && xslFile.exists()) {
+ long xslTimestamp = xslFile.lastModified();
+ long transletTimestamp = transletFile.lastModified();
+ if (transletTimestamp < xslTimestamp)
+ return null;
+ }
+
+ // Load the translet into a bytecode array.
+ Vector bytecodes = new Vector();
+ int fileLength = (int)transletFile.length();
+ if (fileLength > 0) {
+ FileInputStream input = null;
+ try {
+ input = new FileInputStream(transletFile);
+ }
+ catch (FileNotFoundException e) {
+ return null;
+ }
+
+ byte[] bytes = new byte[fileLength];
+ try {
+ readFromInputStream(bytes, input, fileLength);
+ input.close();
+ }
+ catch (IOException e) {
+ return null;
+ }
+
+ bytecodes.addElement(bytes);
+ }
+ else
+ return null;
+
+ // Find the parent directory of the translet.
+ String transletParentDir = transletFile.getParent();
+ if (transletParentDir == null)
+ transletParentDir = System.getProperty("user.dir");
+
+ File transletParentFile = new File(transletParentDir);
+
+ // Find all the auxiliary files which have a name pattern of "transletClass$nnn.class".
+ final String transletAuxPrefix = transletName + "$";
+ File[] auxfiles = transletParentFile.listFiles(new FilenameFilter() {
+ public boolean accept(File dir, String name)
+ {
+ return (name.endsWith(".class") && name.startsWith(transletAuxPrefix));
+ }
+ });
+
+ // Load the auxiliary class files and add them to the bytecode array.
+ for (int i = 0; i < auxfiles.length; i++)
+ {
+ File auxfile = auxfiles[i];
+ int auxlength = (int)auxfile.length();
+ if (auxlength > 0) {
+ FileInputStream auxinput = null;
+ try {
+ auxinput = new FileInputStream(auxfile);
+ }
+ catch (FileNotFoundException e) {
+ continue;
+ }
+
+ byte[] bytes = new byte[auxlength];
+
+ try {
+ readFromInputStream(bytes, auxinput, auxlength);
+ auxinput.close();
+ }
+ catch (IOException e) {
+ continue;
+ }
+
+ bytecodes.addElement(bytes);
+ }
+ }
+
+ // Convert the Vector of byte[] to byte[][].
+ final int count = bytecodes.size();
+ if ( count > 0) {
+ final byte[][] result = new byte[count][1];
+ for (int i = 0; i < count; i++) {
+ result[i] = (byte[])bytecodes.elementAt(i);
+ }
+
+ return result;
+ }
+ else
+ return null;
}
-
+
/**
* Load the translet classes from the jar file and return the bytecode.
*
@@ -1251,91 +1291,91 @@
*/
private byte[][] getBytecodesFromJar(Source source, String fullClassName)
{
- String xslFileName = getStylesheetFileName(source);
- File xslFile = null;
- if (xslFileName != null)
- xslFile = new File(xslFileName);
-
- // Construct the path for the jar file
- String jarPath = null;
- if (_destinationDirectory != null)
+ String xslFileName = getStylesheetFileName(source);
+ File xslFile = null;
+ if (xslFileName != null)
+ xslFile = new File(xslFileName);
+
+ // Construct the path for the jar file
+ String jarPath = null;
+ if (_destinationDirectory != null)
jarPath = _destinationDirectory + "/" + _jarFileName;
- else {
- if (xslFile != null && xslFile.getParent() != null)
- jarPath = xslFile.getParent() + "/" + _jarFileName;
- else
- jarPath = _jarFileName;
- }
-
- // Return null if the jar file does not exist.
- File file = new File(jarPath);
- if (!file.exists())
+ else {
+ if (xslFile != null && xslFile.getParent() != null)
+ jarPath = xslFile.getParent() + "/" + _jarFileName;
+ else
+ jarPath = _jarFileName;
+ }
+
+ // Return null if the jar file does not exist.
+ File file = new File(jarPath);
+ if (!file.exists())
return null;
- // Compare the timestamps of the jar file and the xsl file. Return null
- // if the xsl file is newer than the jar file.
- if (xslFile != null && xslFile.exists()) {
- long xslTimestamp = xslFile.lastModified();
- long transletTimestamp = file.lastModified();
- if (transletTimestamp < xslTimestamp)
- return null;
- }
-
- // Create a ZipFile object for the jar file
- ZipFile jarFile = null;
- try {
+ // Compare the timestamps of the jar file and the xsl file. Return null
+ // if the xsl file is newer than the jar file.
+ if (xslFile != null && xslFile.exists()) {
+ long xslTimestamp = xslFile.lastModified();
+ long transletTimestamp = file.lastModified();
+ if (transletTimestamp < xslTimestamp)
+ return null;
+ }
+
+ // Create a ZipFile object for the jar file
+ ZipFile jarFile = null;
+ try {
jarFile = new ZipFile(file);
- }
- catch (IOException e) {
+ }
+ catch (IOException e) {
return null;
- }
-
- String transletPath = fullClassName.replace('.', '/');
- String transletAuxPrefix = transletPath + "$";
- String transletFullName = transletPath + ".class";
-
- Vector bytecodes = new Vector();
-
- // Iterate through all entries in the jar file to find the
- // translet and auxiliary classes.
- Enumeration entries = jarFile.entries();
- while (entries.hasMoreElements())
- {
+ }
+
+ String transletPath = fullClassName.replace('.', '/');
+ String transletAuxPrefix = transletPath + "$";
+ String transletFullName = transletPath + ".class";
+
+ Vector bytecodes = new Vector();
+
+ // Iterate through all entries in the jar file to find the
+ // translet and auxiliary classes.
+ Enumeration entries = jarFile.entries();
+ while (entries.hasMoreElements())
+ {
ZipEntry entry = (ZipEntry)entries.nextElement();
String entryName = entry.getName();
- if (entry.getSize() > 0 &&
- (entryName.equals(transletFullName) ||
- (entryName.endsWith(".class") &&
- entryName.startsWith(transletAuxPrefix))))
+ if (entry.getSize() > 0 &&
+ (entryName.equals(transletFullName) ||
+ (entryName.endsWith(".class") &&
+ entryName.startsWith(transletAuxPrefix))))
{
- try {
- InputStream input = jarFile.getInputStream(entry);
- int size = (int)entry.getSize();
- byte[] bytes = new byte[size];
- readFromInputStream(bytes, input, size);
- input.close();
- bytecodes.addElement(bytes);
- }
- catch (IOException e) {
- return null;
- }
+ try {
+ InputStream input = jarFile.getInputStream(entry);
+ int size = (int)entry.getSize();
+ byte[] bytes = new byte[size];
+ readFromInputStream(bytes, input, size);
+ input.close();
+ bytecodes.addElement(bytes);
+ }
+ catch (IOException e) {
+ return null;
+ }
}
- }
-
+ }
+
// Convert the Vector of byte[] to byte[][].
- final int count = bytecodes.size();
- if (count > 0) {
- final byte[][] result = new byte[count][1];
- for (int i = 0; i < count; i++) {
- result[i] = (byte[])bytecodes.elementAt(i);
- }
-
- return result;
- }
- else
- return null;
+ final int count = bytecodes.size();
+ if (count > 0) {
+ final byte[][] result = new byte[count][1];
+ for (int i = 0; i < count; i++) {
+ result[i] = (byte[])bytecodes.elementAt(i);
+ }
+
+ return result;
+ }
+ else
+ return null;
}
-
+
/**
* Read a given number of bytes from the InputStream into a byte array.
*
@@ -1344,7 +1384,7 @@
* @param size The number of bytes to read.
*/
private void readFromInputStream(byte[] bytes, InputStream input, int size)
- throws IOException
+ throws IOException
{
int n = 0;
int offset = 0;
@@ -1352,7 +1392,7 @@
while (length > 0 && (n = input.read(bytes, offset, length)) > 0) {
offset = offset + n;
length = length - n;
- }
+ }
}
/**
@@ -1367,24 +1407,24 @@
* @return The name of the translet class
*/
private String getTransletBaseName(Source source)
- {
+ {
String transletBaseName = null;
if (!_transletName.equals(DEFAULT_TRANSLET_NAME))
return _transletName;
- else {
+ else {
String systemId = source.getSystemId();
if (systemId != null) {
- String baseName = Util.baseName(systemId);
- if (baseName != null) {
- baseName = Util.noExtName(baseName);
- transletBaseName = Util.toJavaName(baseName);
- }
+ String baseName = Util.baseName(systemId);
+ if (baseName != null) {
+ baseName = Util.noExtName(baseName);
+ transletBaseName = Util.toJavaName(baseName);
+ }
}
- }
-
+ }
+
return (transletBaseName != null) ? transletBaseName : DEFAULT_TRANSLET_NAME;
}
-
+
/**
* Return the local file name from the systemId of the Source object
*
@@ -1394,27 +1434,27 @@
*/
private String getStylesheetFileName(Source source)
{
- String systemId = source.getSystemId();
- if (systemId != null) {
+ String systemId = source.getSystemId();
+ if (systemId != null) {
File file = new File(systemId);
if (file.exists())
return systemId;
else {
- URL url = null;
- try {
- url = new URL(systemId);
- }
- catch (MalformedURLException e) {
- return null;
- }
-
- if ("file".equals(url.getProtocol()))
- return url.getFile();
- else
- return null;
+ URL url = null;
+ try {
+ url = new URL(systemId);
+ }
+ catch (MalformedURLException e) {
+ return null;
+ }
+
+ if ("file".equals(url.getProtocol()))
+ return url.getFile();
+ else
+ return null;
}
- }
- else
+ }
+ else
return null;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -23,6 +23,7 @@
package com.sun.org.apache.xalan.internal.xsltc.trax;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -102,16 +103,16 @@
private final static String XML_STRING = "xml";
private final static String LEXICAL_HANDLER_PROPERTY =
- "http://xml.org/sax/properties/lexical-handler";
+ "http://xml.org/sax/properties/lexical-handler";
private static final String NAMESPACE_FEATURE =
- "http://xml.org/sax/features/namespaces";
-
+ "http://xml.org/sax/features/namespaces";
+
/**
* Namespace prefixes feature for {@link XMLReader}.
*/
private static final String NAMESPACE_PREFIXES_FEATURE =
"http://xml.org/sax/features/namespace-prefixes";
-
+
/**
* A reference to the translet or null if the identity transform.
*/
@@ -182,15 +183,15 @@
/**
* A reference to an object that creates and caches XMLReader objects.
*/
- private XMLReaderManager _readerManager = XMLReaderManager.getInstance();
-
+ private XMLReaderManager _readerManager;
+
/**
* A flag indicating whether we use incremental building of the DTM.
*/
//private boolean _isIncremental = false;
/**
- * A flag indicating whether this transformer implements the identity
+ * A flag indicating whether this transformer implements the identity
* transform.
*/
private boolean _isIdentity = false;
@@ -201,8 +202,15 @@
private boolean _isSecureProcessing = false;
/**
+ * Indicates whether implementation parts should use
+ * service loader (or similar).
+ * Note the default value (false) is the safe option..
+ */
+ private boolean _useServicesMechanism;
+
+ /**
* A hashtable to store parameters for the identity transform. These
- * are not needed during the transformation, but we must keep track of
+ * are not needed during the transformation, but we must keep track of
* them to be fully complaint with the JAXP API.
*/
private Hashtable _parameters = null;
@@ -211,47 +219,49 @@
* This class wraps an ErrorListener into a MessageHandler in order to
* capture messages reported via xsl:message.
*/
- static class MessageHandler
- extends com.sun.org.apache.xalan.internal.xsltc.runtime.MessageHandler
+ static class MessageHandler
+ extends com.sun.org.apache.xalan.internal.xsltc.runtime.MessageHandler
{
- private ErrorListener _errorListener;
-
- public MessageHandler(ErrorListener errorListener) {
- _errorListener = errorListener;
- }
-
- public void displayMessage(String msg) {
- if(_errorListener == null) {
- System.err.println(msg);
- }
- else {
- try {
- _errorListener.warning(new TransformerException(msg));
- }
- catch (TransformerException e) {
- // ignored
- }
- }
- }
+ private ErrorListener _errorListener;
+
+ public MessageHandler(ErrorListener errorListener) {
+ _errorListener = errorListener;
+ }
+
+ public void displayMessage(String msg) {
+ if(_errorListener == null) {
+ System.err.println(msg);
+ }
+ else {
+ try {
+ _errorListener.warning(new TransformerException(msg));
+ }
+ catch (TransformerException e) {
+ // ignored
+ }
+ }
+ }
}
- protected TransformerImpl(Properties outputProperties, int indentNumber,
- TransformerFactoryImpl tfactory)
+ protected TransformerImpl(Properties outputProperties, int indentNumber,
+ TransformerFactoryImpl tfactory)
{
- this(null, outputProperties, indentNumber, tfactory);
- _isIdentity = true;
- // _properties.put(OutputKeys.METHOD, "xml");
+ this(null, outputProperties, indentNumber, tfactory);
+ _isIdentity = true;
+ // _properties.put(OutputKeys.METHOD, "xml");
}
protected TransformerImpl(Translet translet, Properties outputProperties,
- int indentNumber, TransformerFactoryImpl tfactory)
+ int indentNumber, TransformerFactoryImpl tfactory)
{
- _translet = (AbstractTranslet) translet;
- _properties = createOutputProperties(outputProperties);
- _propertiesClone = (Properties) _properties.clone();
- _indentNumber = indentNumber;
- _tfactory = tfactory;
- //_isIncremental = tfactory._incremental;
+ _translet = (AbstractTranslet) translet;
+ _properties = createOutputProperties(outputProperties);
+ _propertiesClone = (Properties) _properties.clone();
+ _indentNumber = indentNumber;
+ _tfactory = tfactory;
+ _useServicesMechanism = _tfactory.useServicesMechnism();
+ _readerManager = XMLReaderManager.getInstance(_useServicesMechanism);
+ //_isIncremental = tfactory._incremental;
}
/**
@@ -260,24 +270,37 @@
public boolean isSecureProcessing() {
return _isSecureProcessing;
}
-
+
/**
* Set the state of the secure processing feature.
*/
public void setSecureProcessing(boolean flag) {
_isSecureProcessing = flag;
}
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return _useServicesMechanism;
+ }
+
+ /**
+ * Set the state of the services mechanism feature.
+ */
+ public void setServicesMechnism(boolean flag) {
+ _useServicesMechanism = flag;
+ }
/**
* Returns the translet wrapped inside this Transformer or
* null if this is the identity transform.
*/
protected AbstractTranslet getTranslet() {
- return _translet;
+ return _translet;
}
public boolean isIdentity() {
- return _isIdentity;
+ return _isIdentity;
}
/**
@@ -288,33 +311,33 @@
* @throws TransformerException
*/
public void transform(Source source, Result result)
- throws TransformerException
+ throws TransformerException
{
- if (!_isIdentity) {
- if (_translet == null) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_TRANSLET_ERR);
- throw new TransformerException(err.toString());
- }
- // Pass output properties to the translet
- transferOutputProperties(_translet);
- }
-
- final SerializationHandler toHandler = getOutputHandler(result);
- if (toHandler == null) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_HANDLER_ERR);
- throw new TransformerException(err.toString());
- }
+ if (!_isIdentity) {
+ if (_translet == null) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_TRANSLET_ERR);
+ throw new TransformerException(err.toString());
+ }
+ // Pass output properties to the translet
+ transferOutputProperties(_translet);
+ }
- if (_uriResolver != null && !_isIdentity) {
- _translet.setDOMCache(this);
- }
+ final SerializationHandler toHandler = getOutputHandler(result);
+ if (toHandler == null) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_HANDLER_ERR);
+ throw new TransformerException(err.toString());
+ }
- // Pass output properties to handler if identity
- if (_isIdentity) {
- transferOutputProperties(toHandler);
- }
+ if (_uriResolver != null && !_isIdentity) {
+ _translet.setDOMCache(this);
+ }
- transform(source, toHandler, _encoding);
+ // Pass output properties to handler if identity
+ if (_isIdentity) {
+ transferOutputProperties(toHandler);
+ }
+
+ transform(source, toHandler, _encoding);
try{
if (result instanceof DOMResult) {
((DOMResult)result).setNode(_tohFactory.getNode());
@@ -334,153 +357,147 @@
}
/**
- * Create an output handler for the transformation output based on
- * the type and contents of the TrAX Result object passed to the
- * transform() method.
+ * Create an output handler for the transformation output based on
+ * the type and contents of the TrAX Result object passed to the
+ * transform() method.
*/
- public SerializationHandler getOutputHandler(Result result)
- throws TransformerException
+ public SerializationHandler getOutputHandler(Result result)
+ throws TransformerException
{
- // Get output method using get() to ignore defaults
- _method = (String) _properties.get(OutputKeys.METHOD);
+ // Get output method using get() to ignore defaults
+ _method = (String) _properties.get(OutputKeys.METHOD);
- // Get encoding using getProperty() to use defaults
- _encoding = (String) _properties.getProperty(OutputKeys.ENCODING);
+ // Get encoding using getProperty() to use defaults
+ _encoding = (String) _properties.getProperty(OutputKeys.ENCODING);
- _tohFactory = TransletOutputHandlerFactory.newInstance();
- _tohFactory.setEncoding(_encoding);
- if (_method != null) {
- _tohFactory.setOutputMethod(_method);
- }
+ _tohFactory = TransletOutputHandlerFactory.newInstance(_useServicesMechanism);
+ _tohFactory.setEncoding(_encoding);
+ if (_method != null) {
+ _tohFactory.setOutputMethod(_method);
+ }
- // Set indentation number in the factory
- if (_indentNumber >= 0) {
- _tohFactory.setIndentNumber(_indentNumber);
- }
+ // Set indentation number in the factory
+ if (_indentNumber >= 0) {
+ _tohFactory.setIndentNumber(_indentNumber);
+ }
- // Return the content handler for this Result object
- try {
- // Result object could be SAXResult, DOMResult, or StreamResult
- if (result instanceof SAXResult) {
+ // Return the content handler for this Result object
+ try {
+ // Result object could be SAXResult, DOMResult, or StreamResult
+ if (result instanceof SAXResult) {
final SAXResult target = (SAXResult)result;
final ContentHandler handler = target.getHandler();
- _tohFactory.setHandler(handler);
+ _tohFactory.setHandler(handler);
/**
* Fix for bug 24414
* If the lexicalHandler is set then we need to get that
- * for obtaining the lexical information
+ * for obtaining the lexical information
*/
LexicalHandler lexicalHandler = target.getLexicalHandler();
if (lexicalHandler != null ) {
- _tohFactory.setLexicalHandler(lexicalHandler);
- }
+ _tohFactory.setLexicalHandler(lexicalHandler);
+ }
- _tohFactory.setOutputType(TransletOutputHandlerFactory.SAX);
- return _tohFactory.getSerializationHandler();
+ _tohFactory.setOutputType(TransletOutputHandlerFactory.SAX);
+ return _tohFactory.getSerializationHandler();
}
else if (result instanceof StAXResult) {
- if (((StAXResult) result).getXMLEventWriter() != null)
+ if (((StAXResult) result).getXMLEventWriter() != null)
_tohFactory.setXMLEventWriter(((StAXResult) result).getXMLEventWriter());
- else if (((StAXResult) result).getXMLStreamWriter() != null)
+ else if (((StAXResult) result).getXMLStreamWriter() != null)
_tohFactory.setXMLStreamWriter(((StAXResult) result).getXMLStreamWriter());
_tohFactory.setOutputType(TransletOutputHandlerFactory.STAX);
return _tohFactory.getSerializationHandler();
}
- else if (result instanceof DOMResult) {
- _tohFactory.setNode(((DOMResult) result).getNode());
- _tohFactory.setNextSibling(((DOMResult) result).getNextSibling());
- _tohFactory.setOutputType(TransletOutputHandlerFactory.DOM);
- return _tohFactory.getSerializationHandler();
+ else if (result instanceof DOMResult) {
+ _tohFactory.setNode(((DOMResult) result).getNode());
+ _tohFactory.setNextSibling(((DOMResult) result).getNextSibling());
+ _tohFactory.setOutputType(TransletOutputHandlerFactory.DOM);
+ return _tohFactory.getSerializationHandler();
}
- else if (result instanceof StreamResult) {
- // Get StreamResult
- final StreamResult target = (StreamResult) result;
+ else if (result instanceof StreamResult) {
+ // Get StreamResult
+ final StreamResult target = (StreamResult) result;
- // StreamResult may have been created with a java.io.File,
- // java.io.Writer, java.io.OutputStream or just a String
- // systemId.
+ // StreamResult may have been created with a java.io.File,
+ // java.io.Writer, java.io.OutputStream or just a String
+ // systemId.
- _tohFactory.setOutputType(TransletOutputHandlerFactory.STREAM);
+ _tohFactory.setOutputType(TransletOutputHandlerFactory.STREAM);
- // try to get a Writer from Result object
- final Writer writer = target.getWriter();
- if (writer != null) {
- _tohFactory.setWriter(writer);
- return _tohFactory.getSerializationHandler();
- }
+ // try to get a Writer from Result object
+ final Writer writer = target.getWriter();
+ if (writer != null) {
+ _tohFactory.setWriter(writer);
+ return _tohFactory.getSerializationHandler();
+ }
- // or try to get an OutputStream from Result object
- final OutputStream ostream = target.getOutputStream();
- if (ostream != null) {
- _tohFactory.setOutputStream(ostream);
- return _tohFactory.getSerializationHandler();
- }
+ // or try to get an OutputStream from Result object
+ final OutputStream ostream = target.getOutputStream();
+ if (ostream != null) {
+ _tohFactory.setOutputStream(ostream);
+ return _tohFactory.getSerializationHandler();
+ }
- // or try to get just a systemId string from Result object
- String systemId = result.getSystemId();
- if (systemId == null) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_RESULT_ERR);
+ // or try to get just a systemId string from Result object
+ String systemId = result.getSystemId();
+ if (systemId == null) {
+ ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_RESULT_ERR);
throw new TransformerException(err.toString());
- }
+ }
- // System Id may be in one of several forms, (1) a uri
- // that starts with 'file:', (2) uri that starts with 'http:'
- // or (3) just a filename on the local system.
- URL url = null;
+ // System Id may be in one of several forms, (1) a uri
+ // that starts with 'file:', (2) uri that starts with 'http:'
+ // or (3) just a filename on the local system.
+ URL url = null;
if (systemId.startsWith("file:")) {
// if StreamResult(File) or setSystemID(File) was used,
// the systemId will be URI encoded as a result of File.toURI(),
// it must be decoded for use by URL
try{
- Class clazz = ObjectFactory.findProviderClass("java.net.URI", ObjectFactory.findClassLoader(), true);
- Constructor construct = clazz.getConstructor(new Class[] {java.lang.String.class} );
- URI uri = (URI) construct.newInstance(new Object[]{systemId}) ;
+ URI uri = new URI(systemId) ;
systemId = "file:";
String host = uri.getHost(); // decoded String
String path = uri.getPath(); //decoded String
if (path == null) {
- path = "";
+ path = "";
}
// if host (URI authority) then file:// + host + path
// else just path (may be absolute or relative)
if (host != null) {
- systemId += "//" + host + path;
+ systemId += "//" + host + path;
} else {
- systemId += "//" + path;
+ systemId += "//" + path;
}
}
- catch(ClassNotFoundException e){
- // running on J2SE 1.3 which doesn't have URI Class so OK to ignore
- //ClassNotFoundException.
- }
catch (Exception exception) {
// URI exception which means nothing can be done so OK to ignore
}
-
+
url = new URL(systemId);
_ostream = new FileOutputStream(url.getFile());
- _tohFactory.setOutputStream(_ostream);
- return _tohFactory.getSerializationHandler();
+ _tohFactory.setOutputStream(_ostream);
+ return _tohFactory.getSerializationHandler();
}
else if (systemId.startsWith("http:")) {
url = new URL(systemId);
final URLConnection connection = url.openConnection();
- _tohFactory.setOutputStream(_ostream = connection.getOutputStream());
- return _tohFactory.getSerializationHandler();
+ _tohFactory.setOutputStream(_ostream = connection.getOutputStream());
+ return _tohFactory.getSerializationHandler();
}
else {
// system id is just a filename
- _tohFactory.setOutputStream(
- _ostream = new FileOutputStream(new File(systemId)));
- return _tohFactory.getSerializationHandler();
+ _tohFactory.setOutputStream(
+ _ostream = new FileOutputStream(new File(systemId)));
+ return _tohFactory.getSerializationHandler();
}
- }
- }
+ }
+ }
// If we cannot write to the location specified by the SystemId
catch (UnknownServiceException e) {
throw new TransformerException(e);
@@ -492,14 +509,14 @@
catch (IOException e) {
throw new TransformerException(e);
}
- return null;
+ return null;
}
/**
* Set the internal DOM that will be used for the next transformation
*/
protected void setDOM(DOM dom) {
- _dom = dom;
+ _dom = dom;
}
/**
@@ -516,7 +533,7 @@
} else {
wsfilter = null;
}
-
+
boolean hasIdCall = (_translet != null) ? _translet.hasIdCall()
: false;
@@ -524,6 +541,7 @@
_dtmManager =
(XSLTCDTMManager)_tfactory.getDTMManagerClass()
.newInstance();
+ _dtmManager.setServicesMechnism(_useServicesMechanism);
}
dom = (DOM)_dtmManager.getDTM(source, false, wsfilter, true,
false, false, 0, hasIdCall);
@@ -550,7 +568,7 @@
throw new TransformerException(e);
}
}
-
+
/**
* Returns the {@link com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl}
* object that create this Transformer
.
@@ -558,7 +576,7 @@
protected TransformerFactoryImpl getTransformerFactory() {
return _tfactory;
}
-
+
/**
* Returns the {@link com.sun.org.apache.xalan.internal.xsltc.runtime.output.TransletOutputHandlerFactory}
* object that create the TransletOutputHandler
.
@@ -568,7 +586,7 @@
}
private void transformIdentity(Source source, SerializationHandler handler)
- throws Exception
+ throws Exception
{
// Get systemId from source
if (source != null) {
@@ -595,15 +613,15 @@
InputSource input;
if (streamInput != null) {
input = new InputSource(streamInput);
- input.setSystemId(_sourceSystemId);
- }
+ input.setSystemId(_sourceSystemId);
+ }
else if (streamReader != null) {
input = new InputSource(streamReader);
- input.setSystemId(_sourceSystemId);
- }
+ input.setSystemId(_sourceSystemId);
+ }
else if (_sourceSystemId != null) {
input = new InputSource(_sourceSystemId);
- }
+ }
else {
ErrorMsg err = new ErrorMsg(ErrorMsg.JAXP_NO_SOURCE_ERR);
throw new TransformerException(err.toString());
@@ -646,7 +664,7 @@
} else if (source instanceof StAXSource) {
final StAXSource staxSource = (StAXSource)source;
StAXEvent2SAX staxevent2sax = null;
- StAXStream2SAX staxStream2SAX = null;
+ StAXStream2SAX staxStream2SAX = null;
if (staxSource.getXMLEventReader() != null) {
final XMLEventReader xmlEventReader = staxSource.getXMLEventReader();
staxevent2sax = new StAXEvent2SAX(xmlEventReader);
@@ -675,30 +693,28 @@
/**
* Internal transformation method - uses the internal APIs of XSLTC
*/
- private void transform(Source source, SerializationHandler handler,
- String encoding) throws TransformerException
+ private void transform(Source source, SerializationHandler handler,
+ String encoding) throws TransformerException
{
- try {
+ try {
/*
* According to JAXP1.2, new SAXSource()/StreamSource()
- * should create an empty input tree, with a default root node.
+ * should create an empty input tree, with a default root node.
* new DOMSource()creates an empty document using DocumentBuilder.
- * newDocument(); Use DocumentBuilder.newDocument() for all 3
- * situations, since there is no clear spec. how to create
+ * newDocument(); Use DocumentBuilder.newDocument() for all 3
+ * situations, since there is no clear spec. how to create
* an empty tree when both SAXSource() and StreamSource() are used.
*/
- if ((source instanceof StreamSource && source.getSystemId()==null
+ if ((source instanceof StreamSource && source.getSystemId()==null
&& ((StreamSource)source).getInputStream()==null &&
((StreamSource)source).getReader()==null)||
(source instanceof SAXSource &&
((SAXSource)source).getInputSource()==null &&
((SAXSource)source).getXMLReader()==null )||
- (source instanceof DOMSource &&
+ (source instanceof DOMSource &&
((DOMSource)source).getNode()==null)){
- DocumentBuilderFactory builderF =
- DocumentBuilderFactory.newInstance();
- DocumentBuilder builder =
- builderF.newDocumentBuilder();
+ DocumentBuilderFactory builderF = FactoryImpl.getDOMFactory(_useServicesMechanism);
+ DocumentBuilder builder = builderF.newDocumentBuilder();
String systemID = source.getSystemId();
source = new DOMSource(builder.newDocument());
@@ -706,33 +722,33 @@
if (systemID != null) {
source.setSystemId(systemID);
}
- }
- if (_isIdentity) {
- transformIdentity(source, handler);
- } else {
- _translet.transform(getDOM(source), handler);
- }
- } catch (TransletException e) {
- if (_errorListener != null) postErrorToListener(e.getMessage());
- throw new TransformerException(e);
- } catch (RuntimeException e) {
- if (_errorListener != null) postErrorToListener(e.getMessage());
- throw new TransformerException(e);
- } catch (Exception e) {
- if (_errorListener != null) postErrorToListener(e.getMessage());
- throw new TransformerException(e);
- } finally {
+ }
+ if (_isIdentity) {
+ transformIdentity(source, handler);
+ } else {
+ _translet.transform(getDOM(source), handler);
+ }
+ } catch (TransletException e) {
+ if (_errorListener != null) postErrorToListener(e.getMessage());
+ throw new TransformerException(e);
+ } catch (RuntimeException e) {
+ if (_errorListener != null) postErrorToListener(e.getMessage());
+ throw new TransformerException(e);
+ } catch (Exception e) {
+ if (_errorListener != null) postErrorToListener(e.getMessage());
+ throw new TransformerException(e);
+ } finally {
_dtmManager = null;
}
- // If we create an output stream for the Result, we need to close it after the transformation.
- if (_ostream != null) {
- try {
- _ostream.close();
- }
- catch (IOException e) {}
- _ostream = null;
- }
+ // If we create an output stream for the Result, we need to close it after the transformation.
+ if (_ostream != null) {
+ try {
+ _ostream.close();
+ }
+ catch (IOException e) {}
+ _ostream = null;
+ }
}
/**
@@ -741,8 +757,8 @@
*
* @return The error event handler currently in effect
*/
- public ErrorListener getErrorListener() {
- return _errorListener;
+ public ErrorListener getErrorListener() {
+ return _errorListener;
}
/**
@@ -755,17 +771,17 @@
* @throws IllegalArgumentException
*/
public void setErrorListener(ErrorListener listener)
- throws IllegalArgumentException {
+ throws IllegalArgumentException {
if (listener == null) {
- ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
- "Transformer");
+ ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
+ "Transformer");
throw new IllegalArgumentException(err.toString());
- }
+ }
_errorListener = listener;
-
- // Register a message handler to report xsl:messages
+
+ // Register a message handler to report xsl:messages
if (_translet != null)
- _translet.setMessageHandler(new MessageHandler(_errorListener));
+ _translet.setMessageHandler(new MessageHandler(_errorListener));
}
/**
@@ -774,8 +790,8 @@
private void postErrorToListener(String message) {
try {
_errorListener.error(new TransformerException(message));
- }
- catch (TransformerException e) {
+ }
+ catch (TransformerException e) {
// ignored - transformation cannot be continued
}
}
@@ -787,7 +803,7 @@
try {
_errorListener.warning(new TransformerException(message));
}
- catch (TransformerException e) {
+ catch (TransformerException e) {
// ignored - transformation cannot be continued
}
}
@@ -798,23 +814,23 @@
* list of elements given in the
*
*
*
- *
+ *
+ *
* @author Joseph Fialli
* @author Jeff Suttor
* @version $Id: DatatypeFactoryImpl.java,v 1.6 2010/05/19 05:02:55 joehw Exp $
*/
public class DatatypeFactoryImpl
- extends DatatypeFactory {
-
- /**
- * preventDefault()
* method was invoked by an EventListener; otherwise false.
*/
protected boolean dispatchEvent(NodeImpl node, Event event) {
if (event == null) return false;
-
+
// Can't use anyone else's implementation, since there's no public
// API for setting the event's processing-state fields.
EventImpl evt = (EventImpl)event;
@@ -668,7 +668,7 @@
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "UNSPECIFIED_EVENT_TYPE_ERR", null);
throw new EventException(EventException.UNSPECIFIED_EVENT_TYPE_ERR, msg);
}
-
+
// If nobody is listening for this event, discard immediately
LCount lc = LCount.lookup(evt.getType());
if (lc.total == 0)
@@ -681,12 +681,12 @@
evt.target = node;
evt.stopPropagation = false;
evt.preventDefault = false;
-
+
// Capture pre-event parentage chain, not including target;
// use pre-event-dispatch ancestors even if event handlers mutate
// document and change the target's context.
// Note that this is parents ONLY; events do not
- // cross the Attr/Element "blood/brain barrier".
+ // cross the Attr/Element "blood/brain barrier".
// DOMAttrModified. which looks like an exception,
// is issued to the Element rather than the Attr
// and causes a _second_ DOMSubtreeModified in the Element's
@@ -699,11 +699,11 @@
p = n;
n = n.getParentNode();
}
-
+
// CAPTURING_PHASE:
if (lc.captures > 0) {
evt.eventPhase = Event.CAPTURING_PHASE;
- // Ancestors are scanned, root to target, for
+ // Ancestors are scanned, root to target, for
// Capturing listeners.
for (int j = pv.size() - 1; j >= 0; --j) {
if (evt.stopPropagation)
@@ -732,8 +732,8 @@
}
}
}
-
-
+
+
// Both AT_TARGET and BUBBLE use non-capturing listeners.
if (lc.bubbles > 0) {
// AT_TARGET PHASE: Event is dispatched to NON-CAPTURING listeners
@@ -796,7 +796,7 @@
}
}
}
-
+
// DEFAULT PHASE: Some DOMs have default behaviors bound to specific
// nodes. If this DOM does, and if the event's preventDefault flag has
// not been set, we now return to the target node and process its
@@ -808,7 +808,7 @@
// DO_DEFAULT_OPERATION
}
- return evt.preventDefault;
+ return evt.preventDefault;
} // dispatchEvent(NodeImpl,Event) :boolean
/**
@@ -818,7 +818,7 @@
* pcdata()
method. A children content model will
- * contain additional groups and/or elements.
- *
- * @param augs Additional information that may include infoset
- * augmentations.
- * @throws XNIException Thrown by handler to signal an error.
- *
- * @see #any
- * @see #empty
- */
- public final void startGroup(Augmentations augs) throws XNIException {
- ++fDepth;
- initializeContentModelStacks();
- fMixed = false;
- } // startGroup()
-
- /**
- * The appearance of "#PCDATA" within a group signifying a
- * mixed content model. This method will be the first called
- * following the content model's startGroup()
.
- *
- *@param augs Additional information that may include infoset
- * augmentations.
- *
- * @throws XNIException Thrown by handler to signal an error.
- *
- * @see #startGroup
- */
- public final void pcdata(Augmentations augs) throws XNIException {
- fMixed = true;
- } // pcdata()
-
- /**
- * A referenced element in a mixed or children content model.
- *
- * @param elementName The name of the referenced element.
- * @param augs Additional information that may include infoset
- * augmentations.
- *
- * @throws XNIException Thrown by handler to signal an error.
- */
- public final void element(String elementName, Augmentations augs) throws XNIException {
- addToCurrentGroup(addUniqueLeafNode(elementName));
- } // element(String)
-
- /**
- * The separator between choices or sequences of a mixed or children
- * content model.
- *
- * @param separator The type of children separator.
- * @param augs Additional information that may include infoset
- * augmentations.
- * @throws XNIException Thrown by handler to signal an error.
- *
- * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_CHOICE
- * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_SEQUENCE
- */
- public final void separator(short separator, Augmentations augs) throws XNIException {
- if (separator == XMLDTDContentModelHandler.SEPARATOR_CHOICE) {
- fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_CHOICE;
- }
- else if (separator == XMLDTDContentModelHandler.SEPARATOR_SEQUENCE) {
- fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_SEQ;
- }
- } // separator(short)
-
- /**
- * The occurrence count for a child in a children content model or
- * for the mixed content model group.
- *
- * @param occurrence The occurrence count for the last element
- * or group.
- * @param augs Additional information that may include infoset
- * augmentations.
- * @throws XNIException Thrown by handler to signal an error.
- *
- * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_ONE
- * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_MORE
- * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ONE_OR_MORE
- */
- public final void occurrence(short occurrence, Augmentations augs) throws XNIException {
- if (!fMixed) {
- int currentIndex = fGroupIndexStackSizes[fDepth] - 1;
- if (occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE) {
- fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE, fGroupIndexStack[fDepth][currentIndex], -1);
- }
- else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE) {
- fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE, fGroupIndexStack[fDepth][currentIndex], -1);
- }
- else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE) {
- fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE, fGroupIndexStack[fDepth][currentIndex], -1);
- }
- }
- } // occurrence(short)
-
- /**
- * The end of a group for mixed or children content models.
- *
- * @param augs Additional information that may include infoset
- * augmentations.
- * @throws XNIException Thrown by handler to signal an error.
- */
- public final void endGroup(Augmentations augs) throws XNIException {
- final int length = fGroupIndexStackSizes[fDepth];
- final int group = length > 0 ? addContentSpecNodes(0, length - 1) : addUniqueLeafNode(null);
- --fDepth;
- addToCurrentGroup(group);
- } // endGroup()
-
- /**
- * The end of the DTD.
- *
- * @param augs Additional information that may include infoset
- * augmentations.
- * @throws XNIException Thrown by handler to signal an error.
- */
- public final void endDTD(Augmentations augs) throws XNIException {
- super.endDTD(augs);
- fOpStack = null;
- fGroupIndexStack = null;
- fGroupIndexStackSizes = null;
- } // endDTD()
-
- //
- // Protected methods
- //
-
- /**
- * Adds the content spec to the given element declaration.
- */
- protected final void addContentSpecToElement(XMLElementDecl elementDecl) {
- int contentSpec = fGroupIndexStackSizes[0] > 0 ? fGroupIndexStack[0][0] : -1;
- setContentSpecIndex(fCurrentElementIndex, contentSpec);
- }
-
- //
- // Private methods
- //
-
- /**
- * Creates a subtree from the leaf nodes at the current depth.
- */
- private int addContentSpecNodes(int begin, int end) {
- if (begin == end) {
- return fGroupIndexStack[fDepth][begin];
- }
- final int middle = (begin + end) >>> 1;
- return addContentSpecNode(fOpStack[fDepth],
- addContentSpecNodes(begin, middle),
- addContentSpecNodes(middle + 1, end));
- } // addContentSpecNodes(int,int)
-
- /**
- * Initialize the stacks which temporarily hold content models.
- */
- private void initializeContentModelStacks() {
- if (fOpStack == null) {
- fOpStack = new short[8];
- fGroupIndexStack = new int [8][];
- fGroupIndexStackSizes = new int [8];
- }
- else if (fDepth == fOpStack.length) {
- short [] newOpStack = new short[fDepth * 2];
- System.arraycopy(fOpStack, 0, newOpStack, 0, fDepth);
- fOpStack = newOpStack;
- int [][] newGroupIndexStack = new int[fDepth * 2][];
- System.arraycopy(fGroupIndexStack, 0, newGroupIndexStack, 0, fDepth);
- fGroupIndexStack = newGroupIndexStack;
- int [] newGroupIndexStackLengths = new int[fDepth * 2];
- System.arraycopy(fGroupIndexStackSizes, 0, newGroupIndexStackLengths, 0, fDepth);
- fGroupIndexStackSizes = newGroupIndexStackLengths;
- }
- fOpStack[fDepth] = -1;
- fGroupIndexStackSizes[fDepth] = 0;
- } // initializeContentModelStacks()
-
- /**
- * Add XMLContentSpec to the current group.
- *
- * @param contentSpec handle to the XMLContentSpec to add to the current group
- */
- private void addToCurrentGroup(int contentSpec) {
- int [] currentGroup = fGroupIndexStack[fDepth];
- int length = fGroupIndexStackSizes[fDepth]++;
- if (currentGroup == null) {
- currentGroup = new int[8];
- fGroupIndexStack[fDepth] = currentGroup;
- }
- else if (length == currentGroup.length) {
- int [] newGroup = new int[currentGroup.length * 2];
- System.arraycopy(currentGroup, 0, newGroup, 0, currentGroup.length);
- currentGroup = newGroup;
- fGroupIndexStack[fDepth] = currentGroup;
- }
- currentGroup[length] = contentSpec;
- } // addToCurrentGroup(int)
-
-} // class BalancedDTDGrammar
-
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xerces.internal.impl.dtd;
+
+import com.sun.org.apache.xerces.internal.util.SymbolTable;
+import com.sun.org.apache.xerces.internal.xni.Augmentations;
+import com.sun.org.apache.xerces.internal.xni.XMLDTDContentModelHandler;
+import com.sun.org.apache.xerces.internal.xni.XNIException;
+
+/**
+ * pcdata()
method. A children content model will
+ * contain additional groups and/or elements.
+ *
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ * @throws XNIException Thrown by handler to signal an error.
+ *
+ * @see #any
+ * @see #empty
+ */
+ public final void startGroup(Augmentations augs) throws XNIException {
+ ++fDepth;
+ initializeContentModelStacks();
+ fMixed = false;
+ } // startGroup()
+
+ /**
+ * The appearance of "#PCDATA" within a group signifying a
+ * mixed content model. This method will be the first called
+ * following the content model's startGroup()
.
+ *
+ *@param augs Additional information that may include infoset
+ * augmentations.
+ *
+ * @throws XNIException Thrown by handler to signal an error.
+ *
+ * @see #startGroup
+ */
+ public final void pcdata(Augmentations augs) throws XNIException {
+ fMixed = true;
+ } // pcdata()
+
+ /**
+ * A referenced element in a mixed or children content model.
+ *
+ * @param elementName The name of the referenced element.
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ *
+ * @throws XNIException Thrown by handler to signal an error.
+ */
+ public final void element(String elementName, Augmentations augs) throws XNIException {
+ addToCurrentGroup(addUniqueLeafNode(elementName));
+ } // element(String)
+
+ /**
+ * The separator between choices or sequences of a mixed or children
+ * content model.
+ *
+ * @param separator The type of children separator.
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ * @throws XNIException Thrown by handler to signal an error.
+ *
+ * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_CHOICE
+ * @see org.apache.xerces.xni.XMLDTDContentModelHandler#SEPARATOR_SEQUENCE
+ */
+ public final void separator(short separator, Augmentations augs) throws XNIException {
+ if (separator == XMLDTDContentModelHandler.SEPARATOR_CHOICE) {
+ fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_CHOICE;
+ }
+ else if (separator == XMLDTDContentModelHandler.SEPARATOR_SEQUENCE) {
+ fOpStack[fDepth] = XMLContentSpec.CONTENTSPECNODE_SEQ;
+ }
+ } // separator(short)
+
+ /**
+ * The occurrence count for a child in a children content model or
+ * for the mixed content model group.
+ *
+ * @param occurrence The occurrence count for the last element
+ * or group.
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ * @throws XNIException Thrown by handler to signal an error.
+ *
+ * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_ONE
+ * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ZERO_OR_MORE
+ * @see org.apache.xerces.xni.XMLDTDContentModelHandler#OCCURS_ONE_OR_MORE
+ */
+ public final void occurrence(short occurrence, Augmentations augs) throws XNIException {
+ if (!fMixed) {
+ int currentIndex = fGroupIndexStackSizes[fDepth] - 1;
+ if (occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_ONE) {
+ fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_ONE, fGroupIndexStack[fDepth][currentIndex], -1);
+ }
+ else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ZERO_OR_MORE) {
+ fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ZERO_OR_MORE, fGroupIndexStack[fDepth][currentIndex], -1);
+ }
+ else if ( occurrence == XMLDTDContentModelHandler.OCCURS_ONE_OR_MORE) {
+ fGroupIndexStack[fDepth][currentIndex] = addContentSpecNode(XMLContentSpec.CONTENTSPECNODE_ONE_OR_MORE, fGroupIndexStack[fDepth][currentIndex], -1);
+ }
+ }
+ } // occurrence(short)
+
+ /**
+ * The end of a group for mixed or children content models.
+ *
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ * @throws XNIException Thrown by handler to signal an error.
+ */
+ public final void endGroup(Augmentations augs) throws XNIException {
+ final int length = fGroupIndexStackSizes[fDepth];
+ final int group = length > 0 ? addContentSpecNodes(0, length - 1) : addUniqueLeafNode(null);
+ --fDepth;
+ addToCurrentGroup(group);
+ } // endGroup()
+
+ /**
+ * The end of the DTD.
+ *
+ * @param augs Additional information that may include infoset
+ * augmentations.
+ * @throws XNIException Thrown by handler to signal an error.
+ */
+ public final void endDTD(Augmentations augs) throws XNIException {
+ super.endDTD(augs);
+ fOpStack = null;
+ fGroupIndexStack = null;
+ fGroupIndexStackSizes = null;
+ } // endDTD()
+
+ //
+ // Protected methods
+ //
+
+ /**
+ * Adds the content spec to the given element declaration.
+ */
+ protected final void addContentSpecToElement(XMLElementDecl elementDecl) {
+ int contentSpec = fGroupIndexStackSizes[0] > 0 ? fGroupIndexStack[0][0] : -1;
+ setContentSpecIndex(fCurrentElementIndex, contentSpec);
+ }
+
+ //
+ // Private methods
+ //
+
+ /**
+ * Creates a subtree from the leaf nodes at the current depth.
+ */
+ private int addContentSpecNodes(int begin, int end) {
+ if (begin == end) {
+ return fGroupIndexStack[fDepth][begin];
+ }
+ final int middle = (begin + end) >>> 1;
+ return addContentSpecNode(fOpStack[fDepth],
+ addContentSpecNodes(begin, middle),
+ addContentSpecNodes(middle + 1, end));
+ } // addContentSpecNodes(int,int)
+
+ /**
+ * Initialize the stacks which temporarily hold content models.
+ */
+ private void initializeContentModelStacks() {
+ if (fOpStack == null) {
+ fOpStack = new short[8];
+ fGroupIndexStack = new int [8][];
+ fGroupIndexStackSizes = new int [8];
+ }
+ else if (fDepth == fOpStack.length) {
+ short [] newOpStack = new short[fDepth * 2];
+ System.arraycopy(fOpStack, 0, newOpStack, 0, fDepth);
+ fOpStack = newOpStack;
+ int [][] newGroupIndexStack = new int[fDepth * 2][];
+ System.arraycopy(fGroupIndexStack, 0, newGroupIndexStack, 0, fDepth);
+ fGroupIndexStack = newGroupIndexStack;
+ int [] newGroupIndexStackLengths = new int[fDepth * 2];
+ System.arraycopy(fGroupIndexStackSizes, 0, newGroupIndexStackLengths, 0, fDepth);
+ fGroupIndexStackSizes = newGroupIndexStackLengths;
+ }
+ fOpStack[fDepth] = -1;
+ fGroupIndexStackSizes[fDepth] = 0;
+ } // initializeContentModelStacks()
+
+ /**
+ * Add XMLContentSpec to the current group.
+ *
+ * @param contentSpec handle to the XMLContentSpec to add to the current group
+ */
+ private void addToCurrentGroup(int contentSpec) {
+ int [] currentGroup = fGroupIndexStack[fDepth];
+ int length = fGroupIndexStackSizes[fDepth]++;
+ if (currentGroup == null) {
+ currentGroup = new int[8];
+ fGroupIndexStack[fDepth] = currentGroup;
+ }
+ else if (length == currentGroup.length) {
+ int [] newGroup = new int[currentGroup.length * 2];
+ System.arraycopy(currentGroup, 0, newGroup, 0, currentGroup.length);
+ currentGroup = newGroup;
+ fGroupIndexStack[fDepth] = currentGroup;
+ }
+ currentGroup[length] = contentSpec;
+ } // addToCurrentGroup(int)
+
+} // class BalancedDTDGrammar
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/DTDGrammar.java Wed May 02 13:32:36 2012 +0100
@@ -93,7 +93,7 @@
* A DTD grammar. This class implements the XNI handler interfaces
* for DTD information so that it can build the approprate validation
* structures automatically from the callbacks.
- *
+ *
* @xerces.internal
*
* @author Eric Ye, IBM
@@ -1228,11 +1228,11 @@
return getElementDeclIndex(elementDeclQName.rawname);
} // getElementDeclIndex(QName):int
- /** make separate function for getting contentSpecType of element.
+ /** make separate function for getting contentSpecType of element.
* we can avoid setting of the element values.
- */
-
- public short getContentSpecType(int elementIndex){
+ */
+
+ public short getContentSpecType(int elementIndex){
if (elementIndex < 0 || elementIndex >= fElementDeclCount) {
return -1 ;
}
@@ -1242,12 +1242,12 @@
if(fElementDeclType[chunk][index] == -1){
return -1 ;
- }
+ }
else{
- return (short) (fElementDeclType[chunk][index] & LIST_MASK);
- }
-
- }//getContentSpecType
+ return (short) (fElementDeclType[chunk][index] & LIST_MASK);
+ }
+
+ }//getContentSpecType
/**
* getElementDecl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XML11DTDProcessor.java Wed May 02 13:32:36 2012 +0100
@@ -77,7 +77,7 @@
* as a DTD loader, so that XML 1.1 external subsets can
* be processed correctly (hence it's rather anomalous-appearing
* derivation from XMLDTDLoader).
- *
+ *
* @xerces.internal
*
* @author Neil Graham, IBM
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDDescription.java Wed May 02 13:32:36 2012 +0100
@@ -70,10 +70,10 @@
import com.sun.org.apache.xerces.internal.util.XMLResourceIdentifierImpl;
/**
- * All information specific to DTD grammars.
- *
+ * All information specific to DTD grammars.
+ *
* @xerces.internal
- *
+ *
* @author Neil Graham, IBM
* @version $Id: XMLDTDDescription.java,v 1.4 2010/08/11 07:18:38 joehw Exp $
*/
@@ -156,9 +156,9 @@
*/
public boolean equals(Object desc) {
if (!(desc instanceof XMLGrammarDescription)) return false;
- if (!getGrammarType().equals(((XMLGrammarDescription)desc).getGrammarType())) {
- return false;
- }
+ if (!getGrammarType().equals(((XMLGrammarDescription)desc).getGrammarType())) {
+ return false;
+ }
// assume it's a DTDDescription
XMLDTDDescription dtdDesc = (XMLDTDDescription)desc;
if (fRootName != null) {
@@ -207,7 +207,7 @@
else if (dtdDesc.fPublicId != null) {
return false;
}
- return true;
+ return true;
}
/**
@@ -227,4 +227,3 @@
return 0;
}
} // class XMLDTDDescription
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dtd/XMLDTDLoader.java Wed May 02 13:32:36 2012 +0100
@@ -102,7 +102,7 @@
* com.sun.org.apache.xerces.internal.xs.datatypes.ByteList
.
*
- * @xerces.internal
- *
+ * @xerces.internal
+ *
* @author Ankit Pasricha, IBM
- *
+ *
* @version $Id: ByteListImpl.java,v 1.7 2010-11-01 04:39:46 joehw Exp $
*/
public class ByteListImpl extends AbstractList implements ByteList {
@@ -104,4 +104,3 @@
return getLength();
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/dv/xs/AbstractDateTimeDV.java Wed May 02 13:32:36 2012 +0100
@@ -40,8 +40,8 @@
* two parser instances at the same time, then the same simple type
* decl object can be used to validate two strings at the same time.
* -SG
- *
- * @xerces.internal
+ *
+ * @xerces.internal
*
* @author Elena Litani
* @author Len Berman
@@ -51,453 +51,453 @@
*/
public abstract class AbstractDateTimeDV extends TypeValidator {
- //debugging
- private static final boolean DEBUG=false;
+ //debugging
+ private static final boolean DEBUG=false;
- //define shared variables for date/time
+ //define shared variables for date/time
- //define constants to be used in assigning default values for
- //all date/time excluding duration
- protected final static int YEAR=2000;
- protected final static int MONTH=01;
- protected final static int DAY = 01;
+ //define constants to be used in assigning default values for
+ //all date/time excluding duration
+ protected final static int YEAR=2000;
+ protected final static int MONTH=01;
+ protected final static int DAY = 01;
protected static final DatatypeFactory datatypeFactory = new DatatypeFactoryImpl();
- public short getAllowedFacets(){
- return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE | XSSimpleTypeDecl.FACET_MINEXCLUSIVE );
- }//getAllowedFacets()
+ public short getAllowedFacets(){
+ return ( XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_WHITESPACE | XSSimpleTypeDecl.FACET_ENUMERATION |XSSimpleTypeDecl.FACET_MAXINCLUSIVE |XSSimpleTypeDecl.FACET_MININCLUSIVE | XSSimpleTypeDecl.FACET_MAXEXCLUSIVE | XSSimpleTypeDecl.FACET_MINEXCLUSIVE );
+ }//getAllowedFacets()
- // distinguishes between identity and equality for date/time values
- // ie: two values representing the same "moment in time" but with different
- // remembered timezones are now equal but not identical.
- public boolean isIdentical (Object value1, Object value2) {
- if (!(value1 instanceof DateTimeData) || !(value2 instanceof DateTimeData)) {
- return false;
- }
+ // distinguishes between identity and equality for date/time values
+ // ie: two values representing the same "moment in time" but with different
+ // remembered timezones are now equal but not identical.
+ public boolean isIdentical (Object value1, Object value2) {
+ if (!(value1 instanceof DateTimeData) || !(value2 instanceof DateTimeData)) {
+ return false;
+ }
- DateTimeData v1 = (DateTimeData)value1;
- DateTimeData v2 = (DateTimeData)value2;
+ DateTimeData v1 = (DateTimeData)value1;
+ DateTimeData v2 = (DateTimeData)value2;
- // original timezones must be the same in addition to date/time values
- // being 'equal'
- if ((v1.timezoneHr == v2.timezoneHr) && (v1.timezoneMin == v2.timezoneMin)) {
- return v1.equals(v2);
- }
+ // original timezones must be the same in addition to date/time values
+ // being 'equal'
+ if ((v1.timezoneHr == v2.timezoneHr) && (v1.timezoneMin == v2.timezoneMin)) {
+ return v1.equals(v2);
+ }
- return false;
- }//isIdentical()
+ return false;
+ }//isIdentical()
- // the parameters are in compiled form (from getActualValue)
- public int compare (Object value1, Object value2) {
- return compareDates(((DateTimeData)value1),
- ((DateTimeData)value2), true);
- }//compare()
+ // the parameters are in compiled form (from getActualValue)
+ public int compare (Object value1, Object value2) {
+ return compareDates(((DateTimeData)value1),
+ ((DateTimeData)value2), true);
+ }//compare()
- /**
- * Compare algorithm described in dateDime (3.2.7).
- * Duration datatype overwrites this method
- *
- * @param date1 normalized date representation of the first value
- * @param date2 normalized date representation of the second value
- * @param strict
- * @return less, greater, less_equal, greater_equal, equal
- */
- protected short compareDates(DateTimeData date1, DateTimeData date2, boolean strict) {
- if (date1.utc == date2.utc) {
- return compareOrder(date1, date2);
- }
- short c1, c2;
+ /**
+ * Compare algorithm described in dateDime (3.2.7).
+ * Duration datatype overwrites this method
+ *
+ * @param date1 normalized date representation of the first value
+ * @param date2 normalized date representation of the second value
+ * @param strict
+ * @return less, greater, less_equal, greater_equal, equal
+ */
+ protected short compareDates(DateTimeData date1, DateTimeData date2, boolean strict) {
+ if (date1.utc == date2.utc) {
+ return compareOrder(date1, date2);
+ }
+ short c1, c2;
- DateTimeData tempDate = new DateTimeData(null, this);
+ DateTimeData tempDate = new DateTimeData(null, this);
- if ( date1.utc=='Z' ) {
+ if ( date1.utc=='Z' ) {
- //compare date1<=date1<=(date2 with time zone -14)
- //
- cloneDate(date2, tempDate); //clones date1 value to global temporary storage: fTempDate
- tempDate.timezoneHr=14;
- tempDate.timezoneMin = 0;
- tempDate.utc='+';
- normalize(tempDate);
- c1 = compareOrder(date1, tempDate);
- if (c1 == LESS_THAN)
- return c1;
+ //compare date1<=date1<=(date2 with time zone -14)
+ //
+ cloneDate(date2, tempDate); //clones date1 value to global temporary storage: fTempDate
+ tempDate.timezoneHr=14;
+ tempDate.timezoneMin = 0;
+ tempDate.utc='+';
+ normalize(tempDate);
+ c1 = compareOrder(date1, tempDate);
+ if (c1 == LESS_THAN)
+ return c1;
- //compare date1>=(date2 with time zone +14)
- //
- cloneDate(date2, tempDate); //clones date1 value to global temporary storage: tempDate
- tempDate.timezoneHr = -14;
- tempDate.timezoneMin = 0;
- tempDate.utc='-';
- normalize(tempDate);
- c2 = compareOrder(date1, tempDate);
- if (c2 == GREATER_THAN)
- return c2;
+ //compare date1>=(date2 with time zone +14)
+ //
+ cloneDate(date2, tempDate); //clones date1 value to global temporary storage: tempDate
+ tempDate.timezoneHr = -14;
+ tempDate.timezoneMin = 0;
+ tempDate.utc='-';
+ normalize(tempDate);
+ c2 = compareOrder(date1, tempDate);
+ if (c2 == GREATER_THAN)
+ return c2;
- return INDETERMINATE;
- }
- else if ( date2.utc=='Z' ) {
+ return INDETERMINATE;
+ }
+ else if ( date2.utc=='Z' ) {
- //compare (date1 with time zone -14)<=date2
- //
- cloneDate(date1, tempDate); //clones date1 value to global temporary storage: tempDate
- tempDate.timezoneHr = -14;
- tempDate.timezoneMin = 0;
- tempDate.utc='-';
- if (DEBUG) {
- System.out.println("tempDate=" + dateToString(tempDate));
- }
- normalize(tempDate);
- c1 = compareOrder(tempDate, date2);
- if (DEBUG) {
- System.out.println("date=" + dateToString(date2));
- System.out.println("tempDate=" + dateToString(tempDate));
- }
- if (c1 == LESS_THAN)
- return c1;
+ //compare (date1 with time zone -14)<=date2
+ //
+ cloneDate(date1, tempDate); //clones date1 value to global temporary storage: tempDate
+ tempDate.timezoneHr = -14;
+ tempDate.timezoneMin = 0;
+ tempDate.utc='-';
+ if (DEBUG) {
+ System.out.println("tempDate=" + dateToString(tempDate));
+ }
+ normalize(tempDate);
+ c1 = compareOrder(tempDate, date2);
+ if (DEBUG) {
+ System.out.println("date=" + dateToString(date2));
+ System.out.println("tempDate=" + dateToString(tempDate));
+ }
+ if (c1 == LESS_THAN)
+ return c1;
- //compare (date1 with time zone +14)<=date2
- //
- cloneDate(date1, tempDate); //clones date1 value to global temporary storage: tempDate
- tempDate.timezoneHr = 14;
- tempDate.timezoneMin = 0;
- tempDate.utc='+';
- normalize(tempDate);
- c2 = compareOrder(tempDate, date2);
- if (DEBUG) {
- System.out.println("tempDate=" + dateToString(tempDate));
- }
- if (c2 == GREATER_THAN)
- return c2;
+ //compare (date1 with time zone +14)<=date2
+ //
+ cloneDate(date1, tempDate); //clones date1 value to global temporary storage: tempDate
+ tempDate.timezoneHr = 14;
+ tempDate.timezoneMin = 0;
+ tempDate.utc='+';
+ normalize(tempDate);
+ c2 = compareOrder(tempDate, date2);
+ if (DEBUG) {
+ System.out.println("tempDate=" + dateToString(tempDate));
+ }
+ if (c2 == GREATER_THAN)
+ return c2;
- return INDETERMINATE;
- }
- return INDETERMINATE;
+ return INDETERMINATE;
+ }
+ return INDETERMINATE;
- }
+ }
- /**
- * Given normalized values, determines order-relation
- * between give date/time objects.
- *
- * @param date1 date/time object
- * @param date2 date/time object
- * @return 0 if date1 and date2 are equal, a value less than 0 if date1 is less than date2, a value greater than 0 if date1 is greater than date2
- */
- protected short compareOrder(DateTimeData date1, DateTimeData date2) {
- if(date1.position < 1) {
- if (date1.year < date2.year)
- return -1;
- if (date1.year > date2.year)
- return 1;
- }
- if(date1.position < 2) {
- if (date1.month < date2.month)
- return -1;
- if (date1.month > date2.month)
- return 1;
- }
- if (date1.day < date2.day)
- return -1;
- if (date1.day > date2.day)
- return 1;
- if (date1.hour < date2.hour)
- return -1;
- if (date1.hour > date2.hour)
- return 1;
- if (date1.minute < date2.minute)
- return -1;
- if (date1.minute > date2.minute)
- return 1;
- if (date1.second < date2.second)
- return -1;
- if (date1.second > date2.second)
- return 1;
- if (date1.utc < date2.utc)
- return -1;
- if (date1.utc > date2.utc)
- return 1;
- return 0;
- }
+ /**
+ * Given normalized values, determines order-relation
+ * between give date/time objects.
+ *
+ * @param date1 date/time object
+ * @param date2 date/time object
+ * @return 0 if date1 and date2 are equal, a value less than 0 if date1 is less than date2, a value greater than 0 if date1 is greater than date2
+ */
+ protected short compareOrder(DateTimeData date1, DateTimeData date2) {
+ if(date1.position < 1) {
+ if (date1.year < date2.year)
+ return -1;
+ if (date1.year > date2.year)
+ return 1;
+ }
+ if(date1.position < 2) {
+ if (date1.month < date2.month)
+ return -1;
+ if (date1.month > date2.month)
+ return 1;
+ }
+ if (date1.day < date2.day)
+ return -1;
+ if (date1.day > date2.day)
+ return 1;
+ if (date1.hour < date2.hour)
+ return -1;
+ if (date1.hour > date2.hour)
+ return 1;
+ if (date1.minute < date2.minute)
+ return -1;
+ if (date1.minute > date2.minute)
+ return 1;
+ if (date1.second < date2.second)
+ return -1;
+ if (date1.second > date2.second)
+ return 1;
+ if (date1.utc < date2.utc)
+ return -1;
+ if (date1.utc > date2.utc)
+ return 1;
+ return 0;
+ }
- /**
- * Parses time hh:mm:ss.sss and time zone if any
- *
- * @param start
- * @param end
- * @param data
- * @exception RuntimeException
- */
- protected void getTime (String buffer, int start, int end, DateTimeData data) throws RuntimeException{
+ /**
+ * Parses time hh:mm:ss.sss and time zone if any
+ *
+ * @param start
+ * @param end
+ * @param data
+ * @exception RuntimeException
+ */
+ protected void getTime (String buffer, int start, int end, DateTimeData data) throws RuntimeException{
- int stop = start+2;
+ int stop = start+2;
- //get hours (hh)
- data.hour=parseInt(buffer, start,stop);
+ //get hours (hh)
+ data.hour=parseInt(buffer, start,stop);
- //get minutes (mm)
+ //get minutes (mm)
- if (buffer.charAt(stop++)!=':') {
- throw new RuntimeException("Error in parsing time zone" );
- }
- start = stop;
- stop = stop+2;
- data.minute=parseInt(buffer, start,stop);
+ if (buffer.charAt(stop++)!=':') {
+ throw new RuntimeException("Error in parsing time zone" );
+ }
+ start = stop;
+ stop = stop+2;
+ data.minute=parseInt(buffer, start,stop);
- //get seconds (ss)
- if (buffer.charAt(stop++)!=':') {
- throw new RuntimeException("Error in parsing time zone" );
- }
+ //get seconds (ss)
+ if (buffer.charAt(stop++)!=':') {
+ throw new RuntimeException("Error in parsing time zone" );
+ }
- //find UTC sign if any
- int sign = findUTCSign(buffer, start, end);
+ //find UTC sign if any
+ int sign = findUTCSign(buffer, start, end);
- //get seconds (ms)
- start = stop;
- stop = sign < 0 ? end : sign;
- data.second = parseSecond(buffer, start, stop);
+ //get seconds (ms)
+ start = stop;
+ stop = sign < 0 ? end : sign;
+ data.second = parseSecond(buffer, start, stop);
- //parse UTC time zone (hh:mm)
- if (sign > 0) {
- getTimeZone(buffer, data, sign, end);
- }
- }
+ //parse UTC time zone (hh:mm)
+ if (sign > 0) {
+ getTimeZone(buffer, data, sign, end);
+ }
+ }
- /**
- * Parses date CCYY-MM-DD
- *
- * @param buffer
- * @param start start position
- * @param end end position
- * @param date
- * @exception RuntimeException
- */
- protected int getDate (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
+ /**
+ * Parses date CCYY-MM-DD
+ *
+ * @param buffer
+ * @param start start position
+ * @param end end position
+ * @param date
+ * @exception RuntimeException
+ */
+ protected int getDate (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
- start = getYearMonth(buffer, start, end, date);
+ start = getYearMonth(buffer, start, end, date);
- if (buffer.charAt(start++) !='-') {
- throw new RuntimeException("CCYY-MM must be followed by '-' sign");
- }
- int stop = start + 2;
- date.day=parseInt(buffer, start, stop);
- return stop;
- }
+ if (buffer.charAt(start++) !='-') {
+ throw new RuntimeException("CCYY-MM must be followed by '-' sign");
+ }
+ int stop = start + 2;
+ date.day=parseInt(buffer, start, stop);
+ return stop;
+ }
- /**
- * Parses date CCYY-MM
- *
- * @param buffer
- * @param start start position
- * @param end end position
- * @param date
- * @exception RuntimeException
- */
- protected int getYearMonth (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
+ /**
+ * Parses date CCYY-MM
+ *
+ * @param buffer
+ * @param start start position
+ * @param end end position
+ * @param date
+ * @exception RuntimeException
+ */
+ protected int getYearMonth (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
- if ( buffer.charAt(0)=='-' ) {
- // REVISIT: date starts with preceding '-' sign
- // do we have to do anything with it?
- //
- start++;
- }
- int i = indexOf(buffer, start, end, '-');
- if ( i==-1 ) throw new RuntimeException("Year separator is missing or misplaced");
- int length = i-start;
- if (length<4) {
- throw new RuntimeException("Year must have 'CCYY' format");
- }
- else if (length > 4 && buffer.charAt(start)=='0'){
- throw new RuntimeException("Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden");
- }
- date.year= parseIntYear(buffer, i);
- if (buffer.charAt(i)!='-') {
- throw new RuntimeException("CCYY must be followed by '-' sign");
- }
- start = ++i;
- i = start +2;
- date.month=parseInt(buffer, start, i);
- return i; //fStart points right after the MONTH
- }
+ if ( buffer.charAt(0)=='-' ) {
+ // REVISIT: date starts with preceding '-' sign
+ // do we have to do anything with it?
+ //
+ start++;
+ }
+ int i = indexOf(buffer, start, end, '-');
+ if ( i==-1 ) throw new RuntimeException("Year separator is missing or misplaced");
+ int length = i-start;
+ if (length<4) {
+ throw new RuntimeException("Year must have 'CCYY' format");
+ }
+ else if (length > 4 && buffer.charAt(start)=='0'){
+ throw new RuntimeException("Leading zeros are required if the year value would otherwise have fewer than four digits; otherwise they are forbidden");
+ }
+ date.year= parseIntYear(buffer, i);
+ if (buffer.charAt(i)!='-') {
+ throw new RuntimeException("CCYY must be followed by '-' sign");
+ }
+ start = ++i;
+ i = start +2;
+ date.month=parseInt(buffer, start, i);
+ return i; //fStart points right after the MONTH
+ }
- /**
- * Shared code from Date and YearMonth datatypes.
- * Finds if time zone sign is present
- *
- * @param end
- * @param date
- * @exception RuntimeException
- */
- protected void parseTimeZone (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
+ /**
+ * Shared code from Date and YearMonth datatypes.
+ * Finds if time zone sign is present
+ *
+ * @param end
+ * @param date
+ * @exception RuntimeException
+ */
+ protected void parseTimeZone (String buffer, int start, int end, DateTimeData date) throws RuntimeException{
- //fStart points right after the date
+ //fStart points right after the date
- if ( start < end ) {
- if (!isNextCharUTCSign(buffer, start, end)) {
- throw new RuntimeException ("Error in month parsing");
- }
- else {
- getTimeZone(buffer, date, start, end);
- }
- }
- }
+ if ( start < end ) {
+ if (!isNextCharUTCSign(buffer, start, end)) {
+ throw new RuntimeException ("Error in month parsing");
+ }
+ else {
+ getTimeZone(buffer, date, start, end);
+ }
+ }
+ }
- /**
- * Parses time zone: 'Z' or {+,-} followed by hh:mm
- *
- * @param data
- * @param sign
- * @exception RuntimeException
- */
- protected void getTimeZone (String buffer, DateTimeData data, int sign, int end) throws RuntimeException{
- data.utc=buffer.charAt(sign);
+ /**
+ * Parses time zone: 'Z' or {+,-} followed by hh:mm
+ *
+ * @param data
+ * @param sign
+ * @exception RuntimeException
+ */
+ protected void getTimeZone (String buffer, DateTimeData data, int sign, int end) throws RuntimeException{
+ data.utc=buffer.charAt(sign);
- if ( buffer.charAt(sign) == 'Z' ) {
- if (end>(++sign)) {
- throw new RuntimeException("Error in parsing time zone");
- }
- return;
- }
- if ( sign<=(end-6) ) {
+ if ( buffer.charAt(sign) == 'Z' ) {
+ if (end>(++sign)) {
+ throw new RuntimeException("Error in parsing time zone");
+ }
+ return;
+ }
+ if ( sign<=(end-6) ) {
- int negate = buffer.charAt(sign) == '-'?-1:1;
- //parse hr
- int stop = ++sign+2;
- data.timezoneHr = negate*parseInt(buffer, sign, stop);
- if (buffer.charAt(stop++)!=':') {
- throw new RuntimeException("Error in parsing time zone" );
- }
+ int negate = buffer.charAt(sign) == '-'?-1:1;
+ //parse hr
+ int stop = ++sign+2;
+ data.timezoneHr = negate*parseInt(buffer, sign, stop);
+ if (buffer.charAt(stop++)!=':') {
+ throw new RuntimeException("Error in parsing time zone" );
+ }
- //parse min
- data.timezoneMin = negate*parseInt(buffer, stop, stop+2);
+ //parse min
+ data.timezoneMin = negate*parseInt(buffer, stop, stop+2);
- if ( stop+2!=end ) {
- throw new RuntimeException("Error in parsing time zone");
- }
+ if ( stop+2!=end ) {
+ throw new RuntimeException("Error in parsing time zone");
+ }
if(data.timezoneHr != 0 || data.timezoneMin != 0)
data.normalized = false;
- }
- else {
- throw new RuntimeException("Error in parsing time zone");
- }
- if ( DEBUG ) {
- System.out.println("time[hh]="+data.timezoneHr + " time[mm]=" +data.timezoneMin);
- }
- }
+ }
+ else {
+ throw new RuntimeException("Error in parsing time zone");
+ }
+ if ( DEBUG ) {
+ System.out.println("time[hh]="+data.timezoneHr + " time[mm]=" +data.timezoneMin);
+ }
+ }
- /**
- * Computes index of given char within StringBuffer
- *
- * @param start
- * @param end
- * @param ch character to look for in StringBuffer
- * @return index of ch within StringBuffer
- */
- protected int indexOf (String buffer, int start, int end, char ch) {
- for ( int i=start;i
- *
+ *
* @xerces.internal
*
* @author TAMURA Kent <kent@trl.ibm.co.jp>
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xpath/regex/Token.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xpath/regex/Token.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xpath/regex/Token.java Wed May 02 13:32:36 2012 +0100
@@ -25,7 +25,7 @@
/**
* This class represents a node in parse tree.
- *
+ *
* @xerces.internal
*
* @version $Id: Token.java,v 1.7 2010/07/27 05:02:34 joehw Exp $
@@ -691,7 +691,7 @@
/*FEFF..FEFF;*/ "Specials",
/*FF00..FFEF;*/ "Halfwidth and Fullwidth Forms",
//missing Specials add manually
- /*10300..1032F;*/ "Old Italic", // 84
+ /*10300..1032F;*/ "Old Italic", // 84
/*10330..1034F;*/ "Gothic",
/*10400..1044F;*/ "Deseret",
/*1D000..1D0FF;*/ "Byzantine Musical Symbols",
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SchemaGrammar.java Wed May 02 13:32:36 2012 +0100
@@ -70,7 +70,7 @@
* useful to distinguish grammar objects from other kinds of object
* when they exist in pools or caches.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Sandy Gao, IBM
* @author Elena Litani, IBM
@@ -137,7 +137,7 @@
*
* @param targetNamespace
* @param grammarDesc the XMLGrammarDescription corresponding to this objec
- * at the least a systemId should always be known.
+ * at the least a systemId should always be known.
* @param symbolTable needed for annotation support
*/
public SchemaGrammar(String targetNamespace, XSDDescription grammarDesc,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
/**
* To store and validate information about substitutionGroup
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Sandy Gao, IBM
*
@@ -92,7 +92,7 @@
// 1. D and C are the same element declaration.
if (element == exemplar)
return true;
-
+
// 2 All of the following must be true:
// 2.1 The blocking constraint does not contain substitution.
if ((blockingConstraint & XSConstants.DERIVATION_SUBSTITUTION) != 0)
@@ -224,12 +224,12 @@
Object subGroup = fSubGroups.get(element);
if (subGroup != null)
return (XSElementDecl[])subGroup;
-
+
if ((element.fBlock & XSConstants.DERIVATION_SUBSTITUTION) != 0) {
fSubGroups.put(element, EMPTY_GROUP);
return EMPTY_GROUP;
}
-
+
// Otherwise, get all potential sub group elements
// (without considering "block" on this element
OneSubGroup[] groupB = getSubGroupB(element, new OneSubGroup());
@@ -262,11 +262,11 @@
fSubGroupsB.put(element, EMPTY_VECTOR);
return EMPTY_VECTOR;
}
-
+
// we've already calculated the element, just return.
if (subGroup instanceof OneSubGroup[])
return (OneSubGroup[])subGroup;
-
+
// we only have the *direct* substitutions
Vector group = (Vector)subGroup, newGroup = new Vector();
OneSubGroup[] group1;
@@ -302,7 +302,7 @@
}
// Store the potential sub group
fSubGroupsB.put(element, ret);
-
+
return ret;
}
@@ -325,7 +325,7 @@
// No derivation relation, or blocked, return false
if (typed != typeb || (dMethod & bMethod) != 0)
return false;
-
+
// Remember the derivation methods and blocks, return true.
methods.dMethod = dMethod;
methods.bMethod = bMethod;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaLoader.java Wed May 02 13:32:36 2012 +0100
@@ -83,63 +83,63 @@
/**
* This class implements xni.grammars.XMLGrammarLoader.
* It also serves as implementation of xs.XSLoader interface and DOMConfiguration interface.
- *
- * This class is designed to interact either with a proxy for a user application
- * which wants to preparse schemas, or with our own Schema validator.
+ *
+ * This class is designed to interact either with a proxy for a user application
+ * which wants to preparse schemas, or with our own Schema validator.
* It is hoped that none of these "external" classes will therefore need to communicate directly
* with XSDHandler in future.
* short
s.
*/
protected static final class ShortVector {
-
+
//
// Data
//
@@ -4232,13 +4242,13 @@
/** Data. */
private short[] fData;
-
+
//
// Constructors
//
-
+
public ShortVector() {}
-
+
public ShortVector(int initialCapacity) {
fData = new short[initialCapacity];
}
@@ -4267,7 +4277,7 @@
public void clear() {
fLength = 0;
}
-
+
/** Returns whether the short is contained in the vector. */
public boolean contains(short value) {
for (int i = 0; i < fLength; ++i) {
@@ -4294,5 +4304,5 @@
}
}
}
-
+
} // class SchemaValidator
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAnnotationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -37,8 +37,8 @@
import org.xml.sax.SAXException;
/**
* This is an implementation of the XSAnnotation schema component.
- *
- * @xerces.internal
+ *
+ * @xerces.internal
*/
public class XSAnnotationImpl implements XSAnnotation {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/XSAttributeDecl.java Wed May 02 13:32:36 2012 +0100
@@ -36,8 +36,8 @@
/**
* The XML representation for an attribute declaration
* schema component is an XSD???Traverser
s. It holds the common data and provide
* a unified way to initialize these data.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Elena Litani, IBM
* @author Rahul Srivastava, Sun Microsystems Inc.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/traversers/XSDAttributeGroupTraverser.java Wed May 02 13:32:36 2012 +0100
@@ -41,7 +41,7 @@
* Content: (annotation?, ((attribute | attributeGroup)*, anyAttribute?))
* XSModel
that represents components in
* the schema grammars in this pool implementation.
- *
- * @xerces.internal
- *
+ *
+ * @xerces.internal
+ *
* @version $Id: XSGrammarPool.java,v 1.7 2010-11-01 04:40:06 joehw Exp $
*/
public class XSGrammarPool extends XMLGrammarPoolImpl {
@@ -47,7 +47,7 @@
* @return an XSModel
representing this schema grammar
*/
public XSModel toXSModel() {
- return toXSModel(Constants.SCHEMA_VERSION_1_0);
+ return toXSModel(Constants.SCHEMA_VERSION_1_0);
}
public XSModel toXSModel(short schemaVersion) {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMap4Types.java Wed May 02 13:32:36 2012 +0100
@@ -28,7 +28,7 @@
/**
* Containts the map between qnames and XSObject's.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Sandy Gao, IBM
*
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSNamedMapImpl.java Wed May 02 13:32:36 2012 +0100
@@ -37,7 +37,7 @@
/**
* Containts the map between qnames and XSObject's.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Sandy Gao, IBM
*
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/impl/xs/util/XSObjectListImpl.java Wed May 02 13:32:36 2012 +0100
@@ -32,7 +32,7 @@
/**
* Containts a list of XSObject's.
*
- * @xerces.internal
+ * @xerces.internal
*
* @author Sandy Gao, IBM
*
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -45,7 +45,7 @@
private Hashtable features;
private Schema grammar;
private boolean isXIncludeAware;
-
+
/**
* State of the secure processing feature, initially false
*/
@@ -56,22 +56,22 @@
* using the currently configured parameters.
*/
public DocumentBuilder newDocumentBuilder()
- throws ParserConfigurationException
+ throws ParserConfigurationException
{
/** Check that if a Schema has been specified that neither of the schema properties have been set. */
if (grammar != null && attributes != null) {
if (attributes.containsKey(JAXPConstants.JAXP_SCHEMA_LANGUAGE)) {
throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
+ SAXMessageFormatter.formatMessage(null,
"schema-already-specified", new Object[] {JAXPConstants.JAXP_SCHEMA_LANGUAGE}));
}
else if (attributes.containsKey(JAXPConstants.JAXP_SCHEMA_SOURCE)) {
throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
- "schema-already-specified", new Object[] {JAXPConstants.JAXP_SCHEMA_SOURCE}));
+ SAXMessageFormatter.formatMessage(null,
+ "schema-already-specified", new Object[] {JAXPConstants.JAXP_SCHEMA_SOURCE}));
}
}
-
+
try {
return new DocumentBuilderImpl(this, attributes, features, fSecureProcess);
} catch (SAXException se) {
@@ -81,7 +81,7 @@
}
/**
- * Allows the user to set specific attributes on the underlying
+ * Allows the user to set specific attributes on the underlying
* implementation.
* @param name name of attribute
* @param value null means to remove attribute
@@ -97,7 +97,7 @@
// Unrecognized attributes do not cause an exception
return;
}
-
+
// This is ugly. We have to collect the attributes and then
// later create a DocumentBuilderImpl to verify the attributes.
@@ -118,7 +118,7 @@
}
/**
- * Allows the user to retrieve specific attributes on the underlying
+ * Allows the user to retrieve specific attributes on the underlying
* implementation.
*/
public Object getAttribute(String name)
@@ -151,24 +151,24 @@
}
}
}
-
+
public Schema getSchema() {
return grammar;
}
-
+
public void setSchema(Schema grammar) {
this.grammar = grammar;
}
-
+
public boolean isXIncludeAware() {
return this.isXIncludeAware;
}
-
+
public void setXIncludeAware(boolean state) {
this.isXIncludeAware = state;
}
-
- public boolean getFeature(String name)
+
+ public boolean getFeature(String name)
throws ParserConfigurationException {
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
return fSecureProcess;
@@ -188,14 +188,14 @@
throw new ParserConfigurationException(e.getMessage());
}
}
-
- public void setFeature(String name, boolean value)
+
+ public void setFeature(String name, boolean value)
throws ParserConfigurationException {
// If this is the secure processing feature, save it then return.
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if (System.getSecurityManager() != null && (!value)) {
throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
+ SAXMessageFormatter.formatMessage(null,
"jaxp-secureprocessing-feature", null));
}
fSecureProcess = value;
@@ -208,11 +208,11 @@
// Test the feature by possibly throwing SAX exceptions
try {
new DocumentBuilderImpl(this, attributes, features);
- }
+ }
catch (SAXNotSupportedException e) {
features.remove(name);
throw new ParserConfigurationException(e.getMessage());
- }
+ }
catch (SAXNotRecognizedException e) {
features.remove(name);
throw new ParserConfigurationException(e.getMessage());
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/DocumentBuilderImpl.java Wed May 02 13:32:36 2012 +0100
@@ -251,25 +251,25 @@
domParser.setProperty(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
}
}
- } else if(JAXP_SCHEMA_SOURCE.equals(name)){
- if( isValidating() ) {
- String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE);
- if(value !=null && W3C_XML_SCHEMA.equals(value)){
- domParser.setProperty(name, val);
- }else{
+ } else if(JAXP_SCHEMA_SOURCE.equals(name)){
+ if( isValidating() ) {
+ String value=(String)dbfAttrs.get(JAXP_SCHEMA_LANGUAGE);
+ if(value !=null && W3C_XML_SCHEMA.equals(value)){
+ domParser.setProperty(name, val);
+ }else{
throw new IllegalArgumentException(
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,
"jaxp-order-not-supported",
new Object[] {JAXP_SCHEMA_LANGUAGE, JAXP_SCHEMA_SOURCE}));
- }
- }
- } else {
+ }
+ }
+ } else {
// Let Xerces code handle the property
domParser.setProperty(name, val);
- }
- }
- }
- }
+ }
+ }
+ }
+ }
/**
* Non-preferred: use the getDOMImplementation() method instead of this
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -39,30 +39,30 @@
* This is the implementation specific class for the
* javax.xml.parsers.SAXParserFactory
. This is the platform
* default implementation for the platform.
- *
+ *
* @author Rajiv Mordani
* @author Edwin Goei
- *
+ *
* @version $Id: SAXParserFactoryImpl.java,v 1.7 2009/07/28 23:48:32 joehw Exp $
*/
public class SAXParserFactoryImpl extends SAXParserFactory {
-
+
/** Feature identifier: validation. */
private static final String VALIDATION_FEATURE =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
+
/** Feature identifier: namespaces. */
private static final String NAMESPACES_FEATURE =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
+
/** Feature identifier: XInclude processing */
- private static final String XINCLUDE_FEATURE =
+ private static final String XINCLUDE_FEATURE =
Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FEATURE;
-
+
private Hashtable features;
private Schema grammar;
private boolean isXIncludeAware;
-
+
/**
* State of the secure processing feature, initially false
*/
@@ -83,14 +83,14 @@
// Translate to ParserConfigurationException
throw new ParserConfigurationException(se.getMessage());
}
- return saxParserImpl;
+ return saxParserImpl;
}
/**
* Common code for translating exceptions
*/
private SAXParserImpl newSAXParserImpl()
- throws ParserConfigurationException, SAXNotRecognizedException,
+ throws ParserConfigurationException, SAXNotRecognizedException,
SAXNotSupportedException
{
SAXParserImpl saxParserImpl;
@@ -107,12 +107,12 @@
}
/**
- * Sets the particular feature in the underlying implementation of
+ * Sets the particular feature in the underlying implementation of
* org.xml.sax.XMLReader.
*/
public void setFeature(String name, boolean value)
- throws ParserConfigurationException, SAXNotRecognizedException,
- SAXNotSupportedException {
+ throws ParserConfigurationException, SAXNotRecognizedException,
+ SAXNotSupportedException {
if (name == null) {
throw new NullPointerException();
}
@@ -120,13 +120,13 @@
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if (System.getSecurityManager() != null && (!value)) {
throw new ParserConfigurationException(
- SAXMessageFormatter.formatMessage(null,
+ SAXMessageFormatter.formatMessage(null,
"jaxp-secureprocessing-feature", null));
}
fSecureProcess = value;
return;
}
-
+
// XXX This is ugly. We have to collect the features and then
// later create an XMLReader to verify the features.
putInFeatures(name, value);
@@ -143,12 +143,12 @@
}
/**
- * returns the particular property requested for in the underlying
+ * returns the particular property requested for in the underlying
* implementation of org.xml.sax.XMLReader.
*/
public boolean getFeature(String name)
throws ParserConfigurationException, SAXNotRecognizedException,
- SAXNotSupportedException {
+ SAXNotSupportedException {
if (name == null) {
throw new NullPointerException();
}
@@ -159,7 +159,7 @@
// feature value
return newSAXParserImpl().getXMLReader().getFeature(name);
}
-
+
public Schema getSchema() {
return grammar;
}
@@ -175,23 +175,23 @@
public void setXIncludeAware(boolean state) {
putInFeatures(XINCLUDE_FEATURE, state);
}
-
-
+
+
public void setValidating(boolean validating) {
putInFeatures(VALIDATION_FEATURE, validating);
}
-
+
public boolean isValidating() {
return getFromFeatures(VALIDATION_FEATURE);
}
-
+
private void putInFeatures(String name, boolean value){
if (features == null) {
features = new Hashtable();
}
features.put(name, value ? Boolean.TRUE : Boolean.FALSE);
}
-
+
private boolean getFromFeatures(String name){
if (features == null){
return false;
@@ -201,11 +201,11 @@
return (value == null) ? false : Boolean.valueOf(value.toString()).booleanValue();
}
}
-
+
public boolean isNamespaceAware() {
return getFromFeatures(NAMESPACES_FEATURE);
}
-
+
public void setNamespaceAware(boolean awareness) {
putInFeatures(NAMESPACES_FEATURE, awareness);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SAXParserImpl.java Wed May 02 13:32:36 2012 +0100
@@ -59,10 +59,10 @@
/**
* This is the implementation specific class for the
* javax.xml.parsers.SAXParser
.
- *
+ *
* @author Rajiv Mordani
* @author Edwin Goei
- *
+ *
* @version $Id: SAXParserImpl.java,v 1.7 2010-11-01 04:40:06 joehw Exp $
*/
public class SAXParserImpl extends javax.xml.parsers.SAXParser
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/SchemaValidatorConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -33,63 +33,63 @@
/**
* javax.xml.datatype
Object
s that map XML to/from Java Object
s.DatatypeFactory
.
* The following implementation resolution mechanisms are used in the following order:
@@ -54,68 +54,68 @@
* {@link #DATATYPEFACTORY_IMPLEMENTATION_CLASS}, "
javax.xml.datatype.DatatypeFactoryImpl
".
* Any Exception thrown during the instantiation process is wrapped as a {@link DatatypeConfigurationException}.
* DatatypeFactory
.DatatypeFactory
.Duration
- * specifying the Duration
as its string representation, "PnYnMnDTnHnMnS",
- * as defined in XML Schema 1.0 section 3.2.6.1.duration
as:
- * duration represents a duration of time.
- * The value space of duration is a six-dimensional space where the coordinates designate the
- * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
- * These components are ordered in their significance by their order of appearance i.e. as
- * year, month, day, hour, minute, and second.
- *
+ /**
+ * Duration
+ * specifying the Duration
as its string representation, "PnYnMnDTnHnMnS",
+ * as defined in XML Schema 1.0 section 3.2.6.1.duration
as:
+ * duration represents a duration of time.
+ * The value space of duration is a six-dimensional space where the coordinates designate the
+ * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
+ * These components are ordered in their significance by their order of appearance i.e. as
+ * year, month, day, hour, minute, and second.
+ *
* String
representation of a Duration
.
- *
- * @return New Duration
created from parsing the lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException if lexicalRepresentation
is null
.
- */
- public Duration newDuration(final String lexicalRepresentation) {
-
- return new DurationImpl(lexicalRepresentation);
- }
-
- /**
- * Duration
- * specifying the Duration
as milliseconds.duration
as:
- * duration represents a duration of time.
- * The value space of duration is a six-dimensional space where the coordinates designate the
- * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
- * These components are ordered in their significance by their order of appearance i.e. as
- * year, month, day, hour, minute, and second.
- *
+ *
+ * @param lexicalRepresentation String
representation of a Duration
.
+ *
+ * @return New Duration
created from parsing the lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException if lexicalRepresentation
is null
.
+ */
+ public Duration newDuration(final String lexicalRepresentation) {
+
+ return new DurationImpl(lexicalRepresentation);
+ }
+
+ /**
+ * Duration
+ * specifying the Duration
as milliseconds.duration
as:
+ * duration represents a duration of time.
+ * The value space of duration is a six-dimensional space where the coordinates designate the
+ * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively.
+ * These components are ordered in their significance by their order of appearance i.e. as
+ * year, month, day, hour, minute, and second.
+ *
* get
methods of the created {@link Duration}.
* The values conform to and are defined by:Duration
representing durationInMilliseconds
.
- */
- public Duration newDuration(final long durationInMilliseconds) {
-
- return new DurationImpl(durationInMilliseconds);
- }
-
- /**
- * Duration
- * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.Duration
representing durationInMilliseconds
.
+ */
+ public Duration newDuration(final long durationInMilliseconds) {
+
+ return new DurationImpl(durationInMilliseconds);
+ }
+
+ /**
+ * Duration
+ * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.false
to create a negative duration. When the length
- * of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
- *
- * @return New Duration
created from the specified values.
- *
- * @throws IllegalArgumentException If values are not a valid representation of a Duration
.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If any values are null
.
- *
- * @see #newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days,
- * BigInteger hours, BigInteger minutes, BigDecimal seconds)
- */
- public Duration newDuration(
- final boolean isPositive,
- final BigInteger years,
- final BigInteger months,
- final BigInteger days,
- final BigInteger hours,
- final BigInteger minutes,
- final BigDecimal seconds) {
-
- return new DurationImpl(
- isPositive,
- years,
- months,
- days,
- hours,
- minutes,
- seconds
- );
- }
- /**
- * Duration
of type xdt:yearMonthDuration
using the specified
- * year
and month
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.false
to create a negative duration. When the length
+ * of the duration is zero, this parameter will be ignored.
+ * @param years of this Duration
+ * @param months of this Duration
+ * @param days of this Duration
+ * @param hours of this Duration
+ * @param minutes of this Duration
+ * @param seconds of this Duration
+ *
+ * @return New Duration
created from the specified values.
+ *
+ * @throws IllegalArgumentException If values are not a valid representation of a Duration
.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If any values are null
.
+ *
+ * @see #newDuration(boolean isPositive, BigInteger years, BigInteger months, BigInteger days,
+ * BigInteger hours, BigInteger minutes, BigDecimal seconds)
+ */
+ public Duration newDuration(
+ final boolean isPositive,
+ final BigInteger years,
+ final BigInteger months,
+ final BigInteger days,
+ final BigInteger hours,
+ final BigInteger minutes,
+ final BigDecimal seconds) {
+
+ return new DurationImpl(
+ isPositive,
+ years,
+ months,
+ days,
+ hours,
+ minutes,
+ seconds
+ );
+ }
+ /**
+ * Duration
of type xdt:yearMonthDuration
using the specified
+ * year
and month
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration
.
- * @param month Month of Duration
.
- *
- * @return New Duration
created using the specified year
and month
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if all of the fields (year, month) are null or
- * if any of the fields is negative.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- */
- public Duration newDurationYearMonth(
- final boolean isPositive,
- final BigInteger year,
- final BigInteger month) {
+ * @param year Year of Duration
.
+ * @param month Month of Duration
.
+ *
+ * @return New Duration
created using the specified year
and month
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if all of the fields (year, month) are null or
+ * if any of the fields is negative.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ */
+ public Duration newDurationYearMonth(
+ final boolean isPositive,
+ final BigInteger year,
+ final BigInteger month) {
return new DurationYearMonthImpl(
isPositive,
@@ -226,76 +226,76 @@
month
);
- }
- /**
- * Duration
of type xdt:yearMonthDuration
using the specified
- * year
and month
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.Duration
of type xdt:yearMonthDuration
using the specified
+ * year
and month
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration
.
- * @param month Month of Duration
.
- *
- * @return New Duration
created using the specified year
and month
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields (year, month) is negative.
- */
+ * @param year Year of Duration
.
+ * @param month Month of Duration
.
+ *
+ * @return New Duration
created using the specified year
and month
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields (year, month) is negative.
+ */
@Override
- public Duration newDurationYearMonth(
- final boolean isPositive,
- final int year,
- final int month) {
+ public Duration newDurationYearMonth(
+ final boolean isPositive,
+ final int year,
+ final int month) {
- return new DurationYearMonthImpl(
- isPositive,
- year,
- month);
- }
+ return new DurationYearMonthImpl(
+ isPositive,
+ year,
+ month);
+ }
- /**
- * Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
- * "PnYnM",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
+ * "PnYnM",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.Duration
created using the specified lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
+ * @param lexicalRepresentation Lexical representation of a duration.
+ *
+ * @return New Duration
created using the specified lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
public Duration newDurationYearMonth(
final String lexicalRepresentation) {
return new DurationYearMonthImpl(lexicalRepresentation);
}
- /**
- * Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.get
methods of the created {@link Duration}.
* The values conform to and are defined by:Duration
to create.
- *
- * @return New Duration
created using the specified durationInMilliseconds
.
- */
+ *
+ * @param durationInMilliseconds Milliseconds of Duration
to create.
+ *
+ * @return New Duration
created using the specified durationInMilliseconds
.
+ */
public Duration newDurationYearMonth(
final long durationInMilliseconds) {
return new DurationYearMonthImpl(durationInMilliseconds);
}
- /**
- * Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
- * "PnDTnHnMnS",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
+ * "PnDTnHnMnS",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.Duration
created using the specified lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
- public Duration newDurationDayTime(final String lexicalRepresentation) {
- // lexicalRepresentation must be non-null
- if (lexicalRepresentation == null) {
- throw new NullPointerException(
+ * @param lexicalRepresentation Lexical representation of a duration.
+ *
+ * @return New Duration
created using the specified lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ public Duration newDurationDayTime(final String lexicalRepresentation) {
+ // lexicalRepresentation must be non-null
+ if (lexicalRepresentation == null) {
+ throw new NullPointerException(
"Trying to create an xdt:dayTimeDuration with an invalid"
+ " lexical representation of \"null\"");
- }
+ }
- return new DurationDayTimeImpl(lexicalRepresentation);
- }
+ return new DurationDayTimeImpl(lexicalRepresentation);
+ }
- /**
- * Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.get
methods of the created {@link Duration}.
* The values conform to and are defined by:Duration
to create.
- *
- * @return New Duration
created with the specified durationInMilliseconds
.
- *
- * @see
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
- */
- public Duration newDurationDayTime(final long durationInMilliseconds) {
+ * @param durationInMilliseconds Milliseconds of Duration
to create.
+ *
+ * @return New Duration
created with the specified durationInMilliseconds
.
+ *
+ * @see
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
+ */
+ public Duration newDurationDayTime(final long durationInMilliseconds) {
- return new DurationDayTimeImpl(durationInMilliseconds);
- }
+ return new DurationDayTimeImpl(durationInMilliseconds);
+ }
- /**
- * Duration
of type xdt:dayTimeDuration
using the specified
- * day
, hour
, minute
and second
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.Duration
of type xdt:dayTimeDuration
using the specified
+ * day
, hour
, minute
and second
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration
.
- * @param hour Hour of Duration
.
- * @param minute Minute of Duration
.
- * @param second Second of Duration
.
- *
- * @return New Duration
created with the specified day
, hour
, minute
- * and second
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if all the fields (day, hour, ...) are null or
- * if any of the fields is negative.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- */
- public Duration newDurationDayTime(
- final boolean isPositive,
- final BigInteger day,
- final BigInteger hour,
- final BigInteger minute,
- final BigInteger second) {
+ * @param day Day of Duration
.
+ * @param hour Hour of Duration
.
+ * @param minute Minute of Duration
.
+ * @param second Second of Duration
.
+ *
+ * @return New Duration
created with the specified day
, hour
, minute
+ * and second
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if all the fields (day, hour, ...) are null or
+ * if any of the fields is negative.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ */
+ public Duration newDurationDayTime(
+ final boolean isPositive,
+ final BigInteger day,
+ final BigInteger hour,
+ final BigInteger minute,
+ final BigInteger second) {
- return new DurationDayTimeImpl(
- isPositive,
- day,
- hour,
- minute,
- (second != null)? new BigDecimal(second):null
- );
- }
+ return new DurationDayTimeImpl(
+ isPositive,
+ day,
+ hour,
+ minute,
+ (second != null)? new BigDecimal(second):null
+ );
+ }
- /**
- * Duration
of type xdt:dayTimeDuration
using the specified
- * day
, hour
, minute
and second
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.Duration
of type xdt:dayTimeDuration
using the specified
+ * day
, hour
, minute
and second
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration
.
- * @param hour Hour of Duration
.
- * @param minute Minute of Duration
.
- * @param second Second of Duration
.
- *
- * @return New Duration
created with the specified day
, hour
, minute
- * and second
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields (day, hour, ...) is negative.
- */
- public Duration newDurationDayTime(
- final boolean isPositive,
- final int day,
- final int hour,
- final int minute,
- final int second) {
+ * @param day Day of Duration
.
+ * @param hour Hour of Duration
.
+ * @param minute Minute of Duration
.
+ * @param second Second of Duration
.
+ *
+ * @return New Duration
created with the specified day
, hour
, minute
+ * and second
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields (day, hour, ...) is negative.
+ */
+ public Duration newDurationDayTime(
+ final boolean isPositive,
+ final int day,
+ final int hour,
+ final int minute,
+ final int second) {
- return new DurationDayTimeImpl(
- isPositive,
- day,
- hour,
- minute,
- second
- );
- }
+ return new DurationDayTimeImpl(
+ isPositive,
+ day,
+ hour,
+ minute,
+ second
+ );
+ }
- /**
- * XMLGregorianCalendar
.XMLGregorianCalendar
.XMLGregorianCalendar
with all date/time datatype fields set to
* {@link DatatypeConstants#FIELD_UNDEFINED} or null.
- */
- public XMLGregorianCalendar newXMLGregorianCalendar() {
-
- return new XMLGregorianCalendarImpl();
- }
-
- /**
- *
@@ -523,130 +523,130 @@
*
XMLGregorianCalendar
created from the lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If the lexicalRepresentation
is not a valid XMLGregorianCalendar
.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
- public XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation) {
-
- return new XMLGregorianCalendarImpl(lexicalRepresentation);
- }
-
- /**
- * XMLGregorianCalendar
from a {@link GregorianCalendar}.
- *
- *
- *
- *
- *
- * Field by Field Conversion from
- * {@link GregorianCalendar} to an {@link XMLGregorianCalendar}
- *
- *
- *
- *
- *
- *
- * java.util.GregorianCalendar
field
- * javax.xml.datatype.XMLGregorianCalendar
field
- *
- *
- * ERA == GregorianCalendar.BC ? -YEAR : YEAR
{@link XMLGregorianCalendar#setYear(int year)}
- *
- *
- *
- * MONTH + 1
{@link XMLGregorianCalendar#setMonth(int month)}
- *
- *
- *
- * DAY_OF_MONTH
{@link XMLGregorianCalendar#setDay(int day)}
- *
- *
- *
- * HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
{@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)}
- *
- *
- *
- *
- *
- * (ZONE_OFFSET + DST_OFFSET) / (60*1000)
- * (in minutes)
- * {@link XMLGregorianCalendar#setTimezone(int offset)}*
- *
- * java.util.GregorianCalendar
daylight savings timezone id in the
- * XML Schema 1.0 date/time datatype representation.TimeZone
field,
- *
- *
this.getTimezone() != FIELD_UNDEFINED
,
- * create a java.util.TimeZone
with a custom timezone id
- * using the this.getTimezone()
.GregorianCalendar
default timezone value
- * for the host is defined as specified by
- * java.util.TimeZone.getDefault()
.java.util.GregorianCalendar
used to create XMLGregorianCalendar
- *
- * @return XMLGregorianCalendar
created from java.util.GregorianCalendar
- *
- * @throws NullPointerException If cal
is null
.
- */
- public XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal) {
-
- return new XMLGregorianCalendarImpl(cal);
- }
+ *
+ * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes.
+ *
+ * @return XMLGregorianCalendar
created from the lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If the lexicalRepresentation
is not a valid XMLGregorianCalendar
.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation) {
+
+ return new XMLGregorianCalendarImpl(lexicalRepresentation);
+ }
- /**
- * year
parameter supports
- * arbitrarily large numbers and fractionalSecond has infinite
- * precision.XMLGregorianCalendar
to be created.
- * @param month of XMLGregorianCalendar
to be created.
- * @param day of XMLGregorianCalendar
to be created.
- * @param hour of XMLGregorianCalendar
to be created.
- * @param minute of XMLGregorianCalendar
to be created.
- * @param second of XMLGregorianCalendar
to be created.
- * @param fractionalSecond of XMLGregorianCalendar
to be created.
- * @param timezone of XMLGregorianCalendar
to be created.
- *
- * @return XMLGregorianCalendar
created from specified values.
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- * @throws NullPointerException If any parameters are null
.
- *
- */
- public XMLGregorianCalendar newXMLGregorianCalendar(
- final BigInteger year,
- final int month,
- final int day,
- final int hour,
- final int minute,
- final int second,
- final BigDecimal fractionalSecond,
- final int timezone) {
-
- return new XMLGregorianCalendarImpl(
- year,
- month,
- day,
- hour,
- minute,
- second,
- fractionalSecond,
- timezone
- );
- }
+ /**
+ * XMLGregorianCalendar
from a {@link GregorianCalendar}.
+ *
+ *
+ *
+ *
+ *
+ * Field by Field Conversion from
+ * {@link GregorianCalendar} to an {@link XMLGregorianCalendar}
+ *
+ *
+ *
+ *
+ *
+ *
+ * java.util.GregorianCalendar
field
+ * javax.xml.datatype.XMLGregorianCalendar
field
+ *
+ *
+ * ERA == GregorianCalendar.BC ? -YEAR : YEAR
{@link XMLGregorianCalendar#setYear(int year)}
+ *
+ *
+ *
+ * MONTH + 1
{@link XMLGregorianCalendar#setMonth(int month)}
+ *
+ *
+ *
+ * DAY_OF_MONTH
{@link XMLGregorianCalendar#setDay(int day)}
+ *
+ *
+ *
+ * HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
{@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)}
+ *
+ *
+ *
+ *
+ *
+ * (ZONE_OFFSET + DST_OFFSET) / (60*1000)
+ * (in minutes)
+ * {@link XMLGregorianCalendar#setTimezone(int offset)}*
+ *
+ * java.util.GregorianCalendar
daylight savings timezone id in the
+ * XML Schema 1.0 date/time datatype representation.TimeZone
field,
+ *
+ *
this.getTimezone() != FIELD_UNDEFINED
,
+ * create a java.util.TimeZone
with a custom timezone id
+ * using the this.getTimezone()
.GregorianCalendar
default timezone value
+ * for the host is defined as specified by
+ * java.util.TimeZone.getDefault()
.java.util.GregorianCalendar
used to create XMLGregorianCalendar
+ *
+ * @return XMLGregorianCalendar
created from java.util.GregorianCalendar
+ *
+ * @throws NullPointerException If cal
is null
.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal) {
+
+ return new XMLGregorianCalendarImpl(cal);
+ }
+
+ /**
+ * year
parameter supports
+ * arbitrarily large numbers and fractionalSecond has infinite
+ * precision.XMLGregorianCalendar
to be created.
+ * @param month of XMLGregorianCalendar
to be created.
+ * @param day of XMLGregorianCalendar
to be created.
+ * @param hour of XMLGregorianCalendar
to be created.
+ * @param minute of XMLGregorianCalendar
to be created.
+ * @param second of XMLGregorianCalendar
to be created.
+ * @param fractionalSecond of XMLGregorianCalendar
to be created.
+ * @param timezone of XMLGregorianCalendar
to be created.
+ *
+ * @return XMLGregorianCalendar
created from specified values.
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ * @throws NullPointerException If any parameters are null
.
+ *
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendar(
+ final BigInteger year,
+ final int month,
+ final int day,
+ final int hour,
+ final int minute,
+ final int second,
+ final BigDecimal fractionalSecond,
+ final int timezone) {
+
+ return new XMLGregorianCalendarImpl(
+ year,
+ month,
+ day,
+ hour,
+ minute,
+ second,
+ fractionalSecond,
+ timezone
+ );
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationDayTimeImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationDayTimeImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationDayTimeImpl.java Wed May 02 13:32:36 2012 +0100
@@ -1,196 +1,196 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
- */
-
-package com.sun.org.apache.xerces.internal.jaxp.datatype;
-
-
-import java.math.BigInteger;
-import java.math.BigDecimal;
-import javax.xml.datatype.DatatypeConstants;
-
-/**
- * xdt:dayTimeDuration
of a Duration
- * as specified in
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
- * "PnDTnHnMnS",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
- protected DurationDayTimeImpl(String lexicalRepresentation) {
- super(lexicalRepresentation);
-
- if (getYears() > 0 || getMonths() > 0) {
- throw new IllegalArgumentException(
- "Trying to create an xdt:dayTimeDuration with an invalid"
- + " lexical representation of \"" + lexicalRepresentation
- + "\", data model requires a format PnDTnHnMnS.");
- }
-
- convertToCanonicalDayTime();
- }
- /**
- * Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.get
methods of the created {@link Duration}.
- * The values conform to and are defined by:
- *
- *
- * Duration
to create.
- *
- * @return New Duration
created with the specified durationInMilliseconds
.
- *
- * @see
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
- */
- protected DurationDayTimeImpl(final long durationInMilliseconds) {
- super(durationInMilliseconds);
- convertToCanonicalDayTime();
- // only day, hour, minute, and second should have values
- years = null;
- months = null;
- }
-
-
- /**
- * The value space of xs:dayTimeDuration is the set of fractional second values.
- * @return fractional second values
- */
- public float getValue() {
- float sec = (seconds==null)?0:seconds.floatValue();
- return (((((getDays() * 24) +
- getHours()) * 60) +
- getMinutes())*60) +
- sec;
- }
-
- private void convertToCanonicalDayTime() {
-
- while (getSeconds() >= 60)
- {
- seconds = seconds.subtract(BigDecimal.valueOf(60));
- minutes = BigInteger.valueOf((long) getMinutes()).add(BigInteger.ONE);
- }
-
- while (getMinutes() >= 60)
- {
- minutes = minutes.subtract(BigInteger.valueOf(60));
- hours = BigInteger.valueOf((long) getHours()).add(BigInteger.ONE);
- }
-
- while (getHours() >= 24)
- {
- hours = hours.subtract(BigInteger.valueOf(24));
- days = BigInteger.valueOf((long) getDays()).add(BigInteger.ONE);
- }
- }
-
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+ */
+
+package com.sun.org.apache.xerces.internal.jaxp.datatype;
+
+
+import java.math.BigInteger;
+import java.math.BigDecimal;
+import javax.xml.datatype.DatatypeConstants;
+
+/**
+ * xdt:dayTimeDuration
of a Duration
+ * as specified in
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
+ * "PnDTnHnMnS",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ protected DurationDayTimeImpl(String lexicalRepresentation) {
+ super(lexicalRepresentation);
+
+ if (getYears() > 0 || getMonths() > 0) {
+ throw new IllegalArgumentException(
+ "Trying to create an xdt:dayTimeDuration with an invalid"
+ + " lexical representation of \"" + lexicalRepresentation
+ + "\", data model requires a format PnDTnHnMnS.");
+ }
+
+ convertToCanonicalDayTime();
+ }
+ /**
+ * Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.get
methods of the created {@link Duration}.
+ * The values conform to and are defined by:
+ *
+ *
+ * Duration
to create.
+ *
+ * @return New Duration
created with the specified durationInMilliseconds
.
+ *
+ * @see
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
+ */
+ protected DurationDayTimeImpl(final long durationInMilliseconds) {
+ super(durationInMilliseconds);
+ convertToCanonicalDayTime();
+ // only day, hour, minute, and second should have values
+ years = null;
+ months = null;
+ }
+
+
+ /**
+ * The value space of xs:dayTimeDuration is the set of fractional second values.
+ * @return fractional second values
+ */
+ public float getValue() {
+ float sec = (seconds==null)?0:seconds.floatValue();
+ return (((((getDays() * 24) +
+ getHours()) * 60) +
+ getMinutes())*60) +
+ sec;
+ }
+
+ private void convertToCanonicalDayTime() {
+
+ while (getSeconds() >= 60)
+ {
+ seconds = seconds.subtract(BigDecimal.valueOf(60));
+ minutes = BigInteger.valueOf((long) getMinutes()).add(BigInteger.ONE);
+ }
+
+ while (getMinutes() >= 60)
+ {
+ minutes = minutes.subtract(BigInteger.valueOf(60));
+ hours = BigInteger.valueOf((long) getHours()).add(BigInteger.ONE);
+ }
+
+ while (getHours() >= 24)
+ {
+ hours = hours.subtract(BigInteger.valueOf(24));
+ days = BigInteger.valueOf((long) getDays()).add(BigInteger.ONE);
+ }
+ }
+
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -39,20 +39,20 @@
/**
*
This class provides a number of methods that make it easy * to use for the duration datatype of XML Schema 1.0 with * the errata.
- * + * *Duration objects only have partial order, where two values A and B * maybe either:
@@ -65,12 +65,12 @@ *For example, 30 days cannot be meaningfully compared to one month. * The {@link #compare(Duration)} method implements this * relationship.
- * + * *See the {@link #isLongerThan(Duration)} method for details about * the order relationship among {@link Duration} objects.
- * - * - * + * + * + * *This class provides a set of basic arithmetic operations, such * as addition, subtraction and multiplication. @@ -78,79 +78,79 @@ * fail for some combinations of operations. For example, you cannot * subtract 15 days from 1 month. See the javadoc of those methods * for detailed conditions where this could happen.
- * + * *Also, division of a duration by a number is not provided because * the {@link Duration} class can only deal with finite precision - * decimal numbers. For example, one cannot represent 1 sec divided by 3.
- * + * decimal numbers. For example, one cannot represent 1 sec divided by 3. + * *However, you could substitute a division by 3 with multiplying * by numbers such as 0.3 or 0.333.
* * - * + * ** Because some operations of {@link Duration} rely on {@link Calendar} * even though {@link Duration} can hold very large or very small values, * some of the methods may not work correctly on such {@link Duration}s. * The impacted methods document their dependency on {@link Calendar}. - * - * + * + * * @author Kohsuke Kawaguchi * @author Joseph Fialli - * @version $Revision: 1.8 $, $Date: 2010/05/19 23:20:06 $ + * @version $Revision: 1.8 $, $Date: 2010/05/19 23:20:06 $ * @see XMLGregorianCalendar#add(Duration) */ class DurationImpl - extends Duration - implements Serializable { - + extends Duration + implements Serializable { + /** *
Number of Fields.
*/ private static final int FIELD_NUM = 6; - + /** *Internal array of value Fields.
*/ - private static final DatatypeConstants.Field[] FIELDS = new DatatypeConstants.Field[]{ - DatatypeConstants.YEARS, - DatatypeConstants.MONTHS, - DatatypeConstants.DAYS, - DatatypeConstants.HOURS, - DatatypeConstants.MINUTES, - DatatypeConstants.SECONDS - }; + private static final DatatypeConstants.Field[] FIELDS = new DatatypeConstants.Field[]{ + DatatypeConstants.YEARS, + DatatypeConstants.MONTHS, + DatatypeConstants.DAYS, + DatatypeConstants.HOURS, + DatatypeConstants.MINUTES, + DatatypeConstants.SECONDS + }; - /** - *Internal array of value Field ids.
- */ - private static final int[] FIELD_IDS = { - DatatypeConstants.YEARS.getId(), - DatatypeConstants.MONTHS.getId(), - DatatypeConstants.DAYS.getId(), - DatatypeConstants.HOURS.getId(), - DatatypeConstants.MINUTES.getId(), - DatatypeConstants.SECONDS.getId() - }; - + /** + *Internal array of value Field ids.
+ */ + private static final int[] FIELD_IDS = { + DatatypeConstants.YEARS.getId(), + DatatypeConstants.MONTHS.getId(), + DatatypeConstants.DAYS.getId(), + DatatypeConstants.HOURS.getId(), + DatatypeConstants.MINUTES.getId(), + DatatypeConstants.SECONDS.getId() + }; + /** * TimeZone for GMT. */ private static final TimeZone GMT = TimeZone.getTimeZone("GMT"); - /** - *BigDecimal value of 0.
- */ - private static final BigDecimal ZERO = BigDecimal.valueOf((long) 0); + /** + *BigDecimal value of 0.
+ */ + private static final BigDecimal ZERO = BigDecimal.valueOf((long) 0); /** *Indicates the sign. -1, 0 or 1 if the duration is negative, * zero, or positive.
*/ protected int signum; - + /** *Years of this Duration
.
Months of this Duration
.
Days of this Duration
.
Hours of this Duration
.
Minutes of this Duration
.
Seconds of this Duration
.
Constructs a new Duration object by specifying each field individually.
- * + * *All the parameters are optional as long as at least one field is present. * If specified, parameters have to be zero or positive.
- * + * * @param isPositive Set tofalse
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param years of this Duration
@@ -236,7 +236,7 @@
* @param hours of this Duration
* @param minutes of this Duration
* @param seconds of this Duration
- *
+ *
* @throws IllegalArgumentException
* If years, months, days, hours, minutes and
* seconds parameters are all null
. Or if any
@@ -250,7 +250,7 @@
BigInteger hours,
BigInteger minutes,
BigDecimal seconds) {
-
+
this.years = years;
this.months = months;
this.days = days;
@@ -279,48 +279,48 @@
testNonNegative(minutes, DatatypeConstants.MINUTES);
testNonNegative(seconds, DatatypeConstants.SECONDS);
}
-
+
/**
* Makes sure that the given number is non-negative. If it is not, * throw {@link IllegalArgumentException}.
- * + * * @param n Number to test. * @param f Field to test. */ protected static void testNonNegative(BigInteger n, DatatypeConstants.Field f) { if (n != null && n.signum() < 0) { - throw new IllegalArgumentException( + throw new IllegalArgumentException( DatatypeMessageFormatter.formatMessage(null, "NegativeField", new Object[]{f.toString()}) ); } } - + /** *Makes sure that the given number is non-negative. If it is not, * throw {@link IllegalArgumentException}.
- * + * * @param n Number to test. * @param f Field to test. */ protected static void testNonNegative(BigDecimal n, DatatypeConstants.Field f) { if (n != null && n.signum() < 0) { - + throw new IllegalArgumentException( - DatatypeMessageFormatter.formatMessage(null, "NegativeField", new Object[]{f.toString()}) + DatatypeMessageFormatter.formatMessage(null, "NegativeField", new Object[]{f.toString()}) ); } } - + /** *Constructs a new Duration object by specifying each field * individually.
- * + * *This method is functionally equivalent to * invoking another constructor by wrapping * all non-zero parameters into {@link BigInteger} and {@link BigDecimal}. * Zero value of int parameter is equivalent of null value of - * the corresponding field.
- * + * the corresponding field. + * * @see #DurationImpl(boolean, BigInteger, BigInteger, BigInteger, BigInteger, * BigInteger, BigDecimal) */ @@ -342,24 +342,24 @@ seconds != DatatypeConstants.FIELD_UNDEFINED ? new BigDecimal(String.valueOf(seconds)) : null); } - /** - * TODO: Javadoc - * - * @param i int to convert to BigInteger. - * - * @return BigInteger representation of int. - */ + /** + * TODO: Javadoc + * + * @param i int to convert to BigInteger. + * + * @return BigInteger representation of int. + */ protected static BigInteger wrap(final int i) { - - // field may not be set - if (i == DatatypeConstants.FIELD_UNDEFINED) { - return null; - } - - // int -> BigInteger + + // field may not be set + if (i == DatatypeConstants.FIELD_UNDEFINED) { + return null; + } + + // int -> BigInteger return new BigInteger(String.valueOf(i)); } - + /** *Constructs a new Duration object by specifying the duration * in milliseconds.
@@ -423,22 +423,22 @@ * Constructs a new Duration object by * parsing its string representation * "PnYnMnDTnHnMnS" as defined in XML Schema 1.0 section 3.2.6.1. - * + * ** The string representation may not have any leading * and trailing whitespaces. - * + * *
* For example, this method parses strings like * "P1D" (1 day), "-PT100S" (-100 sec.), "P1DT12H" (1 days and 12 hours). - * + * *
- * The parsing is done field by field so that + * The parsing is done field by field so that * the following holds for any lexically correct string x: *
* new Duration(x).toString().equals(x) *- * + * * Returns a non-null valid duration object that holds the value * indicated by the lexicalRepresentation parameter. * @@ -453,30 +453,30 @@ protected DurationImpl(String lexicalRepresentation) throws IllegalArgumentException { // only if I could use the JDK1.4 regular expression .... - + final String s = lexicalRepresentation; boolean positive; int[] idx = new int[1]; - int length = s.length(); - boolean timeRequired = false; + int length = s.length(); + boolean timeRequired = false; + + if (lexicalRepresentation == null) { + throw new NullPointerException(); + } - if (lexicalRepresentation == null) { - throw new NullPointerException(); - } - - idx[0] = 0; - if (length != idx[0] && s.charAt(idx[0]) == '-') { - idx[0]++; - positive = false; - } else { - positive = true; - } - - if (length != idx[0] && s.charAt(idx[0]++) != 'P') { - throw new IllegalArgumentException(s); //,idx[0]-1); - } + idx[0] = 0; + if (length != idx[0] && s.charAt(idx[0]) == '-') { + idx[0]++; + positive = false; + } else { + positive = true; + } - + if (length != idx[0] && s.charAt(idx[0]++) != 'P') { + throw new IllegalArgumentException(s); //,idx[0]-1); + } + + // phase 1: chop the string into chunks // (where a chunk is '
Four constants defined for the comparison of durations.
*/ @@ -689,213 +689,213 @@ XMLGregorianCalendarImpl.parse("1903-03-01T00:00:00Z"), XMLGregorianCalendarImpl.parse("1903-07-01T00:00:00Z") }; - - /** - *Partial order relation comparison with this Duration
instance.
Comparison result must be in accordance with - * W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2, - * Order relation on duration.
- * - *Return:
- *Duration
is shorter than duration
parameterDuration
is equal to duration
parameterDuration
is longer than duration
parameterthis
Duration
and duration
parameter as
- * {@link DatatypeConstants#LESSER}, {@link DatatypeConstants#EQUAL}, {@link DatatypeConstants#GREATER}
- * or {@link DatatypeConstants#INDETERMINATE}.
- *
- * @throws UnsupportedOperationException If the underlying implementation
- * cannot reasonably process the request, e.g. W3C XML Schema allows for
- * arbitrarily large/small/precise values, the request may be beyond the
- * implementations capability.
- * @throws NullPointerException if duration
is null
.
- *
- * @see #isShorterThan(Duration)
- * @see #isLongerThan(Duration)
- */
+
+ /**
+ * Partial order relation comparison with this Duration
instance.
Comparison result must be in accordance with + * W3C XML Schema 1.0 Part 2, Section 3.2.7.6.2, + * Order relation on duration.
+ * + *Return:
+ *Duration
is shorter than duration
parameterDuration
is equal to duration
parameterDuration
is longer than duration
parameterthis
Duration
and duration
parameter as
+ * {@link DatatypeConstants#LESSER}, {@link DatatypeConstants#EQUAL}, {@link DatatypeConstants#GREATER}
+ * or {@link DatatypeConstants#INDETERMINATE}.
+ *
+ * @throws UnsupportedOperationException If the underlying implementation
+ * cannot reasonably process the request, e.g. W3C XML Schema allows for
+ * arbitrarily large/small/precise values, the request may be beyond the
+ * implementations capability.
+ * @throws NullPointerException if duration
is null
.
+ *
+ * @see #isShorterThan(Duration)
+ * @see #isLongerThan(Duration)
+ */
public int compare(Duration rhs) {
-
- BigInteger maxintAsBigInteger = BigInteger.valueOf((long) Integer.MAX_VALUE);
- BigInteger minintAsBigInteger = BigInteger.valueOf((long) Integer.MIN_VALUE);
+
+ BigInteger maxintAsBigInteger = BigInteger.valueOf((long) Integer.MAX_VALUE);
+ BigInteger minintAsBigInteger = BigInteger.valueOf((long) Integer.MIN_VALUE);
- // check for fields that are too large in this Duration
- if (years != null && years.compareTo(maxintAsBigInteger) == 1) {
+ // check for fields that are too large in this Duration
+ if (years != null && years.compareTo(maxintAsBigInteger) == 1) {
throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.YEARS.toString(), years.toString()})
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " years too large to be supported by this implementation "
- //+ years.toString()
- );
- }
- if (months != null && months.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " years too large to be supported by this implementation "
+ //+ years.toString()
+ );
+ }
+ if (months != null && months.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.MONTHS.toString(), months.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " months too large to be supported by this implementation "
- //+ months.toString()
- );
- }
- if (days != null && days.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " months too large to be supported by this implementation "
+ //+ months.toString()
+ );
+ }
+ if (days != null && days.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.DAYS.toString(), days.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " days too large to be supported by this implementation "
- //+ days.toString()
- );
- }
- if (hours != null && hours.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " days too large to be supported by this implementation "
+ //+ days.toString()
+ );
+ }
+ if (hours != null && hours.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.HOURS.toString(), hours.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " hours too large to be supported by this implementation "
- //+ hours.toString()
- );
- }
- if (minutes != null && minutes.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " hours too large to be supported by this implementation "
+ //+ hours.toString()
+ );
+ }
+ if (minutes != null && minutes.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.MINUTES.toString(), minutes.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " minutes too large to be supported by this implementation "
- //+ minutes.toString()
- );
- }
- if (seconds != null && seconds.toBigInteger().compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " minutes too large to be supported by this implementation "
+ //+ minutes.toString()
+ );
+ }
+ if (seconds != null && seconds.toBigInteger().compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.SECONDS.toString(), seconds.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " seconds too large to be supported by this implementation "
- //+ seconds.toString()
- );
- }
-
- // check for fields that are too large in rhs Duration
- BigInteger rhsYears = (BigInteger) rhs.getField(DatatypeConstants.YEARS);
- if (rhsYears != null && rhsYears.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " seconds too large to be supported by this implementation "
+ //+ seconds.toString()
+ );
+ }
+
+ // check for fields that are too large in rhs Duration
+ BigInteger rhsYears = (BigInteger) rhs.getField(DatatypeConstants.YEARS);
+ if (rhsYears != null && rhsYears.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.YEARS.toString(), rhsYears.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " years too large to be supported by this implementation "
- //+ rhsYears.toString()
- );
- }
- BigInteger rhsMonths = (BigInteger) rhs.getField(DatatypeConstants.MONTHS);
- if (rhsMonths != null && rhsMonths.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " years too large to be supported by this implementation "
+ //+ rhsYears.toString()
+ );
+ }
+ BigInteger rhsMonths = (BigInteger) rhs.getField(DatatypeConstants.MONTHS);
+ if (rhsMonths != null && rhsMonths.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.MONTHS.toString(), rhsMonths.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " months too large to be supported by this implementation "
- //+ rhsMonths.toString()
- );
- }
- BigInteger rhsDays = (BigInteger) rhs.getField(DatatypeConstants.DAYS);
- if (rhsDays != null && rhsDays.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " months too large to be supported by this implementation "
+ //+ rhsMonths.toString()
+ );
+ }
+ BigInteger rhsDays = (BigInteger) rhs.getField(DatatypeConstants.DAYS);
+ if (rhsDays != null && rhsDays.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.DAYS.toString(), rhsDays.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " days too large to be supported by this implementation "
- //+ rhsDays.toString()
- );
- }
- BigInteger rhsHours = (BigInteger) rhs.getField(DatatypeConstants.HOURS);
- if (rhsHours != null && rhsHours.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " days too large to be supported by this implementation "
+ //+ rhsDays.toString()
+ );
+ }
+ BigInteger rhsHours = (BigInteger) rhs.getField(DatatypeConstants.HOURS);
+ if (rhsHours != null && rhsHours.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.HOURS.toString(), rhsHours.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " hours too large to be supported by this implementation "
- //+ rhsHours.toString()
- );
- }
- BigInteger rhsMinutes = (BigInteger) rhs.getField(DatatypeConstants.MINUTES);
- if (rhsMinutes != null && rhsMinutes.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " hours too large to be supported by this implementation "
+ //+ rhsHours.toString()
+ );
+ }
+ BigInteger rhsMinutes = (BigInteger) rhs.getField(DatatypeConstants.MINUTES);
+ if (rhsMinutes != null && rhsMinutes.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.MINUTES.toString(), rhsMinutes.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " minutes too large to be supported by this implementation "
- //+ rhsMinutes.toString()
- );
- }
- BigDecimal rhsSecondsAsBigDecimal = (BigDecimal) rhs.getField(DatatypeConstants.SECONDS);
- BigInteger rhsSeconds = null;
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " minutes too large to be supported by this implementation "
+ //+ rhsMinutes.toString()
+ );
+ }
+ BigDecimal rhsSecondsAsBigDecimal = (BigDecimal) rhs.getField(DatatypeConstants.SECONDS);
+ BigInteger rhsSeconds = null;
if ( rhsSecondsAsBigDecimal != null ) {
rhsSeconds = rhsSecondsAsBigDecimal.toBigInteger();
}
- if (rhsSeconds != null && rhsSeconds.compareTo(maxintAsBigInteger) == 1) {
- throw new UnsupportedOperationException(
- DatatypeMessageFormatter.formatMessage(null, "TooLarge",
+ if (rhsSeconds != null && rhsSeconds.compareTo(maxintAsBigInteger) == 1) {
+ throw new UnsupportedOperationException(
+ DatatypeMessageFormatter.formatMessage(null, "TooLarge",
new Object[]{this.getClass().getName() + "#compare(Duration duration)" + DatatypeConstants.SECONDS.toString(), rhsSeconds.toString()})
-
- //this.getClass().getName() + "#compare(Duration duration)"
- //+ " seconds too large to be supported by this implementation "
- //+ rhsSeconds.toString()
- );
- }
+
+ //this.getClass().getName() + "#compare(Duration duration)"
+ //+ " seconds too large to be supported by this implementation "
+ //+ rhsSeconds.toString()
+ );
+ }
- // turn this Duration into a GregorianCalendar
- GregorianCalendar lhsCalendar = new GregorianCalendar(
- 1970,
- 1,
- 1,
- 0,
- 0,
- 0);
- lhsCalendar.add(GregorianCalendar.YEAR, getYears() * getSign());
- lhsCalendar.add(GregorianCalendar.MONTH, getMonths() * getSign());
- lhsCalendar.add(GregorianCalendar.DAY_OF_YEAR, getDays() * getSign());
- lhsCalendar.add(GregorianCalendar.HOUR_OF_DAY, getHours() * getSign());
- lhsCalendar.add(GregorianCalendar.MINUTE, getMinutes() * getSign());
- lhsCalendar.add(GregorianCalendar.SECOND, getSeconds() * getSign());
-
- // turn compare Duration into a GregorianCalendar
- GregorianCalendar rhsCalendar = new GregorianCalendar(
- 1970,
- 1,
- 1,
- 0,
- 0,
- 0);
- rhsCalendar.add(GregorianCalendar.YEAR, rhs.getYears() * rhs.getSign());
- rhsCalendar.add(GregorianCalendar.MONTH, rhs.getMonths() * rhs.getSign());
- rhsCalendar.add(GregorianCalendar.DAY_OF_YEAR, rhs.getDays() * rhs.getSign());
- rhsCalendar.add(GregorianCalendar.HOUR_OF_DAY, rhs.getHours() * rhs.getSign());
- rhsCalendar.add(GregorianCalendar.MINUTE, rhs.getMinutes() * rhs.getSign());
- rhsCalendar.add(GregorianCalendar.SECOND, rhs.getSeconds() * rhs.getSign());
-
-
- if (lhsCalendar.equals(rhsCalendar)) {
- return DatatypeConstants.EQUAL;
- }
+ // turn this Duration into a GregorianCalendar
+ GregorianCalendar lhsCalendar = new GregorianCalendar(
+ 1970,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0);
+ lhsCalendar.add(GregorianCalendar.YEAR, getYears() * getSign());
+ lhsCalendar.add(GregorianCalendar.MONTH, getMonths() * getSign());
+ lhsCalendar.add(GregorianCalendar.DAY_OF_YEAR, getDays() * getSign());
+ lhsCalendar.add(GregorianCalendar.HOUR_OF_DAY, getHours() * getSign());
+ lhsCalendar.add(GregorianCalendar.MINUTE, getMinutes() * getSign());
+ lhsCalendar.add(GregorianCalendar.SECOND, getSeconds() * getSign());
- return compareDates(this, rhs);
+ // turn compare Duration into a GregorianCalendar
+ GregorianCalendar rhsCalendar = new GregorianCalendar(
+ 1970,
+ 1,
+ 1,
+ 0,
+ 0,
+ 0);
+ rhsCalendar.add(GregorianCalendar.YEAR, rhs.getYears() * rhs.getSign());
+ rhsCalendar.add(GregorianCalendar.MONTH, rhs.getMonths() * rhs.getSign());
+ rhsCalendar.add(GregorianCalendar.DAY_OF_YEAR, rhs.getDays() * rhs.getSign());
+ rhsCalendar.add(GregorianCalendar.HOUR_OF_DAY, rhs.getHours() * rhs.getSign());
+ rhsCalendar.add(GregorianCalendar.MINUTE, rhs.getMinutes() * rhs.getSign());
+ rhsCalendar.add(GregorianCalendar.SECOND, rhs.getSeconds() * rhs.getSign());
+
+
+ if (lhsCalendar.equals(rhsCalendar)) {
+ return DatatypeConstants.EQUAL;
+ }
+
+ return compareDates(this, rhs);
}
-
+
/**
* Compares 2 given durations. (refer to W3C Schema Datatypes "3.2.6 duration")
*
@@ -909,13 +909,13 @@
* return GREATER_THAN if date1 is greater than OR equal to date2
*/
private int compareDates(Duration duration1, Duration duration2) {
-
- int resultA = DatatypeConstants.INDETERMINATE;
+
+ int resultA = DatatypeConstants.INDETERMINATE;
int resultB = DatatypeConstants.INDETERMINATE;
-
+
XMLGregorianCalendar tempA = (XMLGregorianCalendar)TEST_POINTS[0].clone();
XMLGregorianCalendar tempB = (XMLGregorianCalendar)TEST_POINTS[0].clone();
-
+
//long comparison algorithm is required
tempA.add(duration1);
tempB.add(duration2);
@@ -926,7 +926,7 @@
tempA = (XMLGregorianCalendar)TEST_POINTS[1].clone();
tempB = (XMLGregorianCalendar)TEST_POINTS[1].clone();
-
+
tempA.add(duration1);
tempB.add(duration2);
resultB = tempA.compare(tempB);
@@ -937,7 +937,7 @@
tempA = (XMLGregorianCalendar)TEST_POINTS[2].clone();
tempB = (XMLGregorianCalendar)TEST_POINTS[2].clone();
-
+
tempA.add(duration1);
tempB.add(duration2);
resultB = tempA.compare(tempB);
@@ -948,7 +948,7 @@
tempA = (XMLGregorianCalendar)TEST_POINTS[3].clone();
tempB = (XMLGregorianCalendar)TEST_POINTS[3].clone();
-
+
tempA.add(duration1);
tempB.add(duration2);
resultB = tempA.compare(tempB);
@@ -967,35 +967,35 @@
}
return resultA;
}
-
+
/**
* Returns a hash code consistent with the definition of the equals method.
- *
- * @see Object#hashCode()
+ *
+ * @see Object#hashCode()
*/
public int hashCode() {
// component wise hash is not correct because 1day = 24hours
- Calendar cal = TEST_POINTS[0].toGregorianCalendar();
- this.addTo(cal);
- return (int) getCalendarTimeInMillis(cal);
+ Calendar cal = TEST_POINTS[0].toGregorianCalendar();
+ this.addTo(cal);
+ return (int) getCalendarTimeInMillis(cal);
}
-
+
/**
* Returns a string representation of this duration object.
- *
+ *
* * The result is formatter according to the XML Schema 1.0 * spec and can be always parsed back later into the * equivalent duration object by * the {@link #DurationImpl(String)} constructor. - * + * *
* Formally, the following holds for any {@link Duration} - * object x. + * object x. *
* new Duration(x.toString()).equals(x) *- * + * * @return * Always return a non-null valid String object. */ @@ -1005,7 +1005,7 @@ buf.append('-'); } buf.append('P'); - + if (years != null) { buf.append(years + "Y"); } @@ -1028,19 +1028,19 @@ buf.append(toString(seconds) + "S"); } } - + return buf.toString(); } /** *
Turns {@link BigDecimal} to a string representation.
- * + * *Due to a behavior change in the {@link BigDecimal#toString()} * method in JDK1.5, this had to be implemented here.
- * + * * @param bdBigDecimal
to format as a String
- *
- * @return String
representation of BigDecimal
+ *
+ * @return String
representation of BigDecimal
*/
private String toString(BigDecimal bd) {
String intString = bd.unscaledValue().toString();
@@ -1071,70 +1071,70 @@
/**
* Checks if a field is set.
- *
+ *
* A field of a duration object may or may not be present.
* This method can be used to test if a field is present.
- *
+ *
* @param field
* one of the six Field constants (YEARS,MONTHS,DAYS,HOURS,
* MINUTES, or SECONDS.)
* @return
* true if the field is present. false if not.
- *
+ *
* @throws NullPointerException
* If the field parameter is null.
*/
public boolean isSet(DatatypeConstants.Field field) {
-
- if (field == null) {
+
+ if (field == null) {
String methodName = "javax.xml.datatype.Duration" + "#isSet(DatatypeConstants.Field field)" ;
- throw new NullPointerException(
+ throw new NullPointerException(
//"cannot be called with field == null"
- DatatypeMessageFormatter.formatMessage(null, "FieldCannotBeNull", new Object[]{methodName})
- );
- }
-
- if (field == DatatypeConstants.YEARS) {
- return years != null;
- }
+ DatatypeMessageFormatter.formatMessage(null, "FieldCannotBeNull", new Object[]{methodName})
+ );
+ }
+
+ if (field == DatatypeConstants.YEARS) {
+ return years != null;
+ }
- if (field == DatatypeConstants.MONTHS) {
- return months != null;
- }
+ if (field == DatatypeConstants.MONTHS) {
+ return months != null;
+ }
- if (field == DatatypeConstants.DAYS) {
- return days != null;
- }
+ if (field == DatatypeConstants.DAYS) {
+ return days != null;
+ }
- if (field == DatatypeConstants.HOURS) {
- return hours != null;
- }
+ if (field == DatatypeConstants.HOURS) {
+ return hours != null;
+ }
+
+ if (field == DatatypeConstants.MINUTES) {
+ return minutes != null;
+ }
- if (field == DatatypeConstants.MINUTES) {
- return minutes != null;
- }
-
- if (field == DatatypeConstants.SECONDS) {
- return seconds != null;
- }
+ if (field == DatatypeConstants.SECONDS) {
+ return seconds != null;
+ }
String methodName = "javax.xml.datatype.Duration" + "#isSet(DatatypeConstants.Field field)";
-
+
throw new IllegalArgumentException(
- DatatypeMessageFormatter.formatMessage(null,"UnknownField", new Object[]{methodName, field.toString()})
- );
-
+ DatatypeMessageFormatter.formatMessage(null,"UnknownField", new Object[]{methodName, field.toString()})
+ );
+
}
-
+
/**
- * Gets the value of a field.
- *
+ * Gets the value of a field.
+ *
* Fields of a duration object may contain arbitrary large value.
* Therefore this method is designed to return a {@link Number} object.
- *
+ *
* In case of YEARS, MONTHS, DAYS, HOURS, and MINUTES, the returned
* number will be a non-negative integer. In case of seconds,
* the returned number may be a non-negative decimal value.
- *
+ *
* @param field
* one of the six Field constants (YEARS,MONTHS,DAYS,HOURS,
* MINUTES, or SECONDS.)
@@ -1144,73 +1144,73 @@
* represents its value. If it is not present, return null.
* For YEARS, MONTHS, DAYS, HOURS, and MINUTES, this method
* returns a {@link BigInteger} object. For SECONDS, this
- * method returns a {@link BigDecimal}.
- *
+ * method returns a {@link BigDecimal}.
+ *
* @throws NullPointerException
* If the field parameter is null.
*/
public Number getField(DatatypeConstants.Field field) {
- if (field == null) {
+ if (field == null) {
String methodName = "javax.xml.datatype.Duration" + "#isSet(DatatypeConstants.Field field) " ;
-
- throw new NullPointerException(
+
+ throw new NullPointerException(
DatatypeMessageFormatter.formatMessage(null,"FieldCannotBeNull", new Object[]{methodName})
);
- }
-
- if (field == DatatypeConstants.YEARS) {
- return years;
- }
+ }
+
+ if (field == DatatypeConstants.YEARS) {
+ return years;
+ }
- if (field == DatatypeConstants.MONTHS) {
- return months;
- }
+ if (field == DatatypeConstants.MONTHS) {
+ return months;
+ }
- if (field == DatatypeConstants.DAYS) {
- return days;
- }
+ if (field == DatatypeConstants.DAYS) {
+ return days;
+ }
- if (field == DatatypeConstants.HOURS) {
- return hours;
- }
+ if (field == DatatypeConstants.HOURS) {
+ return hours;
+ }
+
+ if (field == DatatypeConstants.MINUTES) {
+ return minutes;
+ }
- if (field == DatatypeConstants.MINUTES) {
- return minutes;
- }
-
- if (field == DatatypeConstants.SECONDS) {
- return seconds;
- }
- /**
- throw new IllegalArgumentException(
- "javax.xml.datatype.Duration"
- + "#(getSet(DatatypeConstants.Field field) called with an unknown field: "
- + field.toString()
- );
+ if (field == DatatypeConstants.SECONDS) {
+ return seconds;
+ }
+ /**
+ throw new IllegalArgumentException(
+ "javax.xml.datatype.Duration"
+ + "#(getSet(DatatypeConstants.Field field) called with an unknown field: "
+ + field.toString()
+ );
*/
String methodName = "javax.xml.datatype.Duration" + "#(getSet(DatatypeConstants.Field field)";
-
+
throw new IllegalArgumentException(
- DatatypeMessageFormatter.formatMessage(null,"UnknownField", new Object[]{methodName, field.toString()})
- );
-
+ DatatypeMessageFormatter.formatMessage(null,"UnknownField", new Object[]{methodName, field.toString()})
+ );
+
}
-
+
/**
* Obtains the value of the YEARS field as an integer value,
* or 0 if not present.
- *
+ *
* - * This method is a convenience method around the + * This method is a convenience method around the * {@link #getField(DatatypeConstants.Field)} method. - * + * *
* Note that since this method returns int, this
* method will return an incorrect value for {@link Duration}s
* with the year field that goes beyond the range of int.
* Use getField(YEARS)
to avoid possible loss of precision.
Duration
.
*/
public int getMonths() {
return getInt(DatatypeConstants.MONTHS);
}
-
+
/**
* Obtains the value of the DAYS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the DAYS field.
- *
+ *
* @return Days of this Duration
.
*/
public int getDays() {
return getInt(DatatypeConstants.DAYS);
}
-
+
/**
* Obtains the value of the HOURS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the HOURS field.
- *
+ *
* @return Hours of this Duration
.
- *
+ *
*/
public int getHours() {
return getInt(DatatypeConstants.HOURS);
}
-
+
/**
* Obtains the value of the MINUTES field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the MINUTES field.
- *
+ *
* @return Minutes of this Duration
.
- *
+ *
*/
public int getMinutes() {
return getInt(DatatypeConstants.MINUTES);
}
-
+
/**
* Obtains the value of the SECONDS field as an integer value,
* or 0 if not present.
- *
+ *
* This method works just like {@link #getYears()} except
* that this method works on the SECONDS field.
- *
+ *
* @return seconds in the integer value. The fraction of seconds
* will be discarded (for example, if the actual value is 2.5,
* this method returns 2)
@@ -1288,14 +1288,14 @@
public int getSeconds() {
return getInt(DatatypeConstants.SECONDS);
}
-
+
/**
* Return the requested field value as an int.
- * + * *If field is not set, i.e. == null, 0 is returned.
- * + * * @param field To get value for. - * + * * @return int value of field or 0 if field is not set. */ private int getInt(DatatypeConstants.Field field) { @@ -1306,36 +1306,36 @@ return n.intValue(); } } - + /** *Returns the length of the duration in milli-seconds.
- * + * *If the seconds field carries more digits than milli-second order,
- * those will be simply discarded (or in other words, rounded to zero.)
+ * those will be simply discarded (or in other words, rounded to zero.)
* For example, for any Calendar value x
,
*- * + * *new Duration("PT10.00099S").getTimeInMills(x) == 10000
. *new Duration("-PT10.00099S").getTimeInMills(x) == -10000
. *
* Note that this method uses the {@link #addTo(Calendar)} method,
* which may work incorectly with {@link Duration} objects with
* very large values in its fields. See the {@link #addTo(Calendar)}
* method for details.
- *
+ *
* @param startInstant
* The length of a month/year varies. The startInstant
is
* used to disambiguate this variance. Specifically, this method
* returns the difference between startInstant
and
* startInstant+duration
- *
+ *
* @return milliseconds between startInstant
and
* startInstant
plus this Duration
*
- * @throws NullPointerException if startInstant
parameter
+ * @throws NullPointerException if startInstant
parameter
* is null.
- *
+ *
*/
public long getTimeInMillis(final Calendar startInstant) {
Calendar cal = (Calendar) startInstant.clone();
@@ -1343,33 +1343,33 @@
return getCalendarTimeInMillis(cal)
- getCalendarTimeInMillis(startInstant);
}
-
+
/**
*
Returns the length of the duration in milli-seconds.
- * + * *If the seconds field carries more digits than milli-second order,
* those will be simply discarded (or in other words, rounded to zero.)
- * For example, for any Date
value x
,
Date
value x,
*
* new Duration("PT10.00099S").getTimeInMills(x) == 10000
.
* new Duration("-PT10.00099S").getTimeInMills(x) == -10000
.
*
- *
+ *
*
* Note that this method uses the {@link #addTo(Date)} method,
* which may work incorectly with {@link Duration} objects with
* very large values in its fields. See the {@link #addTo(Date)}
* method for details.
- *
+ *
* @param startInstant
* The length of a month/year varies. The startInstant
is
* used to disambiguate this variance. Specifically, this method
* returns the difference between startInstant
and
* startInstant+duration
.
- *
+ *
* @throws NullPointerException
* If the startInstant parameter is null.
- *
+ *
* @return milliseconds between startInstant
and
* startInstant
plus this Duration
*
@@ -1381,15 +1381,15 @@
this.addTo(cal);
return getCalendarTimeInMillis(cal) - startInstant.getTime();
}
-
+
// /**
// * Returns an equivalent but "normalized" duration value.
-// *
+// *
// * Intuitively, the normalization moves YEARS into
// * MONTHS (by x12) and moves DAYS, HOURS, and MINUTES fields
// * into SECONDS (by x86400, x3600, and x60 respectively.)
-// *
-// *
+// *
+// *
// * Formally, this method satisfies the following conditions:
// *
// * - x.normalize().equals(x)
@@ -1398,58 +1398,58 @@
// *
- !x.normalize().isSet(Duration.HOURS)
// *
- !x.normalize().isSet(Duration.MINUTES)
// *
-// *
+// *
// * @return
-// * always return a non-null valid value.
+// * always return a non-null valid value.
// */
// public Duration normalize() {
// return null;
// }
-
+
/**
* Converts the years and months fields into the days field
* by using a specific time instant as the reference point.
- *
+ *
* For example, duration of one month normalizes to 31 days
* given the start time instance "July 8th 2003, 17:40:32".
- *
+ *
* Formally, the computation is done as follows:
*
* - The given Calendar object is cloned.
*
- The years, months and days fields will be added to
* the {@link Calendar} object
- * by using the {@link Calendar#add(int,int)} method.
+ * by using the {@link Calendar#add(int,int)} method.
*
- The difference between two Calendars are computed in terms of days.
*
- The computed days, along with the hours, minutes and seconds
* fields of this duration object is used to construct a new
* Duration object.
*
- *
+ *
* Note that since the Calendar class uses int
to
* hold the value of year and month, this method may produce
* an unexpected result if this duration object holds
* a very large value in the years or months fields.
*
* @param startTimeInstant Calendar
reference point.
- *
+ *
* @return Duration
of years and months of this Duration
as days.
- *
+ *
* @throws NullPointerException If the startTimeInstant parameter is null.
*/
public Duration normalizeWith(Calendar startTimeInstant) {
-
+
Calendar c = (Calendar) startTimeInstant.clone();
-
- // using int may cause overflow, but
+
+ // using int may cause overflow, but
// Calendar internally treats value as int anyways.
- c.add(Calendar.YEAR, getYears() * signum);
+ c.add(Calendar.YEAR, getYears() * signum);
c.add(Calendar.MONTH, getMonths() * signum);
c.add(Calendar.DAY_OF_MONTH, getDays() * signum);
-
+
// obtain the difference in terms of days
long diff = getCalendarTimeInMillis(c) - getCalendarTimeInMillis(startTimeInstant);
int days = (int) (diff / (1000L * 60L * 60L * 24L));
-
+
return new DurationImpl(
days >= 0,
null,
@@ -1459,31 +1459,31 @@
(BigInteger) getField(DatatypeConstants.MINUTES),
(BigDecimal) getField(DatatypeConstants.SECONDS));
}
-
+
/**
* Computes a new duration whose value is factor
times
* longer than the value of this duration.
- *
+ *
* This method is provided for the convenience.
* It is functionally equivalent to the following code:
*
* multiply(new BigDecimal(String.valueOf(factor)))
*
- *
+ *
* @param factor Factor times longer of new Duration
to create.
- *
+ *
* @return New Duration
that is factor
times longer than this Duration
.
- *
+ *
* @see #multiply(BigDecimal)
*/
public Duration multiply(int factor) {
return multiply(BigDecimal.valueOf(factor));
}
-
+
/**
* Computes a new duration whose value is factor
times
* longer than the value of this duration.
- *
+ *
*
* For example,
*
@@ -1491,12 +1491,12 @@
* "PT1M" (1 min) * "0.3" = "PT18S" (18 seconds)
* "P1M" (1 month) * "1.5" = IllegalStateException
*
- *
+ *
*
* Since the {@link Duration} class is immutable, this method
* doesn't change the value of this object. It simply computes
* a new Duration object and returns it.
- *
+ *
*
* The operation will be performed field by field with the precision
* of {@link BigDecimal}. Since all the fields except seconds are
@@ -1507,23 +1507,23 @@
* which will be carried down to "PT12H" (12 hours).
* When fractions of month cannot be meaningfully carried down
* to days, or year to months, this will cause an
- * {@link IllegalStateException} to be thrown.
+ * {@link IllegalStateException} to be thrown.
* For example if you multiple one month by 0.5.
- *
+ *
*
* To avoid {@link IllegalStateException}, use
* the {@link #normalizeWith(Calendar)} method to remove the years
* and months fields.
- *
+ *
* @param factor to multiply by
- *
+ *
* @return
* returns a non-null valid {@link Duration} object
*
- * @throws IllegalStateException if operation produces fraction in
+ * @throws IllegalStateException if operation produces fraction in
* the months field.
*
- * @throws NullPointerException if the factor
parameter is
+ * @throws NullPointerException if the factor
parameter is
* null
.
*
*/
@@ -1531,15 +1531,15 @@
BigDecimal carry = ZERO;
int factorSign = factor.signum();
factor = factor.abs();
-
+
BigDecimal[] buf = new BigDecimal[6];
-
+
for (int i = 0; i < 5; i++) {
BigDecimal bd = getFieldAsBigDecimal(FIELDS[i]);
bd = bd.multiply(factor).add(carry);
-
+
buf[i] = bd.setScale(0, BigDecimal.ROUND_DOWN);
-
+
bd = bd.subtract(buf[i]);
if (i == 1) {
if (bd.signum() != 0) {
@@ -1551,13 +1551,13 @@
carry = bd.multiply(FACTORS[i]);
}
}
-
+
if (seconds != null) {
buf[5] = seconds.multiply(factor).add(carry);
} else {
buf[5] = carry;
}
-
+
return new DurationImpl(
this.signum * factorSign >= 0,
toBigInteger(buf[0], null == years),
@@ -1567,14 +1567,14 @@
toBigInteger(buf[4], null == minutes),
(buf[5].signum() == 0 && seconds == null) ? null : buf[5]);
}
-
+
/**
*
Gets the value of the field as a {@link BigDecimal}.
- *
+ *
* If the field is unset, return 0.
- *
+ *
* @param f Field to get value for.
- *
+ *
* @return non-null valid {@link BigDecimal}.
*/
private BigDecimal getFieldAsBigDecimal(DatatypeConstants.Field f) {
@@ -1593,13 +1593,13 @@
}
}
}
-
+
/**
* BigInteger value of BigDecimal value.
- *
+ *
* @param value Value to convert.
* @param canBeNull Can returned value be null?
- *
+ *
* @return BigInteger value of BigDecimal, possibly null.
*/
private static BigInteger toBigInteger(
@@ -1611,7 +1611,7 @@
return value.unscaledValue();
}
}
-
+
/**
* 1 unit of FIELDS[i] is equivalent to FACTORS[i]
unit of
* FIELDS[i+1].
@@ -1622,11 +1622,11 @@
BigDecimal.valueOf(24),
BigDecimal.valueOf(60),
BigDecimal.valueOf(60)
- };
-
+ };
+
/**
* Computes a new duration whose value is this+rhs
.
- *
+ *
* For example,
*
* "1 day" + "-3 days" = "-2 days"
@@ -1635,11 +1635,11 @@
* "15 hours" + "-3 days" = "-(2 days,9 hours)"
* "1 year" + "-1 day" = IllegalStateException
*
- *
+ *
* Since there's no way to meaningfully subtract 1 day from 1 month,
* there are cases where the operation fails in
- * {@link IllegalStateException}.
- *
+ * {@link IllegalStateException}.
+ *
*
* Formally, the computation is defined as follows.
*
@@ -1647,54 +1647,54 @@
* are both positive without losing generality (i.e.,
* (-X)+Y=Y-X
, X+(-Y)=X-Y
,
* (-X)+(-Y)=-(X+Y)
)
- *
+ *
*
- * Addition of two positive {@link Duration}s are simply defined as
+ * Addition of two positive {@link Duration}s are simply defined as
* field by field addition where missing fields are treated as 0.
*
* A field of the resulting {@link Duration} will be unset if and
- * only if respective fields of two input {@link Duration}s are unset.
+ * only if respective fields of two input {@link Duration}s are unset.
*
* Note that lhs.add(rhs)
will be always successful if
* lhs.signum()*rhs.signum()!=-1
or both of them are
* normalized.
- *
+ *
* @param rhs Duration
to add to this Duration
- *
+ *
* @return
* non-null valid Duration object.
- *
+ *
* @throws NullPointerException
* If the rhs parameter is null.
* @throws IllegalStateException
* If two durations cannot be meaningfully added. For
* example, adding negative one day to one month causes
* this exception.
- *
- *
+ *
+ *
* @see #subtract(Duration)
*/
public Duration add(final Duration rhs) {
Duration lhs = this;
BigDecimal[] buf = new BigDecimal[6];
-
+
buf[0] = sanitize((BigInteger) lhs.getField(DatatypeConstants.YEARS),
- lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.YEARS), rhs.getSign()));
+ lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.YEARS), rhs.getSign()));
buf[1] = sanitize((BigInteger) lhs.getField(DatatypeConstants.MONTHS),
- lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.MONTHS), rhs.getSign()));
+ lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.MONTHS), rhs.getSign()));
buf[2] = sanitize((BigInteger) lhs.getField(DatatypeConstants.DAYS),
- lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.DAYS), rhs.getSign()));
+ lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.DAYS), rhs.getSign()));
buf[3] = sanitize((BigInteger) lhs.getField(DatatypeConstants.HOURS),
- lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.HOURS), rhs.getSign()));
+ lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.HOURS), rhs.getSign()));
buf[4] = sanitize((BigInteger) lhs.getField(DatatypeConstants.MINUTES),
- lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.MINUTES), rhs.getSign()));
+ lhs.getSign()).add(sanitize((BigInteger) rhs.getField(DatatypeConstants.MINUTES), rhs.getSign()));
buf[5] = sanitize((BigDecimal) lhs.getField(DatatypeConstants.SECONDS),
- lhs.getSign()).add(sanitize((BigDecimal) rhs.getField(DatatypeConstants.SECONDS), rhs.getSign()));
-
+ lhs.getSign()).add(sanitize((BigDecimal) rhs.getField(DatatypeConstants.SECONDS), rhs.getSign()));
+
// align sign
alignSigns(buf, 0, 2); // Y,M
alignSigns(buf, 2, 6); // D,h,m,s
-
+
// make sure that the sign bit is consistent across all 6 fields.
int s = 0;
for (int i = 0; i < 6; i++) {
@@ -1705,28 +1705,28 @@
s = buf[i].signum();
}
}
-
+
return new DurationImpl(
s >= 0,
toBigInteger(sanitize(buf[0], s),
- lhs.getField(DatatypeConstants.YEARS) == null && rhs.getField(DatatypeConstants.YEARS) == null),
+ lhs.getField(DatatypeConstants.YEARS) == null && rhs.getField(DatatypeConstants.YEARS) == null),
toBigInteger(sanitize(buf[1], s),
- lhs.getField(DatatypeConstants.MONTHS) == null && rhs.getField(DatatypeConstants.MONTHS) == null),
+ lhs.getField(DatatypeConstants.MONTHS) == null && rhs.getField(DatatypeConstants.MONTHS) == null),
toBigInteger(sanitize(buf[2], s),
- lhs.getField(DatatypeConstants.DAYS) == null && rhs.getField(DatatypeConstants.DAYS) == null),
+ lhs.getField(DatatypeConstants.DAYS) == null && rhs.getField(DatatypeConstants.DAYS) == null),
toBigInteger(sanitize(buf[3], s),
- lhs.getField(DatatypeConstants.HOURS) == null && rhs.getField(DatatypeConstants.HOURS) == null),
+ lhs.getField(DatatypeConstants.HOURS) == null && rhs.getField(DatatypeConstants.HOURS) == null),
toBigInteger(sanitize(buf[4], s),
- lhs.getField(DatatypeConstants.MINUTES) == null && rhs.getField(DatatypeConstants.MINUTES) == null),
+ lhs.getField(DatatypeConstants.MINUTES) == null && rhs.getField(DatatypeConstants.MINUTES) == null),
(buf[5].signum() == 0
&& lhs.getField(DatatypeConstants.SECONDS) == null
&& rhs.getField(DatatypeConstants.SECONDS) == null) ? null : sanitize(buf[5], s));
}
-
+
private static void alignSigns(BigDecimal[] buf, int start, int end) {
// align sign
boolean touched;
-
+
do { // repeat until all the sign bits become consistent
touched = false;
int s = 0; // sign of the left fields
@@ -1755,7 +1755,7 @@
}
} while (touched);
}
-
+
/**
* Compute value*signum
where value==null is treated as
* value==0.
@@ -1773,13 +1773,13 @@
}
return new BigDecimal(value.negate());
}
-
+
/**
* Compute value*signum
where value==null
is treated as value==0
.
- *
+ *
* @param value Value to sanitize.
* @param signum 0 to sanitize to 0, > 0 to sanitize to value
, < 0 to sanitize to negative value
.
- *
+ *
* @return non-null {@link BigDecimal}.
*/
static BigDecimal sanitize(BigDecimal value, int signum) {
@@ -1791,10 +1791,10 @@
}
return value.negate();
}
-
+
/**
* Computes a new duration whose value is this-rhs
.
- *
+ *
* For example:
*
* "1 day" - "-3 days" = "4 days"
@@ -1803,57 +1803,57 @@
* "15 hours" - "-3 days" = "3 days and 15 hours"
* "1 year" - "-1 day" = "1 year and 1 day"
*
- *
+ *
* Since there's no way to meaningfully subtract 1 day from 1 month,
- * there are cases where the operation fails in {@link IllegalStateException}.
- *
+ * there are cases where the operation fails in {@link IllegalStateException}.
+ *
* Formally the computation is defined as follows.
* First, we can assume that two {@link Duration}s are both positive
* without losing generality. (i.e.,
* (-X)-Y=-(X+Y)
, X-(-Y)=X+Y
,
* (-X)-(-Y)=-(X-Y)
)
- *
+ *
* Then two durations are subtracted field by field.
* If the sign of any non-zero field F is different from
* the sign of the most significant field,
* 1 (if F is negative) or -1 (otherwise)
* will be borrowed from the next bigger unit of F.
- *
+ *
* This process is repeated until all the non-zero fields have
- * the same sign.
- *
+ * the same sign.
+ *
* If a borrow occurs in the days field (in other words, if
* the computation needs to borrow 1 or -1 month to compensate
* days), then the computation fails by throwing an
* {@link IllegalStateException}.
- *
+ *
* @param rhs Duration
to substract from this Duration
.
- *
+ *
* @return New Duration
created from subtracting rhs
from this Duration
.
- *
+ *
* @throws IllegalStateException
* If two durations cannot be meaningfully subtracted. For
* example, subtracting one day from one month causes
* this exception.
- *
+ *
* @throws NullPointerException
* If the rhs parameter is null.
- *
+ *
* @see #add(Duration)
*/
public Duration subtract(final Duration rhs) {
return add(rhs.negate());
}
-
+
/**
* Returns a new {@link Duration} object whose
* value is -this
.
- *
+ *
*
* Since the {@link Duration} class is immutable, this method
* doesn't change the value of this object. It simply computes
* a new Duration object and returns it.
- *
+ *
* @return
* always return a non-null valid {@link Duration} object.
*/
@@ -1867,10 +1867,10 @@
minutes,
seconds);
}
-
+
/**
* Returns the sign of this duration in -1,0, or 1.
- *
+ *
* @return
* -1 if this duration is negative, 0 if the duration is zero,
* and 1 if the duration is postive.
@@ -1878,33 +1878,33 @@
public int signum() {
return signum;
}
-
-
+
+
/**
* Adds this duration to a {@link Calendar} object.
- *
+ *
*
* Calls {@link java.util.Calendar#add(int,int)} in the
* order of YEARS, MONTHS, DAYS, HOURS, MINUTES, SECONDS, and MILLISECONDS
* if those fields are present. Because the {@link Calendar} class
* uses int to hold values, there are cases where this method
* won't work correctly (for example if values of fields
- * exceed the range of int.)
+ * exceed the range of int.)
*
- *
+ *
*
* Also, since this duration class is a Gregorian duration, this
* method will not work correctly if the given {@link Calendar}
- * object is based on some other calendar systems.
+ * object is based on some other calendar systems.
*
- *
+ *
*
* Any fractional parts of this {@link Duration} object
* beyond milliseconds will be simply ignored. For example, if
* this duration is "P1.23456S", then 1 is added to SECONDS,
- * 234 is added to MILLISECONDS, and the rest will be unused.
+ * 234 is added to MILLISECONDS, and the rest will be unused.
*
- *
+ *
*
* Note that because {@link Calendar#add(int, int)} is using
* int, {@link Duration} with values beyond the
@@ -1913,7 +1913,7 @@
* {@link XMLGregorianCalendar#add(Duration)} provides the same
* basic operation as this method while avoiding
* the overflow/underflow issues.
- *
+ *
* @param calendar
* A calendar object whose value will be modified.
* @throws NullPointerException
@@ -1934,23 +1934,23 @@
calendar.add(Calendar.MILLISECOND, millisec * signum);
}
}
-
+
/**
* Adds this duration to a {@link Date} object.
- *
+ *
*
* The given date is first converted into
* a {@link java.util.GregorianCalendar}, then the duration
* is added exactly like the {@link #addTo(Calendar)} method.
- *
+ *
*
* The updated time instant is then converted back into a
* {@link Date} object and used to update the given {@link Date} object.
- *
+ *
*
* This somewhat redundant computation is necessary to unambiguously
* determine the duration of months and years.
- *
+ *
* @param date
* A date object whose value will be modified.
* @throws NullPointerException
@@ -1962,19 +1962,19 @@
this.addTo(cal);
date.setTime(getCalendarTimeInMillis(cal));
}
-
+
/**
*
Stream Unique Identifier.
- *
+ *
* TODO: Serialization should use the XML string representation as
* the serialization format to ensure future compatibility.
*/
- private static final long serialVersionUID = 1L;
-
+ private static final long serialVersionUID = 1L;
+
/**
* Writes {@link Duration} as a lexical representation
* for maximum future compatibility.
- *
+ *
* @return
* An object that encapsulates the string
* returned by this.toString()
.
@@ -1982,10 +1982,10 @@
private Object writeReplace() throws IOException {
return new DurationStream(this.toString());
}
-
+
/**
* Representation of {@link Duration} in the object stream.
- *
+ *
* @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
*/
private static class DurationStream implements Serializable {
@@ -1994,7 +1994,7 @@
private DurationStream(String _lexical) {
this.lexical = _lexical;
}
-
+
private Object readResolve() throws ObjectStreamException {
// try {
return new DurationImpl(lexical);
@@ -2002,15 +2002,15 @@
// throw new StreamCorruptedException("unable to parse "+lexical+" as duration");
// }
}
-
- private static final long serialVersionUID = 1L;
+
+ private static final long serialVersionUID = 1L;
}
-
+
/**
* Calls the {@link Calendar#getTimeInMillis} method.
* Prior to JDK1.4, this method was protected and therefore
* cannot be invoked directly.
- *
+ *
* In future, this should be replaced by
* cal.getTimeInMillis()
*/
@@ -2018,4 +2018,3 @@
return cal.getTime().getTime();
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationYearMonthImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationYearMonthImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/DurationYearMonthImpl.java Wed May 02 13:32:36 2012 +0100
@@ -1,201 +1,200 @@
-/*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.org.apache.xerces.internal.jaxp.datatype;
-
-import java.math.BigInteger;
-import javax.xml.datatype.DatatypeConstants;
-
-
-/**
- * Represent a subtype xdt:yearMonthDuration
of a Duration
- * as specified in
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
- *
- *
- * The DurationYearMonth object represents a period of Gregorian time,
- * with a lexical representation, "PnYnM" that contains only year and month components.
- *
- *
- *
- * @author Vikram Aroskar
- * @author Joe Wang
- * @version $Revision: 1.1 $, $Date: 2010/05/19 05:02:55 $
-
- * @see XMLGregorianCalendar#add(Duration)
- */
-
-class DurationYearMonthImpl
- extends DurationImpl {
-
-
- /**
- * Constructs a new Duration object by specifying each field individually.
- *
- * All the parameters are optional as long as at least one field is present.
- * If specified, parameters have to be zero or positive.
- *
- * @param isPositive Set to false
to create a negative duration. When the length
- * of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- *
- * @throws IllegalArgumentException
- * If years, months parameters are all null
. Or if any
- * of those parameters are negative.
- */
- public DurationYearMonthImpl(
- boolean isPositive,
- BigInteger years,
- BigInteger months) {
-
- super(isPositive, years, months, null, null, null, null);
- convertToCanonicalYearMonth();
- }
- /**
- * Construct a Duration
of type xdt:yearMonthDuration
using the specified
- * year
and month
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
- *
- * A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- *
- * @param isPositive Set to false
to create a negative duration. When the length
- * of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration
.
- * @param month Month of Duration
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields (year, month) is negative.
- */
- protected DurationYearMonthImpl(
- final boolean isPositive,
- final int years,
- final int months) {
-
- this(isPositive,
- wrap(years),
- wrap(months));
-
-
- }
-
-
- /**
- * Construct a Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
- *
- * The datatype xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
- *
- * Both values are set by computing their values from the specified milliseconds
- * and are availabe using the get
methods of the created {@link Duration}.
- * The values conform to and are defined by:
- *
- * - ISO 8601:2000(E) Section 5.5.3.2 Alternative format
- * -
- * W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats
- *
- * - {@link XMLGregorianCalendar} Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
- *
- *
- * The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
- * {@link java.util.Calendar#YEAR} = 1970,
- * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
- * {@link java.util.Calendar#DATE} = 1, etc.
- * This is important as there are variations in the Gregorian Calendar,
- * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
- * so the result of {@link Duration#getMonths()} can be influenced.
- *
- * Any remaining milliseconds after determining the year and month are discarded.
- *
- * @param durationInMilliseconds Milliseconds of Duration
to create.
- */
- protected DurationYearMonthImpl(long durationInMilliseconds) {
-
- super(durationInMilliseconds);
- convertToCanonicalYearMonth();
- //Any remaining milliseconds after determining the year and month are discarded.
- days = null;
- hours = null;
- minutes = null;
- seconds = null;
- signum = calcSignum((signum<0)?false:true);
- }
-
-
- /**
- * Construct a Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
- * "PnYnM",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
- *
- * The datatype xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
- *
- * Both values are set and availabe from the created {@link Duration}
- *
- * The XML Schema specification states that values can be of an arbitrary size.
- * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
- * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
- * if implementation capacities are exceeded.
- *
- * @param lexicalRepresentation Lexical representation of a duration.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
- protected DurationYearMonthImpl(String lexicalRepresentation) {
- super(lexicalRepresentation);
- if (getDays() > 0 || getHours() > 0
- || getMinutes() > 0 || getSeconds() > 0) {
- throw new IllegalArgumentException(
- "Trying to create an xdt:yearMonthDuration with an invalid"
- + " lexical representation of \"" + lexicalRepresentation
- + "\", data model requires PnYnM.");
- }
- convertToCanonicalYearMonth();
- }
-
- /**
- * The value space of xs:yearMonthDuration is the set of xs:integer month values.
- * @return the value of yearMonthDuration
- */
- public int getValue() {
- return getYears() * 12 + getMonths();
- }
-
- private void convertToCanonicalYearMonth() {
- while (getMonths() >= 12)
- {
- months = months.subtract(BigInteger.valueOf(12));
- years = BigInteger.valueOf((long) getYears()).add(BigInteger.ONE);
- }
- }
-}
-
+/*
+ * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.org.apache.xerces.internal.jaxp.datatype;
+
+import java.math.BigInteger;
+import javax.xml.datatype.DatatypeConstants;
+
+
+/**
+ * Represent a subtype xdt:yearMonthDuration
of a Duration
+ * as specified in
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
+ *
+ *
+ * The DurationYearMonth object represents a period of Gregorian time,
+ * with a lexical representation, "PnYnM" that contains only year and month components.
+ *
+ *
+ *
+ * @author Vikram Aroskar
+ * @author Joe Wang
+ * @version $Revision: 1.1 $, $Date: 2010/05/19 05:02:55 $
+
+ * @see XMLGregorianCalendar#add(Duration)
+ */
+
+class DurationYearMonthImpl
+ extends DurationImpl {
+
+
+ /**
+ * Constructs a new Duration object by specifying each field individually.
+ *
+ * All the parameters are optional as long as at least one field is present.
+ * If specified, parameters have to be zero or positive.
+ *
+ * @param isPositive Set to false
to create a negative duration. When the length
+ * of the duration is zero, this parameter will be ignored.
+ * @param years of this Duration
+ * @param months of this Duration
+ *
+ * @throws IllegalArgumentException
+ * If years, months parameters are all null
. Or if any
+ * of those parameters are negative.
+ */
+ public DurationYearMonthImpl(
+ boolean isPositive,
+ BigInteger years,
+ BigInteger months) {
+
+ super(isPositive, years, months, null, null, null, null);
+ convertToCanonicalYearMonth();
+ }
+ /**
+ * Construct a Duration
of type xdt:yearMonthDuration
using the specified
+ * year
and month
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
+ *
+ * A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
+ *
+ * @param isPositive Set to false
to create a negative duration. When the length
+ * of the duration is zero, this parameter will be ignored.
+ * @param year Year of Duration
.
+ * @param month Month of Duration
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields (year, month) is negative.
+ */
+ protected DurationYearMonthImpl(
+ final boolean isPositive,
+ final int years,
+ final int months) {
+
+ this(isPositive,
+ wrap(years),
+ wrap(months));
+
+
+ }
+
+
+ /**
+ * Construct a Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
+ *
+ * The datatype xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ *
+ * Both values are set by computing their values from the specified milliseconds
+ * and are availabe using the get
methods of the created {@link Duration}.
+ * The values conform to and are defined by:
+ *
+ * - ISO 8601:2000(E) Section 5.5.3.2 Alternative format
+ * -
+ * W3C XML Schema 1.0 Part 2, Appendix D, ISO 8601 Date and Time Formats
+ *
+ * - {@link XMLGregorianCalendar} Date/Time Datatype Field Mapping Between XML Schema 1.0 and Java Representation
+ *
+ *
+ * The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e.,
+ * {@link java.util.Calendar#YEAR} = 1970,
+ * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY},
+ * {@link java.util.Calendar#DATE} = 1, etc.
+ * This is important as there are variations in the Gregorian Calendar,
+ * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY}
+ * so the result of {@link Duration#getMonths()} can be influenced.
+ *
+ * Any remaining milliseconds after determining the year and month are discarded.
+ *
+ * @param durationInMilliseconds Milliseconds of Duration
to create.
+ */
+ protected DurationYearMonthImpl(long durationInMilliseconds) {
+
+ super(durationInMilliseconds);
+ convertToCanonicalYearMonth();
+ //Any remaining milliseconds after determining the year and month are discarded.
+ days = null;
+ hours = null;
+ minutes = null;
+ seconds = null;
+ signum = calcSignum((signum<0)?false:true);
+ }
+
+
+ /**
+ * Construct a Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
+ * "PnYnM",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
+ *
+ * The datatype xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
+ *
+ * Both values are set and availabe from the created {@link Duration}
+ *
+ * The XML Schema specification states that values can be of an arbitrary size.
+ * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values.
+ * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits
+ * if implementation capacities are exceeded.
+ *
+ * @param lexicalRepresentation Lexical representation of a duration.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ protected DurationYearMonthImpl(String lexicalRepresentation) {
+ super(lexicalRepresentation);
+ if (getDays() > 0 || getHours() > 0
+ || getMinutes() > 0 || getSeconds() > 0) {
+ throw new IllegalArgumentException(
+ "Trying to create an xdt:yearMonthDuration with an invalid"
+ + " lexical representation of \"" + lexicalRepresentation
+ + "\", data model requires PnYnM.");
+ }
+ convertToCanonicalYearMonth();
+ }
+
+ /**
+ * The value space of xs:yearMonthDuration is the set of xs:integer month values.
+ * @return the value of yearMonthDuration
+ */
+ public int getValue() {
+ return getYears() * 12 + getMonths();
+ }
+
+ private void convertToCanonicalYearMonth() {
+ while (getMonths() >= 12)
+ {
+ months = months.subtract(BigInteger.valueOf(12));
+ years = BigInteger.valueOf((long) getYears()).add(BigInteger.ONE);
+ }
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/datatype/XMLGregorianCalendarImpl.java Wed May 02 13:32:36 2012 +0100
@@ -39,7 +39,7 @@
import javax.xml.datatype.XMLGregorianCalendar;
import javax.xml.namespace.QName;
import com.sun.org.apache.xerces.internal.util.DatatypeMessageFormatter;
-
+import com.sun.org.apache.xerces.internal.utils.SecuritySupport;
/**
* Representation for W3C XML Schema 1.0 date/time datatypes.
@@ -192,8 +192,8 @@
*/
public class XMLGregorianCalendarImpl
- extends XMLGregorianCalendar
- implements Serializable, Cloneable {
+ extends XMLGregorianCalendar
+ implements Serializable, Cloneable {
/**
*
Eon of this XMLGregorianCalendar
.
@@ -250,7 +250,7 @@
* GregorianCalendar.setChange(PURE_GREGORIAN_CHANGE).
*/
private static final Date PURE_GREGORIAN_CHANGE =
- new Date(Long.MIN_VALUE);
+ new Date(Long.MIN_VALUE);
/**
* Year index for MIN_ and MAX_FIELD_VALUES.
@@ -297,14 +297,14 @@
* field names indexed by YEAR..TIMEZONE.
*/
private static final String FIELD_NAME[] = {
- "Year",
- "Month",
- "Day",
- "Hour",
- "Minute",
- "Second",
- "Millisecond",
- "Timezone"
+ "Year",
+ "Month",
+ "Day",
+ "Hour",
+ "Minute",
+ "Second",
+ "Millisecond",
+ "Timezone"
};
/**
@@ -328,16 +328,16 @@
* @see #toGregorianCalendar(TimeZone, Locale, XMLGregorianCalendar)
*/
public static final XMLGregorianCalendar LEAP_YEAR_DEFAULT =
- createDateTime(
- 400, //year
- DatatypeConstants.JANUARY, //month
- 1, // day
- 0, // hour
- 0, // minute
- 0, // second
- DatatypeConstants.FIELD_UNDEFINED, // milliseconds
- DatatypeConstants.FIELD_UNDEFINED // timezone
- );
+ createDateTime(
+ 400, //year
+ DatatypeConstants.JANUARY, //month
+ 1, // day
+ 0, // hour
+ 0, // minute
+ 0, // second
+ DatatypeConstants.FIELD_UNDEFINED, // milliseconds
+ DatatypeConstants.FIELD_UNDEFINED // timezone
+ );
// Constructors
@@ -386,7 +386,7 @@
} else if (lexRepLength == 4 // --MM
|| lexRepLength == 5 // --MMZ
|| lexRepLength == 10) { // --MMSHH:MM
- // gMonth, --MM(z?),
+ // gMonth, --MM(z?),
// per XML Schema Errata, used to be --MM--(z?)
format = "--%M" + "%z";
} else {
@@ -479,14 +479,14 @@
BigDecimal fractionalSecond,
int timezone) {
- setYear(year);
+ setYear(year);
setMonth(month);
setDay(day);
setTime(hour, minute, second, fractionalSecond);
- setTimezone(timezone);
+ setTimezone(timezone);
- // check for validity
- if (!isValid()) {
+ // check for validity
+ if (!isValid()) {
throw new IllegalArgumentException(
DatatypeMessageFormatter.formatMessage(null,
@@ -494,9 +494,9 @@
new Object[] { year, new Integer(month), new Integer(day),
new Integer(hour), new Integer(minute), new Integer(second),
fractionalSecond, new Integer(timezone)})
- );
+ );
- /**
+ /**
String yearString = "null";
if (year != null) {
yearString = year.toString();
@@ -519,7 +519,7 @@
);
*/
- }
+ }
}
@@ -547,17 +547,17 @@
int hour,
int minute,
int second,
- int millisecond,
+ int millisecond,
int timezone) {
- setYear(year);
+ setYear(year);
setMonth(month);
setDay(day);
setTime(hour, minute, second);
- setTimezone(timezone);
- setMillisecond(millisecond);
+ setTimezone(timezone);
+ setMillisecond(millisecond);
- if (!isValid()) {
+ if (!isValid()) {
throw new IllegalArgumentException(
DatatypeMessageFormatter.formatMessage(null,
@@ -565,7 +565,7 @@
new Object[] { new Integer(year), new Integer(month), new Integer(day),
new Integer(hour), new Integer(minute), new Integer(second),
new Integer(millisecond), new Integer(timezone)})
- );
+ );
/*
throw new IllegalArgumentException(
"year = " + year
@@ -580,66 +580,66 @@
);
*/
- }
+ }
}
- /**
- * Convert a java.util.GregorianCalendar
to XML Schema 1.0
- * representation.
- *
- *
- *
- *
- *
- * Field by Field Conversion from
- * java.util.GregorianCalendar
to this class
- *
- *
- *
- *
- *
- * javax.xml.datatype.XMLGregorianCalendar
field
- * java.util.GregorianCalendar
field
- *
- *
- * {@link #setYear(int)}
- * ERA == GregorianCalendar.BC ? -YEAR : YEAR
- *
- *
- * {@link #setMonth(int)}
- * MONTH + 1
- *
- *
- * {@link #setDay(int)}
- * DAY_OF_MONTH
- *
- *
- * {@link #setTime(int,int,int, BigDecimal)}
- * HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
- *
- *
- * {@link #setTimezone(int)}*
- * (ZONE_OFFSET + DST_OFFSET) / (60*1000)
- * (in minutes)
- *
- *
- *
- *
- * *conversion loss of information. It is not possible to represent
- * a java.util.GregorianCalendar
daylight savings timezone id in the
- * XML Schema 1.0 date/time datatype representation.
- *
- * To compute the return value's TimeZone
field,
- *
- * - when
this.getTimezone() != DatatypeConstants.FIELD_UNDEFINED
,
- * create a java.util.TimeZone
with a custom timezone id
- * using the this.getTimezone()
.
- * - else use the
GregorianCalendar
default timezone value
- * for the host is defined as specified by
- * java.util.TimeZone.getDefault()
.
- *
- * @param cal java.util.GregorianCalendar
used to create XMLGregorianCalendar
- */
+ /**
+ * Convert a java.util.GregorianCalendar
to XML Schema 1.0
+ * representation.
+ *
+ *
+ *
+ *
+ *
+ * Field by Field Conversion from
+ * java.util.GregorianCalendar
to this class
+ *
+ *
+ *
+ *
+ *
+ * javax.xml.datatype.XMLGregorianCalendar
field
+ * java.util.GregorianCalendar
field
+ *
+ *
+ * {@link #setYear(int)}
+ * ERA == GregorianCalendar.BC ? -YEAR : YEAR
+ *
+ *
+ * {@link #setMonth(int)}
+ * MONTH + 1
+ *
+ *
+ * {@link #setDay(int)}
+ * DAY_OF_MONTH
+ *
+ *
+ * {@link #setTime(int,int,int, BigDecimal)}
+ * HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND
+ *
+ *
+ * {@link #setTimezone(int)}*
+ * (ZONE_OFFSET + DST_OFFSET) / (60*1000)
+ * (in minutes)
+ *
+ *
+ *
+ *
+ * *conversion loss of information. It is not possible to represent
+ * a java.util.GregorianCalendar
daylight savings timezone id in the
+ * XML Schema 1.0 date/time datatype representation.
+ *
+ * To compute the return value's TimeZone
field,
+ *
+ * - when
this.getTimezone() != DatatypeConstants.FIELD_UNDEFINED
,
+ * create a java.util.TimeZone
with a custom timezone id
+ * using the this.getTimezone()
.
+ * - else use the
GregorianCalendar
default timezone value
+ * for the host is defined as specified by
+ * java.util.TimeZone.getDefault()
.
+ *
+ * @param cal java.util.GregorianCalendar
used to create XMLGregorianCalendar
+ */
public XMLGregorianCalendarImpl(GregorianCalendar cal) {
int year = cal.get(Calendar.YEAR);
@@ -740,7 +740,7 @@
minute,
second,
DatatypeConstants.FIELD_UNDEFINED, //millisecond
- DatatypeConstants.FIELD_UNDEFINED //timezone
+ DatatypeConstants.FIELD_UNDEFINED //timezone
);
}
@@ -818,7 +818,7 @@
DatatypeConstants.FIELD_UNDEFINED, // hour
DatatypeConstants.FIELD_UNDEFINED, // minute
DatatypeConstants.FIELD_UNDEFINED, // second
- DatatypeConstants.FIELD_UNDEFINED, // millisecond
+ DatatypeConstants.FIELD_UNDEFINED, // millisecond
timezone);
}
@@ -838,20 +838,20 @@
* date/time field mapping table.
*/
public static XMLGregorianCalendar createTime(
- int hours,
- int minutes,
- int seconds,
- int timezone) {
+ int hours,
+ int minutes,
+ int seconds,
+ int timezone) {
- return new XMLGregorianCalendarImpl(
- DatatypeConstants.FIELD_UNDEFINED, // Year
- DatatypeConstants.FIELD_UNDEFINED, // Month
- DatatypeConstants.FIELD_UNDEFINED, // Day
- hours,
- minutes,
- seconds,
- DatatypeConstants.FIELD_UNDEFINED, //Millisecond
- timezone);
+ return new XMLGregorianCalendarImpl(
+ DatatypeConstants.FIELD_UNDEFINED, // Year
+ DatatypeConstants.FIELD_UNDEFINED, // Month
+ DatatypeConstants.FIELD_UNDEFINED, // Day
+ hours,
+ minutes,
+ seconds,
+ DatatypeConstants.FIELD_UNDEFINED, //Millisecond
+ timezone);
}
/**
@@ -940,7 +940,7 @@
* @see #getEonAndYear()
*/
public BigInteger getEon() {
- return eon;
+ return eon;
}
/**
@@ -956,7 +956,7 @@
* @see #getEonAndYear()
*/
public int getYear() {
- return year;
+ return year;
}
/**
@@ -976,23 +976,23 @@
*/
public BigInteger getEonAndYear() {
- // both are defined
- if (year != DatatypeConstants.FIELD_UNDEFINED
- && eon != null) {
+ // both are defined
+ if (year != DatatypeConstants.FIELD_UNDEFINED
+ && eon != null) {
- return eon.add(BigInteger.valueOf((long) year));
- }
+ return eon.add(BigInteger.valueOf((long) year));
+ }
- // only year is defined
- if (year != DatatypeConstants.FIELD_UNDEFINED
- && eon == null) {
+ // only year is defined
+ if (year != DatatypeConstants.FIELD_UNDEFINED
+ && eon == null) {
- return BigInteger.valueOf((long) year);
- }
+ return BigInteger.valueOf((long) year);
+ }
- // neither are defined
- // or only eon is defined which is not valid without a year
- return null;
+ // neither are defined
+ // or only eon is defined which is not valid without a year
+ return null;
}
/**
@@ -1005,7 +1005,7 @@
*
*/
public int getMonth() {
- return month;
+ return month;
}
/**
@@ -1076,7 +1076,7 @@
* @see #setTime(int, int, int)
*/
public int getSecond() {
- return second;
+ return second;
}
/**
@@ -1143,7 +1143,7 @@
* @see #setTime(int, int, int, BigDecimal)
*/
public BigDecimal getFractionalSecond() {
- return fractionalSecond;
+ return fractionalSecond;
}
// setters
@@ -1264,7 +1264,7 @@
* date/time field mapping table.
*/
public void setTimezone(int offset) {
- if(offset<-14*60 || 14*60Normalize this instance to UTC.
- *
- * 2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z
- * Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
- */
+ /**
+ * Normalize this instance to UTC.
+ *
+ * 2000-03-04T23:00:00+03:00 normalizes to 2000-03-04T20:00:00Z
+ * Implements W3C XML Schema Part 2, Section 3.2.7.3 (A).
+ */
private XMLGregorianCalendar normalizeToTimezone(int timezone) {
int minutes = timezone;
@@ -1684,11 +1684,11 @@
* @return true
when compare(this,(XMLGregorianCalendar)obj) == EQUAL.
.
*/
public boolean equals(Object obj) {
-
- if (obj == null || !(obj instanceof XMLGregorianCalendar)) {
- return false;
- }
- return compare((XMLGregorianCalendar) obj) == DatatypeConstants.EQUAL;
+
+ if (obj == null || !(obj instanceof XMLGregorianCalendar)) {
+ return false;
+ }
+ return compare((XMLGregorianCalendar) obj) == DatatypeConstants.EQUAL;
}
/**
@@ -1748,7 +1748,7 @@
*/
public static XMLGregorianCalendar parse(String lexicalRepresentation) {
- return new XMLGregorianCalendarImpl(lexicalRepresentation);
+ return new XMLGregorianCalendarImpl(lexicalRepresentation);
}
/**
@@ -1915,21 +1915,21 @@
switch(mask) {
case 0x3F:
- return DatatypeConstants.DATETIME;
+ return DatatypeConstants.DATETIME;
case 0x38:
- return DatatypeConstants.DATE;
+ return DatatypeConstants.DATE;
case 0x07:
- return DatatypeConstants.TIME;
+ return DatatypeConstants.TIME;
case 0x30:
- return DatatypeConstants.GYEARMONTH;
+ return DatatypeConstants.GYEARMONTH;
case 0x18:
- return DatatypeConstants.GMONTHDAY;
+ return DatatypeConstants.GMONTHDAY;
case 0x20:
- return DatatypeConstants.GYEAR;
+ return DatatypeConstants.GYEAR;
case 0x10:
- return DatatypeConstants.GMONTH;
+ return DatatypeConstants.GMONTH;
case 0x08:
- return DatatypeConstants.GDAY;
+ return DatatypeConstants.GDAY;
default:
throw new IllegalStateException(
this.getClass().getName()
@@ -1945,12 +1945,12 @@
* @return true if data values are valid.
*/
public boolean isValid() {
- // since setters do not allow for invalid values,
- // (except for exceptional case of year field of zero),
- // no need to check for anything except for constraints
- // between fields.
+ // since setters do not allow for invalid values,
+ // (except for exceptional case of year field of zero),
+ // no need to check for anything except for constraints
+ // between fields.
- //check if days in month is valid. Can be dependent on leap year.
+ //check if days in month is valid. Can be dependent on leap year.
if (getMonth() == DatatypeConstants.FEBRUARY) {
// years could not be set
int maxDays = 29;
@@ -1969,34 +1969,34 @@
}
}
- // http://www.w3.org/2001/05/xmlschema-errata#e2-45
- if (getHour() == 24) {
- if(getMinute() != 0) {
- return false;
- } else if (getSecond() != 0) {
- return false;
- }
- }
+ // http://www.w3.org/2001/05/xmlschema-errata#e2-45
+ if (getHour() == 24) {
+ if(getMinute() != 0) {
+ return false;
+ } else if (getSecond() != 0) {
+ return false;
+ }
+ }
- // XML Schema 1.0 specification defines year value of zero as
- // invalid. Allow this class to set year field to zero
- // since XML Schema 1.0 errata states that lexical zero will
- // be allowed in next version and treated as 1 B.C.E.
- if (eon == null) {
- // optimize check.
- if (year == 0) {
- return false;
- }
- } else {
- BigInteger yearField = getEonAndYear();
- if (yearField != null) {
- int result = compareField(yearField, BigInteger.ZERO);
- if (result == DatatypeConstants.EQUAL) {
- return false;
- }
- }
- }
- return true;
+ // XML Schema 1.0 specification defines year value of zero as
+ // invalid. Allow this class to set year field to zero
+ // since XML Schema 1.0 errata states that lexical zero will
+ // be allowed in next version and treated as 1 B.C.E.
+ if (eon == null) {
+ // optimize check.
+ if (year == 0) {
+ return false;
+ }
+ } else {
+ BigInteger yearField = getEonAndYear();
+ if (yearField != null) {
+ int result = compareField(yearField, BigInteger.ZERO);
+ if (result == DatatypeConstants.EQUAL) {
+ return false;
+ }
+ }
+ }
+ return true;
}
/**
@@ -2265,7 +2265,7 @@
private static int daysInMonth[] = { 0, // XML Schema months start at 1.
- 31, 28, 31, 30, 31, 30,
+ 31, 28, 31, 30, 31, 30,
31, 31, 30, 31, 30, 31};
private static int maximumDayInMonthFor(BigInteger year, int month) {
@@ -2394,7 +2394,10 @@
GregorianCalendar result = null;
final int DEFAULT_TIMEZONE_OFFSET = DatatypeConstants.FIELD_UNDEFINED;
TimeZone tz = getTimeZone(DEFAULT_TIMEZONE_OFFSET);
- Locale locale = Locale.getDefault();
+ /** Use the following instead for JDK7 only:
+ * Locale locale = Locale.getDefault(Locale.Category.FORMAT);
+ */
+ Locale locale = getDefaultLocale();
result = new GregorianCalendar(tz, locale);
result.clear();
@@ -2442,6 +2445,33 @@
}
/**
+ *
+ * @return default locale
+ */
+ private Locale getDefaultLocale() {
+
+ String lang = SecuritySupport.getSystemProperty("user.language.format");
+ String country = SecuritySupport.getSystemProperty("user.country.format");
+ String variant = SecuritySupport.getSystemProperty("user.variant.format");
+ Locale locale = null;
+ if (lang != null) {
+ if (country != null) {
+ if (variant != null) {
+ locale = new Locale(lang, country, variant);
+ } else {
+ locale = new Locale(lang, country);
+ }
+ } else {
+ locale = new Locale(lang);
+ }
+ }
+ if (locale == null) {
+ locale = Locale.getDefault();
+ }
+ return locale;
+ }
+
+ /**
* Convert this
along with provided parameters
* to java.util.GregorianCalendar
instance.
*
@@ -2658,9 +2688,9 @@
// of immutable classes, so they do not need to be cloned.
return new XMLGregorianCalendarImpl(getEonAndYear(),
this.month, this.day,
- this.hour, this.minute, this.second,
- this.fractionalSecond,
- this.timezone);
+ this.hour, this.minute, this.second,
+ this.fractionalSecond,
+ this.timezone);
}
/**
@@ -2953,7 +2983,7 @@
if (getFractionalSecond() != null) {
// Note: toPlainString() isn't available before Java 1.5
String frac = getFractionalSecond().toString();
-
+
int pos = frac.indexOf("E-");
if (pos >= 0) {
String zeros = frac.substring(pos+2);
@@ -3058,4 +3088,3 @@
//PENDING : Implementation of reset method
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java Wed May 02 13:32:36 2012 +0100
@@ -28,7 +28,7 @@
/**
* Abstract implementation of Schema for W3C XML Schemas.
- *
+ *
* @author Michael Glavassevich, IBM
* @version $Id: AbstractXMLSchema.java,v 1.6 2010-11-01 04:40:07 joehw Exp $
*/
@@ -49,20 +49,20 @@
* Schema methods
*/
- /*
+ /*
* @see javax.xml.validation.Schema#newValidator()
*/
public final Validator newValidator() {
return new ValidatorImpl(this);
}
- /*
+ /*
* @see javax.xml.validation.Schema#newValidatorHandler()
*/
public final ValidatorHandler newValidatorHandler() {
return new ValidatorHandlerImpl(this);
}
-
+
/*
* XSGrammarPoolContainer methods
*/
@@ -83,5 +83,5 @@
final void setFeature(String featureId, boolean state) {
fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE);
}
-
+
} // AbstractXMLSchema
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/DOMValidatorHelper.java Wed May 02 13:32:36 2012 +0100
@@ -37,6 +37,7 @@
import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager;
import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator;
import com.sun.org.apache.xerces.internal.impl.xs.util.SimpleLocator;
+import com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl;
import com.sun.org.apache.xerces.internal.util.NamespaceSupport;
import com.sun.org.apache.xerces.internal.util.SymbolTable;
import com.sun.org.apache.xerces.internal.util.XMLAttributesImpl;
@@ -60,113 +61,113 @@
/**
* A validator helper for DOMSource
s.
- *
+ *
* @author Michael Glavassevich, IBM
- * @version $Id: DOMValidatorHelper.java,v 1.8 2010/07/23 02:09:26 joehw Exp $
+ * @version $Id: DOMValidatorHelper.java,v 1.9 2010-11-01 04:40:08 joehw Exp $
*/
final class DOMValidatorHelper implements ValidatorHelper, EntityState {
-
+
//
// Constants
//
/** Chunk size (1024). */
private static final int CHUNK_SIZE = (1 << 10);
-
+
/** Chunk mask (CHUNK_SIZE - 1). */
private static final int CHUNK_MASK = CHUNK_SIZE - 1;
-
+
// property identifiers
-
+
/** Property identifier: error reporter. */
private static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: namespace context. */
private static final String NAMESPACE_CONTEXT =
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_CONTEXT_PROPERTY;
-
+
/** Property identifier: XML Schema validator. */
private static final String SCHEMA_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_VALIDATOR_PROPERTY;
-
+
/** Property identifier: symbol table. */
private static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: validation manager. */
private static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
+
//
// Data
//
-
+
/** Error reporter. */
private XMLErrorReporter fErrorReporter;
-
+
/** The namespace context of this document: stores namespaces in scope. **/
private NamespaceSupport fNamespaceContext;
-
+
/** The namespace context of the DOMSource, includes context from ancestor nodes. **/
private DOMNamespaceContext fDOMNamespaceContext = new DOMNamespaceContext();
-
+
/** Schema validator. **/
private XMLSchemaValidator fSchemaValidator;
-
+
/** Symbol table **/
private SymbolTable fSymbolTable;
-
+
/** Validation manager. **/
private ValidationManager fValidationManager;
-
+
/** Component manager. **/
private XMLSchemaValidatorComponentManager fComponentManager;
-
+
/** Simple Locator. **/
private final SimpleLocator fXMLLocator = new SimpleLocator(null, null, -1, -1, -1);
-
+
/** DOM document handler. **/
private DOMDocumentHandler fDOMValidatorHandler;
-
+
/** DOM result augmentor. **/
private final DOMResultAugmentor fDOMResultAugmentor = new DOMResultAugmentor(this);
-
+
/** DOM result builder. **/
private final DOMResultBuilder fDOMResultBuilder = new DOMResultBuilder();
-
+
/** Map for tracking unparsed entities. **/
private NamedNodeMap fEntities = null;
-
+
/** Array for holding character data. **/
private char [] fCharBuffer = new char[CHUNK_SIZE];
-
+
/** Root node. **/
private Node fRoot;
-
+
/** Current element. **/
private Node fCurrentElement;
-
+
/** Fields for start element, end element and characters. **/
final QName fElementQName = new QName();
final QName fAttributeQName = new QName();
- final XMLAttributesImpl fAttributes = new XMLAttributesImpl();
+ final XMLAttributesImpl fAttributes = new XMLAttributesImpl();
final XMLString fTempString = new XMLString();
-
+
public DOMValidatorHelper(XMLSchemaValidatorComponentManager componentManager) {
fComponentManager = componentManager;
fErrorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER);
fNamespaceContext = (NamespaceSupport) fComponentManager.getProperty(NAMESPACE_CONTEXT);
fSchemaValidator = (XMLSchemaValidator) fComponentManager.getProperty(SCHEMA_VALIDATOR);
- fSymbolTable = (SymbolTable) fComponentManager.getProperty(SYMBOL_TABLE);
+ fSymbolTable = (SymbolTable) fComponentManager.getProperty(SYMBOL_TABLE);
fValidationManager = (ValidationManager) fComponentManager.getProperty(VALIDATION_MANAGER);
}
-
+
/*
* ValidatorHelper methods
*/
-
- public void validate(Source source, Result result)
+
+ public void validate(Source source, Result result)
throws SAXException, IOException {
if (result instanceof DOMResult || result == null) {
final DOMSource domSource = (DOMSource) source;
@@ -208,18 +209,18 @@
return;
}
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "SourceResultMismatch",
+ "SourceResultMismatch",
new Object [] {source.getClass().getName(), result.getClass().getName()}));
}
-
+
/*
* EntityState methods
*/
-
+
public boolean isEntityDeclared(String name) {
return false;
}
-
+
public boolean isEntityUnparsed(String name) {
if (fEntities != null) {
Entity entity = (Entity) fEntities.getNamedItem(name);
@@ -229,11 +230,11 @@
}
return false;
}
-
+
/*
* Other methods
*/
-
+
/** Traverse the DOM and fire events to the schema validator. */
private void validate(Node node) {
final Node top = node;
@@ -243,7 +244,7 @@
beginNode(node);
Node next = node.getFirstChild();
while (next == null) {
- finishNode(node);
+ finishNode(node);
if (top == node) {
break;
}
@@ -262,7 +263,7 @@
node = next;
}
}
-
+
/** Do processing for the start of a node. */
private void beginNode(Node node) {
switch (node.getNodeType()) {
@@ -298,11 +299,11 @@
else {
fSchemaValidator.startCDATA(null);
sendCharactersToValidator(node.getNodeValue());
- fSchemaValidator.endCDATA(null);
+ fSchemaValidator.endCDATA(null);
}
break;
case Node.PROCESSING_INSTRUCTION_NODE:
- /**
+ /**
* The validator does nothing with processing instructions so bypass it.
* Send the ProcessingInstruction node directly to the result builder.
*/
@@ -311,7 +312,7 @@
}
break;
case Node.COMMENT_NODE:
- /**
+ /**
* The validator does nothing with comments so bypass it.
* Send the Comment node directly to the result builder.
*/
@@ -320,7 +321,7 @@
}
break;
case Node.DOCUMENT_TYPE_NODE:
- /**
+ /**
* Send the DocumentType node directly to the result builder.
*/
if (fDOMValidatorHandler != null) {
@@ -331,7 +332,7 @@
break;
}
}
-
+
/** Do processing for the end of a node. */
private void finishNode(Node node) {
if (node.getNodeType() == Node.ELEMENT_NODE) {
@@ -343,10 +344,10 @@
fNamespaceContext.popContext();
}
}
-
+
/**
* Extracts NamedNodeMap of entities. We need this to validate
- * elements and attributes of type xs:ENTITY, xs:ENTITIES or
+ * elements and attributes of type xs:ENTITY, xs:ENTITIES or
* types dervied from them.
*/
private void setupEntityMap(Document doc) {
@@ -359,7 +360,7 @@
}
fEntities = null;
}
-
+
/**
* Sets up handler for DOMResult
.
*/
@@ -381,7 +382,8 @@
}
if (result.getNode() == null) {
try {
- DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilderFactory factory = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
+ DocumentBuilderFactory.newInstance() : new DocumentBuilderFactoryImpl();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
result.setNode(builder.newDocument());
@@ -394,34 +396,34 @@
fDOMResultBuilder.setDOMResult(result);
fSchemaValidator.setDocumentHandler(fDOMResultBuilder);
}
-
+
private void fillQName(QName toFill, Node node) {
final String prefix = node.getPrefix();
final String localName = node.getLocalName();
final String rawName = node.getNodeName();
final String namespace = node.getNamespaceURI();
-
+
toFill.uri = (namespace != null && namespace.length() > 0) ? fSymbolTable.addSymbol(namespace) : null;
- toFill.rawname = (rawName != null) ? fSymbolTable.addSymbol(rawName) : XMLSymbols.EMPTY_STRING;
-
+ toFill.rawname = (rawName != null) ? fSymbolTable.addSymbol(rawName) : XMLSymbols.EMPTY_STRING;
+
// Is this a DOM level1 document?
if (localName == null) {
int k = rawName.indexOf(':');
if (k > 0) {
toFill.prefix = fSymbolTable.addSymbol(rawName.substring(0, k));
- toFill.localpart = fSymbolTable.addSymbol(rawName.substring(k + 1));
+ toFill.localpart = fSymbolTable.addSymbol(rawName.substring(k + 1));
}
else {
toFill.prefix = XMLSymbols.EMPTY_STRING;
toFill.localpart = toFill.rawname;
- }
+ }
}
else {
toFill.prefix = (prefix != null) ? fSymbolTable.addSymbol(prefix) : XMLSymbols.EMPTY_STRING;
toFill.localpart = (localName != null) ? fSymbolTable.addSymbol(localName) : XMLSymbols.EMPTY_STRING;
}
}
-
+
private void processAttributes(NamedNodeMap attrMap) {
final int attrCount = attrMap.getLength();
fAttributes.removeAllAttributes();
@@ -449,7 +451,7 @@
}
}
}
-
+
private void sendCharactersToValidator(String str) {
if (str != null) {
final int length = str.length();
@@ -467,21 +469,21 @@
}
}
}
-
+
Node getCurrentElement() {
return fCurrentElement;
}
-
+
/**
* NamespaceContext for the DOMSource, includes context for ancestor nodes.
*/
final class DOMNamespaceContext implements NamespaceContext {
-
+
//
// Data
//
- /**
+ /**
* Namespace binding information. This array is composed of a
* series of tuples containing the namespace binding information:
* <prefix, uri>.
@@ -490,13 +492,13 @@
/** The size of the namespace information array. */
protected int fNamespaceSize = 0;
-
- /**
- * Flag indicating whether the namespace context
+
+ /**
+ * Flag indicating whether the namespace context
* has been from the root node's ancestors.
*/
protected boolean fDOMContextBuilt = false;
-
+
//
// Methods
//
@@ -520,7 +522,7 @@
fillNamespaceContext();
fDOMContextBuilt = true;
}
- if (fNamespaceSize > 0 &&
+ if (fNamespaceSize > 0 &&
!fNamespaceContext.containsPrefix(prefix)) {
uri = getURI0(prefix);
}
@@ -546,9 +548,9 @@
public void reset() {
fDOMContextBuilt = false;
- fNamespaceSize = 0;
+ fNamespaceSize = 0;
}
-
+
private void fillNamespaceContext() {
if (fRoot != null) {
Node currentNode = fRoot.getParentNode();
@@ -576,14 +578,14 @@
}
}
}
-
+
}
currentNode = currentNode.getParentNode();
}
}
}
-
- private void declarePrefix0(String prefix, String uri) {
+
+ private void declarePrefix0(String prefix, String uri) {
// resize array, if needed
if (fNamespaceSize == fNamespace.length) {
String[] namespacearray = new String[fNamespaceSize * 2];
@@ -595,7 +597,7 @@
fNamespace[fNamespaceSize++] = prefix;
fNamespace[fNamespaceSize++] = uri;
}
-
+
private String getURI0(String prefix) {
// find prefix in the DOM context
for (int i = 0; i < fNamespaceSize; i += 2) {
@@ -607,5 +609,5 @@
return null;
}
}
-
+
} // DOMValidatorHelper
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java Wed May 02 13:32:36 2012 +0100
@@ -27,17 +27,17 @@
/**
* Implementation of Schema for W3C XML Schemas
* which contains no schema components.
- *
+ *
* @author Michael Glavassevich, IBM
* @version $Id: EmptyXMLSchema.java,v 1.6 2010-11-01 04:40:08 joehw Exp $
*/
final class EmptyXMLSchema extends AbstractXMLSchema implements XMLGrammarPool {
-
+
/** Zero length grammar array. */
private static final Grammar [] ZERO_LENGTH_GRAMMAR_ARRAY = new Grammar [0];
-
+
public EmptyXMLSchema() {}
-
+
/*
* XMLGrammarPool methods
*/
@@ -57,7 +57,7 @@
public void unlockPool() {}
public void clear() {}
-
+
/*
* XSGrammarPoolContainer methods
*/
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StAXValidatorHelper.java Wed May 02 13:32:36 2012 +0100
@@ -25,6 +25,7 @@
package com.sun.org.apache.xerces.internal.jaxp.validation;
+import com.sun.org.apache.xerces.internal.impl.Constants;
import java.io.IOException;
import javax.xml.transform.Result;
@@ -32,6 +33,7 @@
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import javax.xml.transform.sax.SAXResult;
import javax.xml.transform.sax.SAXTransformerFactory;
@@ -47,27 +49,30 @@
* @author Sunitha Reddy
*/
public final class StAXValidatorHelper implements ValidatorHelper {
-
+ private static final String DEFAULT_TRANSFORMER_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
+
/** Component manager. **/
private XMLSchemaValidatorComponentManager fComponentManager;
-
+
private Transformer identityTransformer1 = null;
private TransformerHandler identityTransformer2 = null;
private ValidatorHandlerImpl handler = null;
-
+
/** Creates a new instance of StaxValidatorHelper */
public StAXValidatorHelper(XMLSchemaValidatorComponentManager componentManager) {
fComponentManager = componentManager;
}
-
- public void validate(Source source, Result result)
+
+ public void validate(Source source, Result result)
throws SAXException, IOException {
-
+
if (result == null || result instanceof StAXResult) {
-
+
if( identityTransformer1==null ) {
try {
- SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+ SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
+ (SAXTransformerFactory)SAXTransformerFactory.newInstance()
+ : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StAXValidatorHelper.class.getClassLoader());
identityTransformer1 = tf.newTransformer();
identityTransformer2 = tf.newTransformerHandler();
} catch (TransformerConfigurationException e) {
@@ -94,7 +99,7 @@
return;
}
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "SourceResultMismatch",
+ "SourceResultMismatch",
new Object [] {source.getClass().getName(), result.getClass().getName()}));
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/StreamValidatorHelper.java Wed May 02 13:32:36 2012 +0100
@@ -30,7 +30,7 @@
import javax.xml.transform.stream.StreamSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.TransformerConfigurationException;
-import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
import javax.xml.transform.TransformerFactoryConfigurationError;
import com.sun.org.apache.xerces.internal.impl.Constants;
@@ -45,89 +45,92 @@
/**
* A validator helper for StreamSource
s.
- *
+ *
* @author Michael Glavassevich, IBM
* @author Sunitha Reddy
- * @version $Id: StreamValidatorHelper.java,v 1.6 2010/07/23 02:09:26 joehw Exp $
+ * @version $Id: StreamValidatorHelper.java,v 1.7 2010-11-01 04:40:08 joehw Exp $
*/
final class StreamValidatorHelper implements ValidatorHelper {
-
+
// feature identifiers
-
+
/** Feature identifier: parser settings. */
- private static final String PARSER_SETTINGS =
- Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
-
+ private static final String PARSER_SETTINGS =
+ Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
+
// property identifiers
-
+
/** Property identifier: entity resolver. */
private static final String ENTITY_RESOLVER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
+
/** Property identifier: error handler. */
- private static final String ERROR_HANDLER =
+ private static final String ERROR_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
+
/** Property identifier: error reporter. */
private static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: XML Schema validator. */
private static final String SCHEMA_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_VALIDATOR_PROPERTY;
-
+
/** Property identifier: symbol table. */
private static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: validation manager. */
private static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
+
+ private static final String DEFAULT_TRANSFORMER_IMPL = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
//
// Data
//
-
+
/** SoftReference to parser configuration. **/
private SoftReference fConfiguration = new SoftReference(null);
-
+
/** Schema validator. **/
private com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator fSchemaValidator;
-
+
/** Component manager. **/
private XMLSchemaValidatorComponentManager fComponentManager;
-
+
private ValidatorHandlerImpl handler = null;
-
+
public StreamValidatorHelper(XMLSchemaValidatorComponentManager componentManager) {
fComponentManager = componentManager;
fSchemaValidator = (com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator) fComponentManager.getProperty(SCHEMA_VALIDATOR);
}
- public void validate(Source source, Result result)
+ public void validate(Source source, Result result)
throws SAXException, IOException {
if (result == null || result instanceof StreamResult) {
final StreamSource streamSource = (StreamSource) source;
TransformerHandler identityTransformerHandler ;
-
+
if( result!=null ) {
try {
- SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
+ SAXTransformerFactory tf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
+ (SAXTransformerFactory)SAXTransformerFactory.newInstance()
+ : (SAXTransformerFactory) TransformerFactory.newInstance(DEFAULT_TRANSFORMER_IMPL, StreamValidatorHelper.class.getClassLoader());
identityTransformerHandler = tf.newTransformerHandler();
} catch (TransformerConfigurationException e) {
throw new TransformerFactoryConfigurationError(e);
}
-
+
handler = new ValidatorHandlerImpl(fComponentManager);
handler.setContentHandler(identityTransformerHandler);
identityTransformerHandler.setResult(result);
}
-
+
XMLInputSource input = new XMLInputSource(streamSource.getPublicId(), streamSource.getSystemId(), null);
input.setByteStream(streamSource.getInputStream());
input.setCharacterStream(streamSource.getReader());
-
- // Gets the parser configuration. We'll create and initialize a new one, if we
+
+ // Gets the parser configuration. We'll create and initialize a new one, if we
// haven't created one before or if the previous one was garbage collected.
XMLParserConfiguration config = (XMLParserConfiguration) fConfiguration.get();
if (config == null) {
@@ -138,11 +141,11 @@
config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER));
config.setProperty(ERROR_HANDLER, fComponentManager.getProperty(ERROR_HANDLER));
}
-
+
// prepare for parse
fComponentManager.reset();
fSchemaValidator.setDocumentHandler(handler);
-
+
try {
config.parse(input);
}
@@ -155,10 +158,10 @@
return;
}
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "SourceResultMismatch",
+ "SourceResultMismatch",
new Object [] {source.getClass().getName(), result.getClass().getName()}));
}
-
+
private XMLParserConfiguration initialize() {
XML11Configuration config = new XML11Configuration();
config.setProperty(ENTITY_RESOLVER, fComponentManager.getProperty(ENTITY_RESOLVER));
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorHandlerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -43,6 +43,7 @@
import com.sun.org.apache.xerces.internal.impl.validation.EntityState;
import com.sun.org.apache.xerces.internal.impl.validation.ValidationManager;
import com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import com.sun.org.apache.xerces.internal.util.AttributesProxy;
import com.sun.org.apache.xerces.internal.util.SAXLocatorWrapper;
import com.sun.org.apache.xerces.internal.util.SAXMessageFormatter;
@@ -91,40 +92,40 @@
*
* @author Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
* @author Michael Glavassevich, IBM
- *
+ *
* @version $Id: ValidatorHandlerImpl.java,v 1.10 2010-11-01 04:40:08 joehw Exp $
*/
final class ValidatorHandlerImpl extends ValidatorHandler implements
DTDHandler, EntityState, PSVIProvider, ValidatorHelper, XMLDocumentHandler {
-
+
// feature identifiers
-
+
/** Feature identifier: namespace prefixes. */
private static final String NAMESPACE_PREFIXES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE;
-
+
/** Feature identifier: string interning. */
protected static final String STRING_INTERNING =
Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE;
-
+
// property identifiers
-
+
/** Property identifier: error reporter. */
private static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: namespace context. */
private static final String NAMESPACE_CONTEXT =
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_CONTEXT_PROPERTY;
-
+
/** Property identifier: XML Schema validator. */
private static final String SCHEMA_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_VALIDATOR_PROPERTY;
-
+
/** Property identifier: security manager. */
private static final String SECURITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
-
+
/** Property identifier: symbol table. */
private static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
@@ -132,58 +133,58 @@
/** Property identifier: validation manager. */
private static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
+
//
// Data
//
-
+
/** Error reporter. */
private XMLErrorReporter fErrorReporter;
-
+
/** The namespace context of this document: stores namespaces in scope */
private NamespaceContext fNamespaceContext;
-
+
/** Schema validator. **/
private XMLSchemaValidator fSchemaValidator;
-
+
/** Symbol table **/
private SymbolTable fSymbolTable;
-
+
/** Validation manager. */
private ValidationManager fValidationManager;
-
+
/** Component manager. **/
private XMLSchemaValidatorComponentManager fComponentManager;
/** XML Locator wrapper for SAX. **/
private final SAXLocatorWrapper fSAXLocatorWrapper = new SAXLocatorWrapper();
-
+
/** Flag used to track whether the namespace context needs to be pushed. */
private boolean fNeedPushNSContext = true;
-
+
/** Map for tracking unparsed entities. */
private HashMap fUnparsedEntities = null;
-
+
/** Flag used to track whether XML names and Namespace URIs have been internalized. */
private boolean fStringsInternalized = false;
-
+
/** Fields for start element, end element and characters. */
private final QName fElementQName = new QName();
private final QName fAttributeQName = new QName();
private final XMLAttributesImpl fAttributes = new XMLAttributesImpl();
- private final AttributesProxy fAttrAdapter = new AttributesProxy(fAttributes);
+ private final AttributesProxy fAttrAdapter = new AttributesProxy(fAttributes);
private final XMLString fTempString = new XMLString();
-
+
//
// User Objects
//
-
+
private ContentHandler fContentHandler = null;
-
+
/*
* Constructors
*/
-
+
public ValidatorHandlerImpl(XSGrammarPoolContainer grammarContainer) {
this(new XMLSchemaValidatorComponentManager(grammarContainer));
fComponentManager.addRecognizedFeatures(new String [] {NAMESPACE_PREFIXES});
@@ -191,7 +192,7 @@
setErrorHandler(null);
setResourceResolver(null);
}
-
+
public ValidatorHandlerImpl(XMLSchemaValidatorComponentManager componentManager) {
fComponentManager = componentManager;
fErrorReporter = (XMLErrorReporter) fComponentManager.getProperty(ERROR_REPORTER);
@@ -204,11 +205,11 @@
/*
* ValidatorHandler methods
*/
-
+
public void setContentHandler(ContentHandler receiver) {
fContentHandler = receiver;
}
-
+
public ContentHandler getContentHandler() {
return fContentHandler;
}
@@ -232,8 +233,8 @@
public TypeInfoProvider getTypeInfoProvider() {
return fTypeInfoProvider;
}
-
- public boolean getFeature(String name)
+
+ public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
throw new NullPointerException();
@@ -250,7 +251,7 @@
key, new Object [] {identifier}));
}
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -266,7 +267,7 @@
//for now, the identifier can only be (XMLConstants.FEATURE_SECURE_PROCESSING)
throw new SAXNotSupportedException(
SAXMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "jaxp-secureprocessing-feature", null));
+ "jaxp-secureprocessing-feature", null));
} else if (e.getType() == Status.NOT_RECOGNIZED) {
key = "feature-not-recognized";
} else {
@@ -274,10 +275,10 @@
}
throw new SAXNotRecognizedException(
SAXMessageFormatter.formatMessage(fComponentManager.getLocale(),
- key, new Object [] {identifier}));
+ key, new Object [] {identifier}));
}
}
-
+
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -295,7 +296,7 @@
key, new Object [] {identifier}));
}
}
-
+
public void setProperty(String name, Object object)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -313,11 +314,11 @@
key, new Object [] {identifier}));
}
}
-
+
/*
* EntityState methods
*/
-
+
public boolean isEntityDeclared(String name) {
return false;
}
@@ -328,7 +329,7 @@
}
return false;
}
-
+
/*
* XMLDocumentHandler methods
*/
@@ -371,7 +372,7 @@
if (fContentHandler != null) {
try {
fTypeInfoProvider.beginStartElement(augs, attributes);
- fContentHandler.startElement((element.uri != null) ? element.uri : XMLSymbols.EMPTY_STRING,
+ fContentHandler.startElement((element.uri != null) ? element.uri : XMLSymbols.EMPTY_STRING,
element.localpart, element.rawname, fAttrAdapter);
}
catch (SAXException e) {
@@ -467,7 +468,7 @@
public XMLDocumentSource getDocumentSource() {
return fSchemaValidator;
}
-
+
/*
* ContentHandler methods
*/
@@ -548,10 +549,10 @@
fNamespaceContext.pushContext();
}
fNeedPushNSContext = true;
-
+
// Fill element QName
fillQName(fElementQName, uri, localName, qName);
-
+
// Fill XMLAttributes
if (atts instanceof Attributes2) {
fillXMLAttributes2((Attributes2) atts);
@@ -559,7 +560,7 @@
else {
fillXMLAttributes(atts);
}
-
+
try {
fSchemaValidator.startElement(fElementQName, fAttributes, null);
}
@@ -618,10 +619,10 @@
public void processingInstruction(String target, String data)
throws SAXException {
- /**
+ /**
* Processing instructions do not participate in schema validation,
* so just forward the event to the application's content
- * handler.
+ * handler.
*/
if (fContentHandler != null) {
fContentHandler.processingInstruction(target, data);
@@ -635,41 +636,42 @@
fContentHandler.skippedEntity(name);
}
}
-
+
/*
* DTDHandler methods
*/
-
- public void notationDecl(String name, String publicId,
+
+ public void notationDecl(String name, String publicId,
String systemId) throws SAXException {}
- public void unparsedEntityDecl(String name, String publicId,
+ public void unparsedEntityDecl(String name, String publicId,
String systemId, String notationName) throws SAXException {
if (fUnparsedEntities == null) {
fUnparsedEntities = new HashMap();
}
fUnparsedEntities.put(name, name);
}
-
+
/*
* ValidatorHelper methods
*/
-
- public void validate(Source source, Result result)
+
+ public void validate(Source source, Result result)
throws SAXException, IOException {
if (result instanceof SAXResult || result == null) {
final SAXSource saxSource = (SAXSource) source;
final SAXResult saxResult = (SAXResult) result;
-
+
if (result != null) {
setContentHandler(saxResult.getHandler());
}
-
+
try {
XMLReader reader = saxSource.getXMLReader();
if( reader==null ) {
// create one now
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = fComponentManager.getFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM) ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(true);
try {
reader = spf.newSAXParser().getXMLReader();
@@ -689,7 +691,7 @@
throw new FactoryConfigurationError(e);
}
}
-
+
// If XML names and Namespace URIs are already internalized we
// can avoid running them through the SymbolTable.
try {
@@ -700,17 +702,17 @@
// In either case, assume that strings are not internalized.
fStringsInternalized = false;
}
-
+
ErrorHandler errorHandler = fComponentManager.getErrorHandler();
reader.setErrorHandler(errorHandler != null ? errorHandler : DraconianErrorHandler.getInstance());
reader.setEntityResolver(fResolutionForwarder);
fResolutionForwarder.setEntityResolver(fComponentManager.getResourceResolver());
reader.setContentHandler(this);
reader.setDTDHandler(this);
-
+
InputSource is = saxSource.getInputSource();
reader.parse(is);
- }
+ }
finally {
// release the reference to user's handler ASAP
setContentHandler(null);
@@ -718,32 +720,32 @@
return;
}
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "SourceResultMismatch",
+ "SourceResultMismatch",
new Object [] {source.getClass().getName(), result.getClass().getName()}));
}
-
+
/*
* PSVIProvider methods
*/
-
+
public ElementPSVI getElementPSVI() {
return fTypeInfoProvider.getElementPSVI();
}
-
+
public AttributePSVI getAttributePSVI(int index) {
return fTypeInfoProvider.getAttributePSVI(index);
}
-
+
public AttributePSVI getAttributePSVIByName(String uri, String localname) {
return fTypeInfoProvider.getAttributePSVIByName(uri, localname);
}
-
+
//
//
// helper methods
//
//
-
+
/** Fills in a QName object. */
private void fillQName(QName toFill, String uri, String localpart, String raw) {
if (!fStringsInternalized) {
@@ -769,7 +771,7 @@
}
toFill.setValues(prefix, localpart, raw, uri);
}
-
+
/** Fills in the XMLAttributes object. */
private void fillXMLAttributes(Attributes att) {
fAttributes.removeAllAttributes();
@@ -779,7 +781,7 @@
fAttributes.setSpecified(i, true);
}
}
-
+
/** Fills in the XMLAttributes object. */
private void fillXMLAttributes2(Attributes2 att) {
fAttributes.removeAllAttributes();
@@ -792,14 +794,14 @@
}
}
}
-
+
/** Adds an attribute to the XMLAttributes object. */
private void fillXMLAttribute(Attributes att, int index) {
fillQName(fAttributeQName, att.getURI(index), att.getLocalName(index), att.getQName(index));
String type = att.getType(index);
fAttributes.addAttributeNS(fAttributeQName, (type != null) ? type : XMLSymbols.fCDATASymbol, att.getValue(index));
}
-
+
/**
* {@link TypeInfoProvider} implementation.
*
@@ -807,45 +809,45 @@
*/
private final XMLSchemaTypeInfoProvider fTypeInfoProvider = new XMLSchemaTypeInfoProvider();
private class XMLSchemaTypeInfoProvider extends TypeInfoProvider {
-
+
/** Element augmentations: contains ElementPSVI. **/
private Augmentations fElementAugs;
-
+
/** Attributes: augmentations for each attribute contain AttributePSVI. **/
private XMLAttributes fAttributes;
-
+
/** In start element. **/
private boolean fInStartElement = false;
-
+
/** In end element. **/
private boolean fInEndElement = false;
-
+
/** Initializes the TypeInfoProvider with type information for the current element. **/
void beginStartElement(Augmentations elementAugs, XMLAttributes attributes) {
fInStartElement = true;
fElementAugs = elementAugs;
fAttributes = attributes;
}
-
+
/** Cleanup at the end of start element. **/
void finishStartElement() {
fInStartElement = false;
fElementAugs = null;
fAttributes = null;
}
-
+
/** Initializes the TypeInfoProvider with type information for the current element. **/
void beginEndElement(Augmentations elementAugs) {
fInEndElement = true;
fElementAugs = elementAugs;
}
-
+
/** Cleanup at the end of end element. **/
void finishEndElement() {
fInEndElement = false;
fElementAugs = null;
}
-
+
/**
* Throws a {@link IllegalStateException} if we are not in
* the startElement callback. the JAXP API requires this
@@ -857,12 +859,12 @@
"TypeInfoProviderIllegalState", null));
}
}
-
+
public TypeInfo getAttributeTypeInfo(int index) {
checkState(false);
return getAttributeType(index);
}
-
+
private TypeInfo getAttributeType( int index ) {
checkState(false);
if( index<0 || fAttributes.getLength()<=index )
@@ -872,27 +874,27 @@
AttributePSVI psvi = (AttributePSVI)augs.getItem(Constants.ATTRIBUTE_PSVI);
return getTypeInfoFromPSVI(psvi);
}
-
+
public TypeInfo getAttributeTypeInfo(String attributeUri, String attributeLocalName) {
checkState(false);
return getAttributeTypeInfo(fAttributes.getIndex(attributeUri,attributeLocalName));
}
-
+
public TypeInfo getAttributeTypeInfo(String attributeQName) {
checkState(false);
return getAttributeTypeInfo(fAttributes.getIndex(attributeQName));
}
-
+
public TypeInfo getElementTypeInfo() {
checkState(true);
if (fElementAugs == null) return null;
ElementPSVI psvi = (ElementPSVI)fElementAugs.getItem(Constants.ELEMENT_PSVI);
return getTypeInfoFromPSVI(psvi);
}
-
+
private TypeInfo getTypeInfoFromPSVI( ItemPSVI psvi ) {
if(psvi==null) return null;
-
+
// TODO: make sure if this is correct.
// TODO: since the number of types in a schema is quite limited,
// TypeInfoImpl should be pooled. Even better, it should be a part
@@ -903,36 +905,36 @@
return (t instanceof TypeInfo) ? (TypeInfo) t : null;
}
}
-
+
XSTypeDefinition t = psvi.getTypeDefinition();
// TODO: can t be null?
if (t != null) {
- return (t instanceof TypeInfo) ? (TypeInfo) t : null;
+ return (t instanceof TypeInfo) ? (TypeInfo) t : null;
}
return null;
}
-
+
public boolean isIdAttribute(int index) {
checkState(false);
XSSimpleType type = (XSSimpleType)getAttributeType(index);
if(type==null) return false;
return type.isIDType();
}
-
+
public boolean isSpecified(int index) {
checkState(false);
return fAttributes.isSpecified(index);
}
-
+
/*
* Other methods
*/
-
+
// PSVIProvider support
ElementPSVI getElementPSVI() {
return (fElementAugs != null) ? (ElementPSVI) fElementAugs.getItem(Constants.ELEMENT_PSVI) : null;
}
-
+
AttributePSVI getAttributePSVI(int index) {
if (fAttributes != null) {
Augmentations augs = fAttributes.getAugmentations(index);
@@ -942,7 +944,7 @@
}
return null;
}
-
+
AttributePSVI getAttributePSVIByName(String uri, String localname) {
if (fAttributes != null) {
Augmentations augs = fAttributes.getAugmentations(uri, localname);
@@ -953,12 +955,12 @@
return null;
}
}
-
+
/** SAX adapter for an LSResourceResolver. */
private final ResolutionForwarder fResolutionForwarder = new ResolutionForwarder(null);
- static final class ResolutionForwarder
+ static final class ResolutionForwarder
implements EntityResolver2 {
-
+
//
// Data
//
@@ -980,7 +982,7 @@
public ResolutionForwarder(LSResourceResolver entityResolver) {
setEntityResolver(entityResolver);
}
-
+
//
// Public methods
//
@@ -1007,7 +1009,7 @@
* Resolves the given resource and adapts the LSInput
* returned into an InputSource
.
*/
- public InputSource resolveEntity(String name, String publicId,
+ public InputSource resolveEntity(String name, String publicId,
String baseURI, String systemId) throws SAXException, IOException {
if (fEntityResolver != null) {
LSInput lsInput = fEntityResolver.resolveResource(XML_TYPE, null, publicId, systemId, baseURI);
@@ -1030,7 +1032,7 @@
InputSource inputSource = new InputSource();
inputSource.setPublicId(pubId);
inputSource.setSystemId((baseSystemId != null) ? resolveSystemId(systemId, baseSystemId) : systemId);
-
+
if (charStream != null) {
inputSource.setCharacterStream(charStream);
}
@@ -1046,13 +1048,13 @@
}
return null;
}
-
+
/** Delegates to EntityResolver2.resolveEntity(String, String, String, String). */
public InputSource resolveEntity(String publicId, String systemId)
throws SAXException, IOException {
return resolveEntity(null, publicId, null, systemId);
}
-
+
/** Resolves a system identifier against a base URI. */
private String resolveSystemId(String systemId, String baseURI) {
try {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/ValidatorImpl.java Wed May 02 13:32:36 2012 +0100
@@ -54,38 +54,38 @@
* @version $Id: ValidatorImpl.java,v 1.10 2010-11-01 04:40:08 joehw Exp $
*/
final class ValidatorImpl extends Validator implements PSVIProvider {
-
+
//
// Data
//
-
+
/** Component manager. **/
private XMLSchemaValidatorComponentManager fComponentManager;
-
+
/** SAX validator helper. **/
private ValidatorHandlerImpl fSAXValidatorHelper;
-
+
/** DOM validator helper. **/
private DOMValidatorHelper fDOMValidatorHelper;
-
+
/** Stream validator helper. **/
private StreamValidatorHelper fStreamValidatorHelper;
-
+
/** StAX validator helper. **/
private StAXValidatorHelper fStaxValidatorHelper;
-
+
/** Flag for tracking whether features/properties changed since last reset. */
private boolean fConfigurationChanged = false;
-
+
/** Flag for tracking whether the error handler changed since last reset. */
private boolean fErrorHandlerChanged = false;
-
+
/** Flag for tracking whether the resource resolver changed since last reset. */
private boolean fResourceResolverChanged = false;
-
+
/** Support current-element-node property */
private static final String CURRENT_ELEMENT_NODE = Constants.XERCES_PROPERTY_PREFIX + Constants.CURRENT_ELEMENT_NODE_PROPERTY;
-
+
public ValidatorImpl(XSGrammarPoolContainer grammarContainer) {
fComponentManager = new XMLSchemaValidatorComponentManager(grammarContainer);
setErrorHandler(null);
@@ -151,8 +151,8 @@
public LSResourceResolver getResourceResolver() {
return fComponentManager.getResourceResolver();
}
-
- public boolean getFeature(String name)
+
+ public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
throw new NullPointerException();
@@ -169,7 +169,7 @@
key, new Object [] {identifier}));
}
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -185,7 +185,7 @@
//for now, the identifier can only be (XMLConstants.FEATURE_SECURE_PROCESSING)
throw new SAXNotSupportedException(
SAXMessageFormatter.formatMessage(fComponentManager.getLocale(),
- "jaxp-secureprocessing-feature", null));
+ "jaxp-secureprocessing-feature", null));
} else if (e.getType() == Status.NOT_RECOGNIZED) {
key = "feature-not-recognized";
} else {
@@ -193,20 +193,20 @@
}
throw new SAXNotRecognizedException(
SAXMessageFormatter.formatMessage(fComponentManager.getLocale(),
- key, new Object [] {identifier}));
+ key, new Object [] {identifier}));
}
fConfigurationChanged = true;
}
-
+
public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
throw new NullPointerException();
}
//Support current-element-node; return current node if DOMSource is used.
- if (CURRENT_ELEMENT_NODE.equals(name)) {
- return (fDOMValidatorHelper != null) ? fDOMValidatorHelper.getCurrentElement() : null;
- }
+ if (CURRENT_ELEMENT_NODE.equals(name)) {
+ return (fDOMValidatorHelper != null) ? fDOMValidatorHelper.getCurrentElement() : null;
+ }
try {
return fComponentManager.getProperty(name);
}
@@ -219,7 +219,7 @@
key, new Object [] {identifier}));
}
}
-
+
public void setProperty(String name, Object object)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -238,7 +238,7 @@
}
fConfigurationChanged = true;
}
-
+
public void reset() {
// avoid resetting features and properties if the state the validator
// is currently in, is the same as it will be after reset.
@@ -261,21 +261,21 @@
}
}
}
-
+
/*
* PSVIProvider methods
*/
-
+
public ElementPSVI getElementPSVI() {
return (fSAXValidatorHelper != null) ? fSAXValidatorHelper.getElementPSVI() : null;
}
-
+
public AttributePSVI getAttributePSVI(int index) {
return (fSAXValidatorHelper != null) ? fSAXValidatorHelper.getAttributePSVI(index) : null;
}
-
+
public AttributePSVI getAttributePSVIByName(String uri, String localname) {
return (fSAXValidatorHelper != null) ? fSAXValidatorHelper.getAttributePSVIByName(uri, localname) : null;
}
-
+
} // ValidatorImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java Wed May 02 13:32:36 2012 +0100
@@ -67,47 +67,60 @@
* @version $Id: XMLSchemaFactory.java,v 1.11 2010-11-01 04:40:08 joehw Exp $
*/
public final class XMLSchemaFactory extends SchemaFactory {
-
+
// property identifiers
-
+
/** Feature identifier: schema full checking. */
private static final String SCHEMA_FULL_CHECKING =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
+
/** Property identifier: grammar pool. */
private static final String XMLGRAMMAR_POOL =
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
-
+
/** Property identifier: SecurityManager. */
private static final String SECURITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
-
+
//
// Data
//
-
+
/** The XMLSchemaLoader */
private final XMLSchemaLoader fXMLSchemaLoader = new XMLSchemaLoader();
-
+
/** User-specified ErrorHandler; can be null. */
private ErrorHandler fErrorHandler;
-
+
/** The LSResrouceResolver */
private LSResourceResolver fLSResourceResolver;
-
+
/** The DOMEntityResolverWrapper */
private final DOMEntityResolverWrapper fDOMEntityResolverWrapper;
-
+
/** The ErrorHandlerWrapper */
private ErrorHandlerWrapper fErrorHandlerWrapper;
-
+
/** The SecurityManager. */
private SecurityManager fSecurityManager;
-
- /** The container for the real grammar pool. */
+
+ /** The container for the real grammar pool. */
private XMLGrammarPoolWrapper fXMLGrammarPoolWrapper;
-
+
+ /**
+ * Indicates whether implementation parts should use
+ * service loader (or similar).
+ * Note the default value (false) is the safe option..
+ */
+ private final boolean fUseServicesMechanism;
public XMLSchemaFactory() {
+ this(true);
+ }
+ public static XMLSchemaFactory newXMLSchemaFactoryNoServiceLoader() {
+ return new XMLSchemaFactory(false);
+ }
+ private XMLSchemaFactory(boolean useServicesMechanism) {
+ fUseServicesMechanism = useServicesMechanism;
fErrorHandlerWrapper = new ErrorHandlerWrapper(DraconianErrorHandler.getInstance());
fDOMEntityResolverWrapper = new DOMEntityResolverWrapper();
fXMLGrammarPoolWrapper = new XMLGrammarPoolWrapper();
@@ -120,7 +133,7 @@
fSecurityManager = new SecurityManager();
fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
}
-
+
/**
* Is specified schema supported by this SchemaFactory
?
*
@@ -142,36 +155,36 @@
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
"SchemaLanguageLengthZero", null));
}
- // only W3C XML Schema 1.0 is supported
+ // only W3C XML Schema 1.0 is supported
return schemaLanguage.equals(XMLConstants.W3C_XML_SCHEMA_NS_URI);
}
-
+
public LSResourceResolver getResourceResolver() {
return fLSResourceResolver;
}
-
+
public void setResourceResolver(LSResourceResolver resourceResolver) {
fLSResourceResolver = resourceResolver;
fDOMEntityResolverWrapper.setEntityResolver(resourceResolver);
fXMLSchemaLoader.setEntityResolver(fDOMEntityResolverWrapper);
}
-
+
public ErrorHandler getErrorHandler() {
return fErrorHandler;
}
-
+
public void setErrorHandler(ErrorHandler errorHandler) {
fErrorHandler = errorHandler;
fErrorHandlerWrapper.setErrorHandler(errorHandler != null ? errorHandler : DraconianErrorHandler.getInstance());
fXMLSchemaLoader.setErrorHandler(fErrorHandlerWrapper);
- }
-
+ }
+
public Schema newSchema( Source[] schemas ) throws SAXException {
-
+
// this will let the loader store parsed Grammars into the pool.
XMLGrammarPoolImplExtension pool = new XMLGrammarPoolImplExtension();
fXMLGrammarPoolWrapper.setGrammarPool(pool);
-
+
XMLInputSource[] xmlInputSources = new XMLInputSource[schemas.length];
InputStream inputStream;
Reader reader;
@@ -199,7 +212,7 @@
else if (source instanceof DOMSource) {
DOMSource domSource = (DOMSource) source;
Node node = domSource.getNode();
- String systemID = domSource.getSystemId();
+ String systemID = domSource.getSystemId();
xmlInputSources[i] = new DOMInputSource(node, systemID);
}
else if (source instanceof StAXSource) {
@@ -218,28 +231,28 @@
}
else {
throw new IllegalArgumentException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
- "SchemaFactorySourceUnrecognized",
+ "SchemaFactorySourceUnrecognized",
new Object [] {source.getClass().getName()}));
}
}
-
+
try {
fXMLSchemaLoader.loadGrammar(xmlInputSources);
- }
+ }
catch (XNIException e) {
// this should have been reported to users already.
throw Util.toSAXException(e);
- }
+ }
catch (IOException e) {
// this hasn't been reported, so do so now.
SAXParseException se = new SAXParseException(e.getMessage(),null,e);
fErrorHandler.error(se);
throw se; // and we must throw it.
}
-
+
// Clear reference to grammar pool.
fXMLGrammarPoolWrapper.setGrammarPool(null);
-
+
// Select Schema implementation based on grammar count.
final int grammarCount = pool.getGrammarCount();
AbstractXMLSchema schema = null;
@@ -256,15 +269,15 @@
propagateFeatures(schema);
return schema;
}
-
+
public Schema newSchema() throws SAXException {
// Use a Schema that uses the system id as the equality source.
AbstractXMLSchema schema = new WeakReferenceXMLSchema();
propagateFeatures(schema);
return schema;
}
-
- public boolean getFeature(String name)
+
+ public boolean getFeature(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
@@ -290,8 +303,8 @@
}
}
}
-
- public Object getProperty(String name)
+
+ public Object getProperty(String name)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fXMLSchemaLoader.getLocale(),
@@ -322,7 +335,7 @@
}
}
}
-
+
public void setFeature(String name, boolean value)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -332,7 +345,7 @@
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if (System.getSecurityManager() != null && (!value)) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(null,
+ SAXMessageFormatter.formatMessage(null,
"jaxp-secureprocessing-feature", null));
}
fSecurityManager = value ? new SecurityManager() : null;
@@ -356,7 +369,7 @@
}
}
}
-
+
public void setProperty(String name, Object object)
throws SAXNotRecognizedException, SAXNotSupportedException {
if (name == null) {
@@ -393,19 +406,20 @@
private void propagateFeatures(AbstractXMLSchema schema) {
schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null);
+ schema.setFeature(Constants.ORACLE_FEATURE_SERVICE_MECHANISM, fUseServicesMechanism);
String[] features = fXMLSchemaLoader.getRecognizedFeatures();
for (int i = 0; i < features.length; ++i) {
boolean state = fXMLSchemaLoader.getFeature(features[i]);
schema.setFeature(features[i], state);
}
}
-
- /**
+
+ /**
* Extension of XMLGrammarPoolImpl which exposes the number of
* grammars stored in the grammar pool.
*/
static class XMLGrammarPoolImplExtension extends XMLGrammarPoolImpl {
-
+
/** Constructs a grammar pool with a default number of buckets. */
public XMLGrammarPoolImplExtension() {
super();
@@ -415,25 +429,25 @@
public XMLGrammarPoolImplExtension(int initialCapacity) {
super(initialCapacity);
}
-
+
/** Returns the number of grammars contained in this pool. */
int getGrammarCount() {
return fGrammarCount;
}
-
+
} // XMLSchemaFactory.XMLGrammarPoolImplExtension
-
+
/**
* A grammar pool which wraps another.
*/
static class XMLGrammarPoolWrapper implements XMLGrammarPool {
private XMLGrammarPool fGrammarPool;
-
+
/*
* XMLGrammarPool methods
*/
-
+
public Grammar[] retrieveInitialGrammarSet(String grammarType) {
return fGrammarPool.retrieveInitialGrammarSet(grammarType);
}
@@ -457,19 +471,19 @@
public void clear() {
fGrammarPool.clear();
}
-
+
/*
* Other methods
*/
-
+
void setGrammarPool(XMLGrammarPool grammarPool) {
fGrammarPool = grammarPool;
}
-
+
XMLGrammarPool getGrammarPool() {
return fGrammarPool;
}
-
+
} // XMLSchemaFactory.XMLGrammarPoolWrapper
-
+
} // XMLSchemaFactory
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java Wed May 02 13:32:36 2012 +0100
@@ -52,19 +52,19 @@
/**
* An implementation of XMLComponentManager for a schema validator.
- *
+ *
* @author Michael Glavassevich, IBM
* @version $Id: XMLSchemaValidatorComponentManager.java,v 1.9 2010-11-01 04:40:08 joehw Exp $
*/
final class XMLSchemaValidatorComponentManager extends ParserConfigurationSettings implements
XMLComponentManager {
-
+
// feature identifiers
-
+
/** Feature identifier: schema validation. */
private static final String SCHEMA_VALIDATION =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE;
-
+
/** Feature identifier: validation. */
private static final String VALIDATION =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
@@ -72,49 +72,49 @@
/** Feature identifier: send element default value via characters() */
private static final String SCHEMA_ELEMENT_DEFAULT =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_ELEMENT_DEFAULT;
-
+
/** Feature identifier: use grammar pool only. */
private static final String USE_GRAMMAR_POOL_ONLY =
Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
-
+
// property identifiers
/** Property identifier: entity manager. */
private static final String ENTITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+
/** Property identifier: entity resolver. */
private static final String ENTITY_RESOLVER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
-
+
/** Property identifier: error handler. */
- private static final String ERROR_HANDLER =
+ private static final String ERROR_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
-
+
/** Property identifier: error reporter. */
private static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Property identifier: namespace context. */
private static final String NAMESPACE_CONTEXT =
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_CONTEXT_PROPERTY;
-
+
/** Property identifier: XML Schema validator. */
private static final String SCHEMA_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.SCHEMA_VALIDATOR_PROPERTY;
-
+
/** Property identifier: security manager. */
private static final String SECURITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.SECURITY_MANAGER_PROPERTY;
-
+
/** Property identifier: symbol table. */
private static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
/** Property identifier: validation manager. */
private static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
+
/** Property identifier: grammar pool. */
private static final String XMLGRAMMAR_POOL =
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
@@ -130,38 +130,38 @@
* State of secure mode.
*/
private boolean _isSecureMode = false;
-
- /**
- * fConfigUpdated is set to true if there has been any change to the configuration settings,
+
+ /**
+ * fConfigUpdated is set to true if there has been any change to the configuration settings,
* i.e a feature or a property was changed.
*/
private boolean fConfigUpdated = true;
-
- /**
- * Tracks whether the validator should use components from
+
+ /**
+ * Tracks whether the validator should use components from
* the grammar pool to the exclusion of all others.
*/
private boolean fUseGrammarPoolOnly;
-
+
/** Lookup map for components required for validation. **/
private final HashMap fComponents = new HashMap();
-
+
//
// Components
//
-
+
/** Entity manager. */
private XMLEntityManager fEntityManager;
-
+
/** Error reporter. */
private XMLErrorReporter fErrorReporter;
-
+
/** Namespace context. */
private NamespaceContext fNamespaceContext;
-
+
/** XML Schema validator. */
private XMLSchemaValidator fSchemaValidator;
-
+
/** Validation manager. */
private ValidationManager fValidationManager;
@@ -177,14 +177,14 @@
/** Stores the initial security manager. */
private final SecurityManager fInitSecurityManager;
-
+
//
// User Objects
//
-
+
/** Application's ErrorHandler. **/
private ErrorHandler fErrorHandler = null;
-
+
/** Application's LSResourceResolver. */
private LSResourceResolver fResourceResolver = null;
@@ -193,22 +193,22 @@
/** Constructs a component manager suitable for Xerces' schema validator. */
public XMLSchemaValidatorComponentManager(XSGrammarPoolContainer grammarContainer) {
- // setup components
+ // setup components
fEntityManager = new XMLEntityManager();
fComponents.put(ENTITY_MANAGER, fEntityManager);
-
+
fErrorReporter = new XMLErrorReporter();
fComponents.put(ERROR_REPORTER, fErrorReporter);
-
+
fNamespaceContext = new NamespaceSupport();
fComponents.put(NAMESPACE_CONTEXT, fNamespaceContext);
-
+
fSchemaValidator = new XMLSchemaValidator();
fComponents.put(SCHEMA_VALIDATOR, fSchemaValidator);
-
+
fValidationManager = new ValidationManager();
fComponents.put(VALIDATION_MANAGER, fValidationManager);
-
+
// setup other properties
fComponents.put(ENTITY_RESOLVER, null);
fComponents.put(ERROR_HANDLER, null);
@@ -216,18 +216,18 @@
if (System.getSecurityManager() != null) {
_isSecureMode = true;
setProperty(SECURITY_MANAGER, new SecurityManager());
- } else {
+ } else {
fComponents.put(SECURITY_MANAGER, null);
}
fComponents.put(SYMBOL_TABLE, new SymbolTable());
-
+
// setup grammar pool
fComponents.put(XMLGRAMMAR_POOL, grammarContainer.getGrammarPool());
fUseGrammarPoolOnly = grammarContainer.isFullyComposed();
-
+
// add schema message formatter to error reporter
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
-
+
// add all recognized features and properties and apply their defaults
addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer);
addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer);
@@ -247,10 +247,10 @@
/**
* Returns the state of a feature.
- *
+ *
* @param featureId The feature identifier.
* @return true if the feature is supported
- *
+ *
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
@@ -276,7 +276,7 @@
}
return super.getFeatureState(featureId);
}
-
+
/**
* Set the state of a feature.
*
@@ -312,13 +312,13 @@
}
super.setFeature(featureId, value);
}
-
+
/**
* Returns the value of a property.
- *
+ *
* @param propertyId The property identifier.
* @return the value of the property
- *
+ *
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
@@ -339,13 +339,13 @@
}
return super.getPropertyState(propertyId);
}
-
+
/**
* Sets the state of a property.
- *
+ *
* @param propertyId The unique identifier (URI) of the property.
* @param value The requested state of the property.
- *
+ *
* @exception XMLConfigurationException If the requested property is not known.
*/
public void setProperty(String propertyId, Object value) throws XMLConfigurationException {
@@ -359,7 +359,7 @@
fEntityManager.setProperty(propertyId, value);
fErrorReporter.setProperty(propertyId, value);
fSchemaValidator.setProperty(propertyId, value);
- if (ENTITY_RESOLVER.equals(propertyId) || ERROR_HANDLER.equals(propertyId) ||
+ if (ENTITY_RESOLVER.equals(propertyId) || ERROR_HANDLER.equals(propertyId) ||
SECURITY_MANAGER.equals(propertyId)) {
fComponents.put(propertyId, value);
return;
@@ -374,7 +374,7 @@
}
super.setProperty(propertyId, value);
}
-
+
/**
* Adds all of the component's recognized features and properties
* to the list of default recognized features and properties, and
@@ -385,11 +385,11 @@
* and properties will be added to the configuration
*/
public void addRecognizedParamsAndSetDefaults(XMLComponent component, XSGrammarPoolContainer grammarContainer) {
-
+
// register component's recognized features
final String[] recognizedFeatures = component.getRecognizedFeatures();
addRecognizedFeatures(recognizedFeatures);
-
+
// register component's recognized properties
final String[] recognizedProperties = component.getRecognizedProperties();
addRecognizedProperties(recognizedProperties);
@@ -398,7 +398,7 @@
setFeatureDefaults(component, recognizedFeatures, grammarContainer);
setPropertyDefaults(component, recognizedProperties);
}
-
+
/** Calls reset on each of the components owned by this component manager. **/
public void reset() throws XNIException {
fNamespaceContext.reset();
@@ -409,22 +409,22 @@
// Mark configuration as fixed.
fConfigUpdated = false;
}
-
+
void setErrorHandler(ErrorHandler errorHandler) {
fErrorHandler = errorHandler;
- setProperty(ERROR_HANDLER, (errorHandler != null) ? new ErrorHandlerWrapper(errorHandler) :
+ setProperty(ERROR_HANDLER, (errorHandler != null) ? new ErrorHandlerWrapper(errorHandler) :
new ErrorHandlerWrapper(DraconianErrorHandler.getInstance()));
}
-
+
ErrorHandler getErrorHandler() {
return fErrorHandler;
}
-
+
void setResourceResolver(LSResourceResolver resourceResolver) {
fResourceResolver = resourceResolver;
setProperty(ENTITY_RESOLVER, new DOMEntityResolverWrapper(resourceResolver));
}
-
+
LSResourceResolver getResourceResolver() {
return fResourceResolver;
}
@@ -441,7 +441,7 @@
/** Cleans out configuration, restoring it to its initial state. */
void restoreInitialState() {
fConfigUpdated = true;
-
+
// Remove error resolver and error handler
fComponents.put(ENTITY_RESOLVER, null);
fComponents.put(ERROR_HANDLER, null);
@@ -449,7 +449,7 @@
// Set the Locale back to null.
setLocale(null);
fComponents.put(LOCALE, null);
-
+
// Restore initial security manager
fComponents.put(SECURITY_MANAGER, fInitSecurityManager);
@@ -479,7 +479,7 @@
fInitProperties.clear();
}
}
-
+
/** Sets feature defaults for the given component on this configuration. */
private void setFeatureDefaults(final XMLComponent component,
final String [] recognizedFeatures, XSGrammarPoolContainer grammarContainer) {
@@ -504,7 +504,7 @@
}
}
}
-
+
/** Sets property defaults for the given component on this configuration. */
private void setPropertyDefaults(final XMLComponent component, final String [] recognizedProperties) {
if (recognizedProperties != null) {
@@ -525,6 +525,5 @@
}
}
}
-
+
} // XMLSchemaValidatorComponentManager
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java Wed May 02 13:32:36 2012 +0100
@@ -24,25 +24,25 @@
/**
* A container for grammar pools which only contain schema grammars.
- *
+ *
* @author Michael Glavassevich, IBM
* @version $Id: XSGrammarPoolContainer.java,v 1.6 2010-11-01 04:40:08 joehw Exp $
*/
public interface XSGrammarPoolContainer {
-
+
/**
* Returns the grammar pool contained inside the container.
- *
+ *
* @return the grammar pool contained inside the container
*/
public XMLGrammarPool getGrammarPool();
-
+
/**
* Returns whether the schema components contained in this object
* can be considered to be a fully composed schema and should be
* used to the exclusion of other schema components which may be
* present elsewhere.
- *
+ *
* @return whether the schema components contained in this object
* can be considered to be a fully composed schema
*/
@@ -54,5 +54,5 @@
* should use the default value.
*/
public Boolean getFeature(String featureId);
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractDOMParser.java Wed May 02 13:32:36 2012 +0100
@@ -56,6 +56,7 @@
import com.sun.org.apache.xerces.internal.xs.AttributePSVI;
import com.sun.org.apache.xerces.internal.xs.ElementPSVI;
import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
@@ -314,7 +315,7 @@
} // (XMLParserConfiguration)
/**
- * This method retreives the name of current document class.
+ * This method retrieves the name of current document class.
*/
protected String getDocumentClassName () {
return fDocumentClassName;
@@ -345,8 +346,7 @@
!documentClassName.equals(PSVI_DOCUMENT_CLASS_NAME)) {
// verify that this class exists and is of the right type
try {
- Class _class = ObjectFactory.findProviderClass (documentClassName,
- ObjectFactory.findClassLoader (), true);
+ Class _class = ObjectFactory.findProviderClass (documentClassName, true);
//if (!_class.isAssignableFrom(Document.class)) {
if (!Document.class.isAssignableFrom (_class)) {
throw new IllegalArgumentException (
@@ -789,20 +789,16 @@
else {
// use specified document class
try {
- ClassLoader cl = ObjectFactory.findClassLoader();
- Class documentClass = ObjectFactory.findProviderClass (fDocumentClassName,
- cl, true);
+ Class documentClass = ObjectFactory.findProviderClass (fDocumentClassName, true);
fDocument = (Document)documentClass.newInstance ();
// if subclass of our own class that's cool too
Class defaultDocClass =
- ObjectFactory.findProviderClass (CORE_DOCUMENT_CLASS_NAME,
- cl, true);
+ ObjectFactory.findProviderClass (CORE_DOCUMENT_CLASS_NAME, true);
if (defaultDocClass.isAssignableFrom (documentClass)) {
fDocumentImpl = (CoreDocumentImpl)fDocument;
- Class psviDocClass = ObjectFactory.findProviderClass (PSVI_DOCUMENT_CLASS_NAME,
- cl, true);
+ Class psviDocClass = ObjectFactory.findProviderClass (PSVI_DOCUMENT_CLASS_NAME, true);
if (psviDocClass.isAssignableFrom (documentClass)) {
fStorePSVI = true;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser.java Wed May 02 13:32:36 2012 +0100
@@ -82,7 +82,7 @@
*/
public abstract class AbstractSAXParser
extends AbstractXMLDocumentParser
- implements PSVIProvider, // PSVI
+ implements PSVIProvider, // PSVI
Parser, XMLReader // SAX1, SAX2
{
@@ -103,7 +103,7 @@
/** Feature id: string interning. */
protected static final String STRING_INTERNING =
Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE;
-
+
/** Feature identifier: allow notation and unparsed entity events to be sent out of order. */
// this is not meant to be a recognized feature, but we need it here to use
// if it is already a recognized feature for the pipeline
@@ -120,7 +120,7 @@
// properties
/** Property id: lexical handler. */
- protected static final String LEXICAL_HANDLER =
+ protected static final String LEXICAL_HANDLER =
Constants.SAX_PROPERTY_PREFIX + Constants.LEXICAL_HANDLER_PROPERTY;
/** Property id: declaration handler. */
@@ -128,7 +128,7 @@
Constants.SAX_PROPERTY_PREFIX + Constants.DECLARATION_HANDLER_PROPERTY;
/** Property id: DOM node. */
- protected static final String DOM_NODE =
+ protected static final String DOM_NODE =
Constants.SAX_PROPERTY_PREFIX + Constants.DOM_NODE_PROPERTY;
/** Recognized properties. */
@@ -149,21 +149,21 @@
/** Namespace prefixes. */
protected boolean fNamespacePrefixes = false;
-
+
/** Lexical handler parameter entities. */
protected boolean fLexicalHandlerParameterEntities = true;
-
+
/** Standalone document declaration. */
protected boolean fStandalone;
-
+
/** Resolve DTD URIs. */
protected boolean fResolveDTDURIs = true;
-
+
/** Use EntityResolver2. */
protected boolean fUseEntityResolver2 = true;
-
- /**
- * XMLNS URIs: Namespace declarations in the
+
+ /**
+ * XMLNS URIs: Namespace declarations in the
* http://www.w3.org/2000/xmlns/ namespace.
*/
protected boolean fXMLNSURIs = false;
@@ -175,7 +175,7 @@
/** Document handler. */
protected DocumentHandler fDocumentHandler;
-
+
/** Namespace context */
protected NamespaceContext fNamespaceContext;
@@ -266,10 +266,10 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startDocument(XMLLocator locator, String encoding,
+ public void startDocument(XMLLocator locator, String encoding,
NamespaceContext namespaceContext, Augmentations augs)
throws XNIException {
-
+
fNamespaceContext = namespaceContext;
try {
@@ -299,7 +299,7 @@
* Notifies of the presence of an XMLDecl line in the document. If
* present, this method will be called immediately following the
* startDocument call.
- *
+ *
* @param version The XML version.
* @param encoding The IANA encoding name of the document, or null if
* not specified.
@@ -374,10 +374,10 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startGeneralEntity(String name, XMLResourceIdentifier identifier,
+ public void startGeneralEntity(String name, XMLResourceIdentifier identifier,
String encoding, Augmentations augs)
throws XNIException {
-
+
try {
// Only report startEntity if this entity was actually read.
if (augs != null && Boolean.TRUE.equals(augs.getItem(Constants.ENTITY_SKIPPED))) {
@@ -453,14 +453,14 @@
// SAX1
if (fDocumentHandler != null) {
// REVISIT: should we support schema-normalized-value for SAX1 events
- //
+ //
fAttributesProxy.setAttributes(attributes);
fDocumentHandler.startElement(element.rawname, fAttributesProxy);
}
// SAX2
- if (fContentHandler != null) {
-
+ if (fContentHandler != null) {
+
if (fNamespaces) {
// send prefix mapping events
startNamespaceMapping();
@@ -474,8 +474,8 @@
int len = attributes.getLength();
if (!fNamespacePrefixes) {
for (int i = len - 1; i >= 0; --i) {
- attributes.getName(i, fQName);
- if ((fQName.prefix == XMLSymbols.PREFIX_XMLNS) ||
+ attributes.getName(i, fQName);
+ if ((fQName.prefix == XMLSymbols.PREFIX_XMLNS) ||
(fQName.rawname == XMLSymbols.PREFIX_XMLNS)) {
// remove namespace declaration attributes
attributes.removeAttributeAt(i);
@@ -484,8 +484,8 @@
}
else if (!fXMLNSURIs) {
for (int i = len - 1; i >= 0; --i) {
- attributes.getName(i, fQName);
- if ((fQName.prefix == XMLSymbols.PREFIX_XMLNS) ||
+ attributes.getName(i, fQName);
+ if ((fQName.prefix == XMLSymbols.PREFIX_XMLNS) ||
(fQName.rawname == XMLSymbols.PREFIX_XMLNS)) {
// localpart should be empty string as per SAX documentation:
// http://www.saxproject.org/?selected=namespaces
@@ -497,9 +497,9 @@
}
}
}
-
+
fAugmentations = augs;
-
+
String uri = element.uri != null ? element.uri : "";
String localpart = fNamespaces ? element.localpart : "";
fAttributesProxy.setAttributes(attributes);
@@ -522,7 +522,7 @@
* @throws XNIException Thrown by handler to signal an error.
*/
public void characters(XMLString text, Augmentations augs) throws XNIException {
-
+
// if type is union (XML Schema) it is possible that we receive
// character call with empty data
if (text.length == 0) {
@@ -534,7 +534,7 @@
// SAX1
if (fDocumentHandler != null) {
// REVISIT: should we support schema-normalized-value for SAX1 events
- //
+ //
fDocumentHandler.characters(text.ch, text.offset, text.length);
}
@@ -590,7 +590,7 @@
* @throws XNIException Thrown by handler to signal an error.
*/
public void endElement(QName element, Augmentations augs) throws XNIException {
-
+
try {
// SAX1
@@ -607,7 +607,7 @@
element.rawname);
if (fNamespaces) {
endNamespaceMapping();
- }
+ }
}
}
catch (SAXException e) {
@@ -760,7 +760,7 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startExternalSubset(XMLResourceIdentifier identifier,
+ public void startExternalSubset(XMLResourceIdentifier identifier,
Augmentations augs) throws XNIException {
startParameterEntity("[dtd]", null, null, augs);
}
@@ -802,7 +802,7 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startParameterEntity(String name,
+ public void startParameterEntity(String name,
XMLResourceIdentifier identifier,
String encoding, Augmentations augs)
throws XNIException {
@@ -910,7 +910,7 @@
* @param defaultValue The attribute default value, or null if no
* default value is specified.
*
- * @param nonNormalizedDefaultValue The attribute default value with no normalization
+ * @param nonNormalizedDefaultValue The attribute default value with no normalization
* performed, or null if no default value is specified.
* @param augs Additional information that may include infoset
* augmentations.
@@ -932,7 +932,7 @@
return;
}
fDeclaredAttrs.put(elemAttr, Boolean.TRUE);
- if (type.equals("NOTATION") ||
+ if (type.equals("NOTATION") ||
type.equals("ENUMERATION")) {
StringBuffer str = new StringBuffer();
@@ -1002,7 +1002,7 @@
* @param name The name of the entity. Parameter entity names start
* with '%', whereas the name of a general entity is just
* the entity name.
- * @param identifier An object containing all location information
+ * @param identifier An object containing all location information
* pertinent to this entity.
* @param augs Additional information that may include infoset
* augmentations.
@@ -1015,7 +1015,7 @@
// SAX2 extension
if (fDeclHandler != null) {
String publicId = identifier.getPublicId();
- String systemId = fResolveDTDURIs ?
+ String systemId = fResolveDTDURIs ?
identifier.getExpandedSystemId() : identifier.getLiteralSystemId();
fDeclHandler.externalEntityDecl(name, publicId, systemId);
}
@@ -1030,7 +1030,7 @@
* An unparsed entity declaration.
*
* @param name The name of the entity.
- * @param identifier An object containing all location information
+ * @param identifier An object containing all location information
* pertinent to this entity.
* @param notation The name of the notation.
*
@@ -1039,14 +1039,14 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void unparsedEntityDecl(String name, XMLResourceIdentifier identifier,
+ public void unparsedEntityDecl(String name, XMLResourceIdentifier identifier,
String notation,
Augmentations augs) throws XNIException {
try {
// SAX2 extension
if (fDTDHandler != null) {
String publicId = identifier.getPublicId();
- String systemId = fResolveDTDURIs ?
+ String systemId = fResolveDTDURIs ?
identifier.getExpandedSystemId() : identifier.getLiteralSystemId();
fDTDHandler.unparsedEntityDecl(name, publicId, systemId, notation);
}
@@ -1061,7 +1061,7 @@
* A notation declaration
*
* @param name The name of the notation.
- * @param identifier An object containing all location information
+ * @param identifier An object containing all location information
* pertinent to this notation.
* @param augs Additional information that may include infoset
* augmentations.
@@ -1074,7 +1074,7 @@
// SAX1 and SAX2
if (fDTDHandler != null) {
String publicId = identifier.getPublicId();
- String systemId = fResolveDTDURIs ?
+ String systemId = fResolveDTDURIs ?
identifier.getExpandedSystemId() : identifier.getLiteralSystemId();
fDTDHandler.notationDecl(name, publicId, systemId);
}
@@ -1317,7 +1317,7 @@
((EntityResolverWrapper) xmlEntityResolver).getEntityResolver();
}
else if (xmlEntityResolver instanceof EntityResolver2Wrapper) {
- entityResolver =
+ entityResolver =
((EntityResolver2Wrapper) xmlEntityResolver).getEntityResolver();
}
}
@@ -1519,40 +1519,40 @@
final int suffixLength = featureId.length() - Constants.SAX_FEATURE_PREFIX.length();
// http://xml.org/sax/features/namespaces
- if (suffixLength == Constants.NAMESPACES_FEATURE.length() &&
+ if (suffixLength == Constants.NAMESPACES_FEATURE.length() &&
featureId.endsWith(Constants.NAMESPACES_FEATURE)) {
fConfiguration.setFeature(featureId, state);
fNamespaces = state;
return;
}
-
+
// http://xml.org/sax/features/namespace-prefixes
// controls the reporting of raw prefixed names and Namespace
// declarations (xmlns* attributes): when this feature is false
// (the default), raw prefixed names may optionally be reported,
// and xmlns* attributes must not be reported.
//
- if (suffixLength == Constants.NAMESPACE_PREFIXES_FEATURE.length() &&
+ if (suffixLength == Constants.NAMESPACE_PREFIXES_FEATURE.length() &&
featureId.endsWith(Constants.NAMESPACE_PREFIXES_FEATURE)) {
fConfiguration.setFeature(featureId, state);
fNamespacePrefixes = state;
return;
}
-
+
// http://xml.org/sax/features/string-interning
// controls the use of java.lang.String#intern() for strings
// passed to SAX handlers.
//
- if (suffixLength == Constants.STRING_INTERNING_FEATURE.length() &&
+ if (suffixLength == Constants.STRING_INTERNING_FEATURE.length() &&
featureId.endsWith(Constants.STRING_INTERNING_FEATURE)) {
if (!state) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"false-not-supported", new Object [] {featureId}));
}
return;
}
-
+
// http://xml.org/sax/features/lexical-handler/parameter-entities
// controls whether the beginning and end of parameter entities
// will be reported to the LexicalHandler.
@@ -1562,17 +1562,17 @@
fLexicalHandlerParameterEntities = state;
return;
}
-
+
// http://xml.org/sax/features/resolve-dtd-uris
// controls whether system identifiers will be absolutized relative to
// their base URIs before reporting.
//
- if (suffixLength == Constants.RESOLVE_DTD_URIS_FEATURE.length() &&
+ if (suffixLength == Constants.RESOLVE_DTD_URIS_FEATURE.length() &&
featureId.endsWith(Constants.RESOLVE_DTD_URIS_FEATURE)) {
fResolveDTDURIs = state;
return;
}
-
+
// http://xml.org/sax/features/unicode-normalization-checking
// controls whether Unicode normalization checking is performed
// as per Appendix B of the XML 1.1 specification
@@ -1583,12 +1583,12 @@
// checking is supported -- mrglavas.
if (state) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
- "true-not-supported", new Object [] {featureId}));
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ "true-not-supported", new Object [] {featureId}));
}
return;
}
-
+
// http://xml.org/sax/features/xmlns-uris
// controls whether the parser reports that namespace declaration
// attributes as being in the namespace: http://www.w3.org/2000/xmlns/
@@ -1598,7 +1598,7 @@
fXMLNSURIs = state;
return;
}
-
+
// http://xml.org/sax/features/use-entity-resolver2
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the parser.
@@ -1612,11 +1612,11 @@
}
return;
}
-
+
//
// Read only features.
//
-
+
// http://xml.org/sax/features/is-standalone
// reports whether the document specified a standalone document declaration.
// http://xml.org/sax/features/use-attributes2
@@ -1636,10 +1636,10 @@
(suffixLength == Constants.XML_11_FEATURE.length() &&
featureId.endsWith(Constants.XML_11_FEATURE))) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-read-only", new Object [] {featureId}));
}
-
+
//
// Drop through and perform default processing
@@ -1669,12 +1669,12 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-supported", new Object [] {identifier}));
}
}
@@ -1712,7 +1712,7 @@
// (the default), raw prefixed names may optionally be reported,
// and xmlns* attributes must not be reported.
//
- if (suffixLength == Constants.NAMESPACE_PREFIXES_FEATURE.length() &&
+ if (suffixLength == Constants.NAMESPACE_PREFIXES_FEATURE.length() &&
featureId.endsWith(Constants.NAMESPACE_PREFIXES_FEATURE)) {
boolean state = fConfiguration.getFeature(featureId);
return state;
@@ -1721,11 +1721,11 @@
// controls the use of java.lang.String#intern() for strings
// passed to SAX handlers.
//
- if (suffixLength == Constants.STRING_INTERNING_FEATURE.length() &&
+ if (suffixLength == Constants.STRING_INTERNING_FEATURE.length() &&
featureId.endsWith(Constants.STRING_INTERNING_FEATURE)) {
return true;
}
-
+
// http://xml.org/sax/features/is-standalone
// reports whether the document specified a standalone document declaration.
//
@@ -1733,7 +1733,7 @@
featureId.endsWith(Constants.IS_STANDALONE_FEATURE)) {
return fStandalone;
}
-
+
// http://xml.org/sax/features/xml-1.1
// reports whether the parser supports both XML 1.1 and XML 1.0.
//
@@ -1741,7 +1741,7 @@
featureId.endsWith(Constants.XML_11_FEATURE)) {
return (fConfiguration instanceof XML11Configurable);
}
-
+
// http://xml.org/sax/features/lexical-handler/parameter-entities
// controls whether the beginning and end of parameter entities
// will be reported to the LexicalHandler.
@@ -1750,15 +1750,15 @@
featureId.endsWith(Constants.LEXICAL_HANDLER_PARAMETER_ENTITIES_FEATURE)) {
return fLexicalHandlerParameterEntities;
}
-
+
// http://xml.org/sax/features/resolve-dtd-uris
// controls whether system identifiers will be absolutized relative to
// their base URIs before reporting.
- if (suffixLength == Constants.RESOLVE_DTD_URIS_FEATURE.length() &&
+ if (suffixLength == Constants.RESOLVE_DTD_URIS_FEATURE.length() &&
featureId.endsWith(Constants.RESOLVE_DTD_URIS_FEATURE)) {
return fResolveDTDURIs;
}
-
+
// http://xml.org/sax/features/xmlns-uris
// controls whether the parser reports that namespace declaration
// attributes as being in the namespace: http://www.w3.org/2000/xmlns/
@@ -1767,7 +1767,7 @@
featureId.endsWith(Constants.XMLNS_URIS_FEATURE)) {
return fXMLNSURIs;
}
-
+
// http://xml.org/sax/features/unicode-normalization-checking
// controls whether Unicode normalization checking is performed
// as per Appendix B of the XML 1.1 specification
@@ -1778,7 +1778,7 @@
// checking is supported -- mrglavas.
return false;
}
-
+
// http://xml.org/sax/features/use-entity-resolver2
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the parser.
@@ -1787,7 +1787,7 @@
featureId.endsWith(Constants.USE_ENTITY_RESOLVER2_FEATURE)) {
return fUseEntityResolver2;
}
-
+
// http://xml.org/sax/features/use-attributes2
// reports whether Attributes objects passed to startElement also implement
// the org.xml.sax.ext.Attributes2 interface.
@@ -1800,8 +1800,8 @@
(suffixLength == Constants.USE_LOCATOR2_FEATURE.length() &&
featureId.endsWith(Constants.USE_LOCATOR2_FEATURE))) {
return true;
- }
-
+ }
+
//
// Drop through and perform default processing
@@ -1826,12 +1826,12 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-supported", new Object [] {identifier}));
}
}
@@ -1870,14 +1870,14 @@
// Access: read/write, pre-parse only
// Set the lexical event handler.
//
- if (suffixLength == Constants.LEXICAL_HANDLER_PROPERTY.length() &&
+ if (suffixLength == Constants.LEXICAL_HANDLER_PROPERTY.length() &&
propertyId.endsWith(Constants.LEXICAL_HANDLER_PROPERTY)) {
try {
setLexicalHandler((LexicalHandler)value);
}
catch (ClassCastException e) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"incompatible-class", new Object [] {propertyId, "org.xml.sax.ext.LexicalHandler"}));
}
return;
@@ -1888,14 +1888,14 @@
// Access: read/write, pre-parse only
// Set the DTD declaration event handler.
//
- if (suffixLength == Constants.DECLARATION_HANDLER_PROPERTY.length() &&
+ if (suffixLength == Constants.DECLARATION_HANDLER_PROPERTY.length() &&
propertyId.endsWith(Constants.DECLARATION_HANDLER_PROPERTY)) {
try {
setDeclHandler((DeclHandler)value);
}
catch (ClassCastException e) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"incompatible-class", new Object [] {propertyId, "org.xml.sax.ext.DeclHandler"}));
}
return;
@@ -1912,14 +1912,14 @@
// http://xml.org/sax/properties/document-xml-version
// Value type: java.lang.String
// Access: read-only
- // The literal string describing the actual XML version of the document.
+ // The literal string describing the actual XML version of the document.
//
- if ((suffixLength == Constants.DOM_NODE_PROPERTY.length() &&
+ if ((suffixLength == Constants.DOM_NODE_PROPERTY.length() &&
propertyId.endsWith(Constants.DOM_NODE_PROPERTY)) ||
(suffixLength == Constants.DOCUMENT_XML_VERSION_PROPERTY.length() &&
propertyId.endsWith(Constants.DOCUMENT_XML_VERSION_PROPERTY))) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-read-only", new Object [] {propertyId}));
}
//
@@ -1949,12 +1949,12 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-supported", new Object [] {identifier}));
}
}
@@ -1990,20 +1990,20 @@
// http://xml.org/sax/properties/document-xml-version
// Value type: java.lang.String
// Access: read-only
- // The literal string describing the actual XML version of the document.
+ // The literal string describing the actual XML version of the document.
//
if (suffixLength == Constants.DOCUMENT_XML_VERSION_PROPERTY.length() &&
propertyId.endsWith(Constants.DOCUMENT_XML_VERSION_PROPERTY)) {
return fVersion;
}
-
+
//
// http://xml.org/sax/properties/lexical-handler
// Value type: org.xml.sax.ext.LexicalHandler
// Access: read/write, pre-parse only
// Set the lexical event handler.
//
- if (suffixLength == Constants.LEXICAL_HANDLER_PROPERTY.length() &&
+ if (suffixLength == Constants.LEXICAL_HANDLER_PROPERTY.length() &&
propertyId.endsWith(Constants.LEXICAL_HANDLER_PROPERTY)) {
return getLexicalHandler();
}
@@ -2013,11 +2013,11 @@
// Access: read/write, pre-parse only
// Set the DTD declaration event handler.
//
- if (suffixLength == Constants.DECLARATION_HANDLER_PROPERTY.length() &&
+ if (suffixLength == Constants.DECLARATION_HANDLER_PROPERTY.length() &&
propertyId.endsWith(Constants.DECLARATION_HANDLER_PROPERTY)) {
return getDeclHandler();
}
-
+
//
// http://xml.org/sax/properties/dom-node
// Value type: DOM Node
@@ -2028,14 +2028,14 @@
// node, it should return null (this is a good way to check for
// availability before the parse begins).
//
- if (suffixLength == Constants.DOM_NODE_PROPERTY.length() &&
+ if (suffixLength == Constants.DOM_NODE_PROPERTY.length() &&
propertyId.endsWith(Constants.DOM_NODE_PROPERTY)) {
// we are not iterating a DOM tree
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"dom-node-read-not-supported", null));
}
-
+
//
// Drop through and perform default processing
//
@@ -2063,12 +2063,12 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-supported", new Object [] {identifier}));
}
}
@@ -2099,7 +2099,7 @@
if (fParseInProgress) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-parsing-supported",
new Object [] {"http://xml.org/sax/properties/declaration-handler"}));
}
@@ -2135,7 +2135,7 @@
if (fParseInProgress) {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-parsing-supported",
new Object [] {"http://xml.org/sax/properties/lexical-handler"}));
}
@@ -2164,12 +2164,12 @@
for (int i = 0; i < count; i++) {
prefix = fNamespaceContext.getDeclaredPrefixAt(i);
uri = fNamespaceContext.getURI(prefix);
- fContentHandler.startPrefixMapping(prefix,
+ fContentHandler.startPrefixMapping(prefix,
(uri == null) ? "" : uri);
}
}
}
-
+
/**
* Send endPrefixMapping events
*/
@@ -2181,7 +2181,7 @@
}
}
}
-
+
//
// XMLDocumentParser methods
//
@@ -2200,11 +2200,11 @@
fStandalone = false;
// features
- fNamespaces = fConfiguration.getFeature(NAMESPACES);
+ fNamespaces = fConfiguration.getFeature(NAMESPACES);
fNamespacePrefixes = fConfiguration.getFeature(NAMESPACE_PREFIXES);
fAugmentations = null;
fDeclaredAttrs = null;
-
+
} // reset()
//
@@ -2341,7 +2341,7 @@
return uri.equals("") ? fAttributes.getIndex(null, localPart) :
fAttributes.getIndex(uri, localPart);
}
-
+
// Attributes2 methods
// REVISIT: Localize exception messages. -- mrglavas
public boolean isDeclared(int index) {
@@ -2352,7 +2352,7 @@
fAttributes.getAugmentations(index).getItem(
Constants.ATTRIBUTE_DECLARED));
}
-
+
public boolean isDeclared(String qName) {
int index = getIndex(qName);
if (index == -1) {
@@ -2362,7 +2362,7 @@
fAttributes.getAugmentations(index).getItem(
Constants.ATTRIBUTE_DECLARED));
}
-
+
public boolean isDeclared(String uri, String localName) {
int index = getIndex(uri, localName);
if (index == -1) {
@@ -2372,14 +2372,14 @@
fAttributes.getAugmentations(index).getItem(
Constants.ATTRIBUTE_DECLARED));
}
-
+
public boolean isSpecified(int index) {
if (index < 0 || index >= fAttributes.getLength()) {
throw new ArrayIndexOutOfBoundsException(index);
}
return fAttributes.isSpecified(index);
}
-
+
public boolean isSpecified(String qName) {
int index = getIndex(qName);
if (index == -1) {
@@ -2387,7 +2387,7 @@
}
return fAttributes.isSpecified(index);
}
-
+
public boolean isSpecified(String uri, String localName) {
int index = getIndex(uri, localName);
if (index == -1) {
@@ -2412,7 +2412,7 @@
}
- public AttributePSVI getAttributePSVIByName(String uri,
+ public AttributePSVI getAttributePSVIByName(String uri,
String localname){
return (AttributePSVI)fAttributesProxy.fAttributes.getAugmentations(uri, localname).getItem(Constants.ATTRIBUTE_PSVI);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/BasicParserConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -52,21 +52,21 @@
* features and properties.
*
* The basic parser configuration does not mandate
- * any particular pipeline configuration or the use of specific
+ * any particular pipeline configuration or the use of specific
* components except for the symbol table. If even this is too much
* for a basic parser configuration, the programmer can create a new
- * configuration class that implements the
+ * configuration class that implements the
* XMLParserConfiguration
interface.
*
* Subclasses of the basic parser configuration can add their own
* recognized features and properties by calling the
- * addRecognizedFeature
and
+ * addRecognizedFeature
and
* addRecognizedProperty
methods, respectively.
*
* The basic parser configuration assumes that the configuration
* will be made up of various parser components that implement the
* XMLComponent
interface. If subclasses of this
- * configuration create their own components for use in the
+ * configuration create their own components for use in the
* parser configuration, then each component should be added to
* the list of components by calling the addComponent
* method. The basic parser configuration will make sure to call
@@ -109,35 +109,35 @@
/** Feature identifier: validation. */
protected static final String VALIDATION =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
+
/** Feature identifier: namespaces. */
protected static final String NAMESPACES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
+
/** Feature identifier: external general entities. */
protected static final String EXTERNAL_GENERAL_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
+
/** Feature identifier: external parameter entities. */
protected static final String EXTERNAL_PARAMETER_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
+
// property identifiers
/** Property identifier: xml string. */
- protected static final String XML_STRING =
+ protected static final String XML_STRING =
Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
/** Property identifier: symbol table. */
- protected static final String SYMBOL_TABLE =
+ protected static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
/** Property identifier: error handler. */
- protected static final String ERROR_HANDLER =
+ protected static final String ERROR_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
/** Property identifier: entity resolver. */
- protected static final String ENTITY_RESOLVER =
+ protected static final String ENTITY_RESOLVER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
//
@@ -169,7 +169,7 @@
/** The DTD content model handler. */
protected XMLDTDContentModelHandler fDTDContentModelHandler;
- /** Last component in the document pipeline */
+ /** Last component in the document pipeline */
protected XMLDocumentSource fLastComponent;
//
@@ -181,8 +181,8 @@
this(null, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -190,7 +190,7 @@
this(symbolTable, null);
} // (SymbolTable)
- /**
+ /**
* Constructs a parser configuration using the specified symbol table
* and parent settings.
*
@@ -210,25 +210,25 @@
// add default recognized features
final String[] recognizedFeatures = {
- PARSER_SETTINGS,
- VALIDATION,
- NAMESPACES,
- EXTERNAL_GENERAL_ENTITIES,
+ PARSER_SETTINGS,
+ VALIDATION,
+ NAMESPACES,
+ EXTERNAL_GENERAL_ENTITIES,
EXTERNAL_PARAMETER_ENTITIES,
};
addRecognizedFeatures(recognizedFeatures);
fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
// set state for default features
- fFeatures.put(VALIDATION, Boolean.FALSE);
- fFeatures.put(NAMESPACES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
+ fFeatures.put(VALIDATION, Boolean.FALSE);
+ fFeatures.put(NAMESPACES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
// add default recognized properties
final String[] recognizedProperties = {
- XML_STRING,
+ XML_STRING,
SYMBOL_TABLE,
- ERROR_HANDLER,
+ ERROR_HANDLER,
ENTITY_RESOLVER,
};
addRecognizedProperties(recognizedProperties);
@@ -241,7 +241,7 @@
} // (SymbolTable)
- /**
+ /**
* Adds a component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -259,7 +259,7 @@
// register component's recognized features
String[] recognizedFeatures = component.getRecognizedFeatures();
addRecognizedFeatures(recognizedFeatures);
-
+
// register component's recognized properties
String[] recognizedProperties = component.getRecognizedProperties();
addRecognizedProperties(recognizedProperties);
@@ -302,25 +302,25 @@
* document.
*
* This method is synchronous: it will not return until parsing
- * has ended. If a client application wants to terminate
+ * has ended. If a client application wants to terminate
* parsing early, it should throw an exception.
*
* @param inputSource The input source for the top-level of the
* XML document.
*
- * @exception XNIException Any XNI exception, possibly wrapping
+ * @exception XNIException Any XNI exception, possibly wrapping
* another exception.
* @exception IOException An IO exception from the parser, possibly
* from a byte stream or character stream
* supplied by the parser.
*/
- public abstract void parse(XMLInputSource inputSource)
+ public abstract void parse(XMLInputSource inputSource)
throws XNIException, IOException;
/**
* Sets the document handler on the last component in the pipeline
* to receive information about the document.
- *
+ *
* @param documentHandler The document handler.
*/
public void setDocumentHandler(XMLDocumentHandler documentHandler) {
@@ -340,7 +340,7 @@
/**
* Sets the DTD handler.
- *
+ *
* @param dtdHandler The DTD handler.
*/
public void setDTDHandler(XMLDTDHandler dtdHandler) {
@@ -354,7 +354,7 @@
/**
* Sets the DTD content model handler.
- *
+ *
* @param handler The DTD content model handler.
*/
public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
@@ -404,7 +404,7 @@
* handler immediately.
*
* @param errorHandler The error handler.
- * @exception java.lang.NullPointerException If the handler
+ * @exception java.lang.NullPointerException If the handler
* argument is null.
* @see #getErrorHandler
*/
@@ -454,9 +454,9 @@
/**
* setProperty
- *
- * @param propertyId
- * @param value
+ *
+ * @param propertyId
+ * @param value
*/
public void setProperty(String propertyId, Object value)
throws XMLConfigurationException {
@@ -522,8 +522,8 @@
// special cases
if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
- final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
-
+ final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
+
//
// http://xml.org/sax/properties/xml-string
// Value type: String
@@ -534,7 +534,7 @@
// null (this is a good way to check for availability before the
// parse begins).
//
- if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
+ if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
propertyId.endsWith(Constants.XML_STRING_PROPERTY)) {
// REVISIT - we should probably ask xml-dev for a precise
// definition of what this is actually supposed to return, and
@@ -547,8 +547,8 @@
return super.checkProperty(propertyId);
} // checkProperty(String)
-
-
+
+
/**
* Check a feature. If feature is know and supported, this method simply
* returns. Otherwise, the appropriate exception is thrown.
@@ -573,7 +573,7 @@
//
// special performance feature: no one by component manager is allowed to set it
//
- if (suffixLength == Constants.PARSER_SETTINGS.length() &&
+ if (suffixLength == Constants.PARSER_SETTINGS.length() &&
featureId.endsWith(Constants.PARSER_SETTINGS)) {
return FeatureState.NOT_SUPPORTED;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParser.java Wed May 02 13:32:36 2012 +0100
@@ -64,9 +64,9 @@
//
// Constants
//
-
+
// features
-
+
/** Feature identifier: EntityResolver2. */
protected static final String USE_ENTITY_RESOLVER2 =
Constants.SAX_FEATURE_PREFIX + Constants.USE_ENTITY_RESOLVER2_FEATURE;
@@ -78,7 +78,7 @@
private static final String[] RECOGNIZED_FEATURES = {
REPORT_WHITESPACE
};
-
+
// properties
/** Property identifier: symbol table. */
@@ -94,13 +94,13 @@
SYMBOL_TABLE,
XMLGRAMMAR_POOL,
};
-
+
//
// Data
//
-
+
// features
-
+
/** Use EntityResolver2. */
protected boolean fUseEntityResolver2 = true;
@@ -135,10 +135,7 @@
* grammar pool.
*/
public DOMParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
// set properties
fConfiguration.addRecognizedProperties(RECOGNIZED_PROPERTIES);
@@ -335,7 +332,7 @@
((EntityResolverWrapper) xmlEntityResolver).getEntityResolver();
}
else if (xmlEntityResolver instanceof EntityResolver2Wrapper) {
- entityResolver =
+ entityResolver =
((EntityResolver2Wrapper) xmlEntityResolver).getEntityResolver();
}
}
@@ -427,7 +424,7 @@
throws SAXNotRecognizedException, SAXNotSupportedException {
try {
-
+
// http://xml.org/sax/features/use-entity-resolver2
// controls whether the methods of an object implementing
// org.xml.sax.ext.EntityResolver2 will be used by the parser.
@@ -440,23 +437,23 @@
}
return;
}
-
+
//
// Default handling
//
-
+
fConfiguration.setFeature(featureId, state);
}
catch (XMLConfigurationException e) {
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-supported", new Object [] {identifier}));
}
}
@@ -489,23 +486,23 @@
if (featureId.equals(USE_ENTITY_RESOLVER2)) {
return fUseEntityResolver2;
}
-
+
//
// Default handling
//
-
+
return fConfiguration.getFeature(featureId);
}
catch (XMLConfigurationException e) {
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"feature-not-supported", new Object [] {identifier}));
}
}
@@ -537,12 +534,12 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-supported", new Object [] {identifier}));
}
}
@@ -588,19 +585,19 @@
String identifier = e.getIdentifier();
if (e.getType() == Status.NOT_RECOGNIZED) {
throw new SAXNotRecognizedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-recognized", new Object [] {identifier}));
}
else {
throw new SAXNotSupportedException(
- SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
+ SAXMessageFormatter.formatMessage(fConfiguration.getLocale(),
"property-not-supported", new Object [] {identifier}));
}
}
} // getProperty(String):Object
-
- /**
+
+ /**
* Returns this parser's XMLParserConfiguration.
*/
public XMLParserConfiguration getXMLParserConfiguration() {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DOMParserImpl.java Wed May 02 13:32:36 2012 +0100
@@ -55,6 +55,7 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
import com.sun.org.apache.xerces.internal.xni.parser.XMLParseException;
import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration;
+import com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.DOMError;
import org.w3c.dom.DOMErrorHandler;
@@ -100,10 +101,10 @@
/** XML Schema validation */
protected static final String XMLSCHEMA =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE;
-
+
/** XML Schema full checking */
protected static final String XMLSCHEMA_FULL_CHECKING =
- Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
+ Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
/** Dynamic validation */
protected static final String DYNAMIC_VALIDATION =
@@ -139,23 +140,23 @@
/** Include namespace declaration attributes in the document. **/
protected boolean fNamespaceDeclarations = true;
-
+
// REVISIT: this value should be null by default and should be set during creation of
// LSParser
protected String fSchemaType = null;
protected boolean fBusy = false;
-
+
private boolean abortNow = false;
-
+
private Thread currentThread;
protected final static boolean DEBUG = false;
private Vector fSchemaLocations = new Vector ();
private String fSchemaLocation = null;
- private DOMStringList fRecognizedParameters;
-
+ private DOMStringList fRecognizedParameters;
+
private AbortHandler abortHandler = null;
//
@@ -165,18 +166,15 @@
/**
* Constructs a DOM Builder using the standard parser configuration.
*/
- public DOMParserImpl (String configuration, String schemaType) {
- this (
- (XMLParserConfiguration) ObjectFactory.createObject (
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- configuration));
+ public DOMParserImpl (XMLParserConfiguration config, String schemaType) {
+ this (config);
if (schemaType != null) {
if (schemaType.equals (Constants.NS_DTD)) {
//Schema validation is false by default and hence there is no
- //need to set it to false here. Also, schema validation is
- //not a recognized feature for DTDConfiguration's and so
- //setting this feature here would result in a Configuration
- //Exception.
+ //need to set it to false here. Also, schema validation is
+ //not a recognized feature for DTDConfiguration's and so
+ //setting this feature here would result in a Configuration
+ //Exception.
fConfiguration.setProperty (
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE,
Constants.NS_DTD);
@@ -231,7 +229,7 @@
fConfiguration.setFeature(INCLUDE_COMMENTS_FEATURE, true);
fConfiguration.setFeature(INCLUDE_IGNORABLE_WHITESPACE, true);
fConfiguration.setFeature(NAMESPACES, true);
-
+
fConfiguration.setFeature(DYNAMIC_VALIDATION, false);
fConfiguration.setFeature(CREATE_ENTITY_REF_NODES, false);
fConfiguration.setFeature(CREATE_CDATA_NODES_FEATURE, false);
@@ -254,17 +252,14 @@
fConfiguration.setFeature ( NORMALIZE_DATA, false );
}
catch (XMLConfigurationException exc) {}
-
+
} // (XMLParserConfiguration)
/**
* Constructs a DOM Builder using the specified symbol table.
*/
public DOMParserImpl (SymbolTable symbolTable) {
- this (
- (XMLParserConfiguration) ObjectFactory.createObject (
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"));
+ this (new XIncludeAwareParserConfiguration());
fConfiguration.setProperty (
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY,
symbolTable);
@@ -276,10 +271,7 @@
* grammar pool.
*/
public DOMParserImpl (SymbolTable symbolTable, XMLGrammarPool grammarPool) {
- this (
- (XMLParserConfiguration) ObjectFactory.createObject (
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"));
+ this (new XIncludeAwareParserConfiguration());
fConfiguration.setProperty (
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY,
symbolTable);
@@ -296,11 +288,11 @@
*/
public void reset () {
super.reset ();
-
+
// get state of namespace-declarations parameter.
- fNamespaceDeclarations =
+ fNamespaceDeclarations =
fConfiguration.getFeature(Constants.DOM_NAMESPACE_DECLARATIONS);
-
+
// DOM Filter
if (fSkippedElemStack!=null) {
fSkippedElemStack.removeAllElements ();
@@ -355,7 +347,7 @@
*/
public void setParameter (String name, Object value) throws DOMException {
// set features
-
+
if(value instanceof Boolean){
boolean state = ((Boolean)value).booleanValue ();
try {
@@ -391,7 +383,7 @@
else if (name.equalsIgnoreCase (Constants.DOM_INFOSET)) {
// Setting false has no effect.
if (state) {
- // true: namespaces, namespace-declarations,
+ // true: namespaces, namespace-declarations,
// comments, element-content-whitespace
fConfiguration.setFeature(NAMESPACES, true);
fConfiguration.setFeature(Constants.DOM_NAMESPACE_DECLARATIONS, true);
@@ -778,10 +770,10 @@
}
public boolean canSetParameter (String name, Object value) {
- if (value == null){
- return true;
- }
-
+ if (value == null){
+ return true;
+ }
+
if(value instanceof Boolean){
boolean state = ((Boolean)value).booleanValue ();
if ( name.equalsIgnoreCase (Constants.DOM_SUPPORTED_MEDIATYPES_ONLY)
@@ -875,40 +867,40 @@
public DOMStringList getParameterNames () {
if (fRecognizedParameters == null){
Vector parameters = new Vector();
-
+
// REVISIT: add Xerces recognized properties/features
parameters.add(Constants.DOM_NAMESPACES);
parameters.add(Constants.DOM_CDATA_SECTIONS);
parameters.add(Constants.DOM_CANONICAL_FORM);
parameters.add(Constants.DOM_NAMESPACE_DECLARATIONS);
parameters.add(Constants.DOM_SPLIT_CDATA);
-
+
parameters.add(Constants.DOM_ENTITIES);
parameters.add(Constants.DOM_VALIDATE_IF_SCHEMA);
parameters.add(Constants.DOM_VALIDATE);
parameters.add(Constants.DOM_DATATYPE_NORMALIZATION);
-
+
parameters.add(Constants.DOM_CHARSET_OVERRIDES_XML_ENCODING);
parameters.add(Constants.DOM_CHECK_CHAR_NORMALIZATION);
parameters.add(Constants.DOM_SUPPORTED_MEDIATYPES_ONLY);
parameters.add(Constants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS);
-
+
parameters.add(Constants.DOM_NORMALIZE_CHARACTERS);
parameters.add(Constants.DOM_WELLFORMED);
parameters.add(Constants.DOM_INFOSET);
parameters.add(Constants.DOM_DISALLOW_DOCTYPE);
parameters.add(Constants.DOM_ELEMENT_CONTENT_WHITESPACE);
parameters.add(Constants.DOM_COMMENTS);
-
+
parameters.add(Constants.DOM_ERROR_HANDLER);
parameters.add(Constants.DOM_RESOURCE_RESOLVER);
parameters.add(Constants.DOM_SCHEMA_LOCATION);
parameters.add(Constants.DOM_SCHEMA_TYPE);
-
+
fRecognizedParameters = new DOMStringListImpl(parameters);
-
+
}
-
+
return fRecognizedParameters;
}
@@ -932,11 +924,11 @@
XMLInputSource source = new XMLInputSource (null, uri, null);
try {
currentThread = Thread.currentThread();
- fBusy = true;
+ fBusy = true;
parse (source);
fBusy = false;
if (abortNow && currentThread.isInterrupted()) {
- //reset interrupt state
+ //reset interrupt state
abortNow = false;
Thread.interrupted();
}
@@ -989,11 +981,11 @@
try {
currentThread = Thread.currentThread();
- fBusy = true;
+ fBusy = true;
parse (xmlInputSource);
- fBusy = false;
+ fBusy = false;
if (abortNow && currentThread.isInterrupted()) {
- //reset interrupt state
+ //reset interrupt state
abortNow = false;
Thread.interrupted();
}
@@ -1091,12 +1083,12 @@
"UTF-16");
}
// otherwise, just use the public/system/base Ids
- else if ((is.getSystemId() != null && is.getSystemId().length() > 0) ||
+ else if ((is.getSystemId() != null && is.getSystemId().length() > 0) ||
(is.getPublicId() != null && is.getPublicId().length() > 0)) {
xis = new XMLInputSource (is.getPublicId (), is.getSystemId (),
is.getBaseURI ());
}
- else {
+ else {
// all inputs are null
if (fErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl();
@@ -1139,12 +1131,12 @@
fConfiguration.setDocumentHandler(abortHandler);
fConfiguration.setDTDHandler(abortHandler);
fConfiguration.setDTDContentModelHandler(abortHandler);
-
+
if(currentThread == Thread.currentThread())
throw Abort.INSTANCE;
-
+
currentThread.interrupt();
- }
+ }
}
return; // If not busy then this is noop
}
@@ -1174,7 +1166,7 @@
}
super.startElement(element, attributes, augs);
}
-
+
private class AbortHandler implements XMLDocumentHandler, XMLDTDHandler, XMLDTDContentModelHandler {
private XMLDocumentSource documentSource;
@@ -1376,7 +1368,7 @@
public XMLDTDContentModelSource getDTDContentModelSource() {
return dtdContentSource;
}
-
+
}
private static DOMException newFeatureNotFoundError(String name) {
@@ -1396,5 +1388,5 @@
new Object[] { name });
return new DOMException (DOMException.TYPE_MISMATCH_ERR, msg);
}
-
+
} // class DOMParserImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/DTDConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -55,11 +55,11 @@
* to DTD-centric validation. Since
* the Xerces2 reference implementation document and DTD scanner
* implementations are capable of acting as pull parsers, this
- * configuration implements the
+ * configuration implements the
* XMLPullParserConfiguration
interface.
*
* In addition to the features and properties recognized by the base
- * parser configuration, this class recognizes these additional
+ * parser configuration, this class recognizes these additional
* features and properties:
*
* - Features
@@ -89,7 +89,7 @@
* @version $Id: DTDConfiguration.java,v 1.7 2010-11-01 04:40:09 joehw Exp $
*/
public class DTDConfiguration
- extends BasicParserConfiguration
+ extends BasicParserConfiguration
implements XMLPullParserConfiguration {
//
@@ -105,17 +105,17 @@
/** Feature identifier: warn on duplicate entity definition. */
protected static final String WARN_ON_DUPLICATE_ENTITYDEF =
Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE;
-
+
/** Feature identifier: warn on undeclared element definition. */
protected static final String WARN_ON_UNDECLARED_ELEMDEF =
Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE;
-
+
/** Feature identifier: allow Java encodings. */
- protected static final String ALLOW_JAVA_ENCODINGS =
+ protected static final String ALLOW_JAVA_ENCODINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-
+
/** Feature identifier: continue after fatal error. */
- protected static final String CONTINUE_AFTER_FATAL_ERROR =
+ protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
/** Feature identifier: load external DTD. */
@@ -125,40 +125,40 @@
/** Feature identifier: notify built-in refereces. */
protected static final String NOTIFY_BUILTIN_REFS =
Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_BUILTIN_REFS_FEATURE;
-
+
/** Feature identifier: notify character refereces. */
protected static final String NOTIFY_CHAR_REFS =
Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;
-
+
// property identifiers
/** Property identifier: error reporter. */
- protected static final String ERROR_REPORTER =
+ protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
/** Property identifier: entity manager. */
- protected static final String ENTITY_MANAGER =
+ protected static final String ENTITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+
/** Property identifier document scanner: */
- protected static final String DOCUMENT_SCANNER =
+ protected static final String DOCUMENT_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DOCUMENT_SCANNER_PROPERTY;
/** Property identifier: DTD scanner. */
- protected static final String DTD_SCANNER =
+ protected static final String DTD_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_SCANNER_PROPERTY;
/** Property identifier: grammar pool. */
- protected static final String XMLGRAMMAR_POOL =
+ protected static final String XMLGRAMMAR_POOL =
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
-
+
/** Property identifier: DTD loader. */
- protected static final String DTD_PROCESSOR =
+ protected static final String DTD_PROCESSOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_PROCESSOR_PROPERTY;
/** Property identifier: DTD validator. */
- protected static final String DTD_VALIDATOR =
+ protected static final String DTD_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_VALIDATOR_PROPERTY;
/** Property identifier: namespace binder. */
@@ -166,12 +166,12 @@
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_BINDER_PROPERTY;
/** Property identifier: datatype validator factory. */
- protected static final String DATATYPE_VALIDATOR_FACTORY =
+ protected static final String DATATYPE_VALIDATOR_FACTORY =
Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
protected static final String VALIDATION_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.VALIDATION_MANAGER_PROPERTY;
-
+
/** Property identifier: JAXP schema language / DOM schema-type. */
protected static final String JAXP_SCHEMA_LANGUAGE =
Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE;
@@ -233,7 +233,7 @@
/** Locator */
protected XMLLocator fLocator;
- /**
+ /**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
* validation and namespaces).
@@ -249,8 +249,8 @@
this(null, null, null);
} //
()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -262,7 +262,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -278,7 +278,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -299,7 +299,7 @@
CONTINUE_AFTER_FATAL_ERROR,
LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
//NOTIFY_BUILTIN_REFS, // from XMLDocumentFragmentScannerImpl
- //NOTIFY_CHAR_REFS, // from XMLDocumentFragmentScannerImpl
+ //NOTIFY_CHAR_REFS, // from XMLDocumentFragmentScannerImpl
//WARN_ON_DUPLICATE_ENTITYDEF, // from XMLEntityManager
};
addRecognizedFeatures(recognizedFeatures);
@@ -316,14 +316,14 @@
// add default recognized properties
final String[] recognizedProperties = {
- ERROR_REPORTER,
- ENTITY_MANAGER,
+ ERROR_REPORTER,
+ ENTITY_MANAGER,
DOCUMENT_SCANNER,
DTD_SCANNER,
DTD_PROCESSOR,
DTD_VALIDATOR,
NAMESPACE_BINDER,
- XMLGRAMMAR_POOL,
+ XMLGRAMMAR_POOL,
DATATYPE_VALIDATOR_FACTORY,
VALIDATION_MANAGER,
JAXP_SCHEMA_SOURCE,
@@ -379,7 +379,7 @@
setProperty(NAMESPACE_BINDER, fNamespaceBinder);
addComponent(fNamespaceBinder);
}
-
+
fDatatypeValidatorFactory = createDatatypeValidatorFactory();
if (fDatatypeValidatorFactory != null) {
setProperty(DATATYPE_VALIDATOR_FACTORY,
@@ -452,7 +452,7 @@
*
* @param inputSource The document's input source.
*
- * @exception XMLConfigurationException Thrown if there is a
+ * @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* @exception IOException Thrown on I/O error.
@@ -461,14 +461,14 @@
*/
public void setInputSource(XMLInputSource inputSource)
throws XMLConfigurationException, IOException {
-
+
// REVISIT: this method used to reset all the components and
// construct the pipeline. Now reset() is called
// in parse (boolean) just before we parse the document
// Should this method still throw exceptions..?
fInputSource = inputSource;
-
+
} // setInputSource(XMLInputSource)
/**
@@ -479,7 +479,7 @@
*
* @return True if there is more document to parse.
*
- * @exception XNIException Any XNI exception, possibly wrapping
+ * @exception XNIException Any XNI exception, possibly wrapping
* another exception.
* @exception IOException An IO exception from the parser, possibly
* from a byte stream or character stream
@@ -496,17 +496,17 @@
reset();
fScanner.setInputSource(fInputSource);
fInputSource = null;
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (RuntimeException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -521,17 +521,17 @@
try {
return fScanner.scanDocument(complete);
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (RuntimeException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -553,7 +553,7 @@
public void cleanup() {
fEntityManager.closeReaders();
}
-
+
//
// XMLParserConfiguration methods
//
@@ -577,12 +577,12 @@
try {
setInputSource(source);
parse(true);
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -592,7 +592,7 @@
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (Exception ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -609,9 +609,9 @@
//
// Protected methods
//
-
- /**
- * Reset all components before parsing.
+
+ /**
+ * Reset all components before parsing.
*
* @throws XNIException Thrown if an error occurs during initialization.
*/
@@ -625,54 +625,54 @@
} // reset()
/** Configures the pipeline. */
- protected void configurePipeline() {
+ protected void configurePipeline() {
- // REVISIT: This should be better designed. In other words, we
- // need to figure out what is the best way for people to
- // re-use *most* of the standard configuration but do
- // things common things such as remove a component (e.g.
- // the validator), insert a new component (e.g. XInclude),
- // etc... -Ac
+ // REVISIT: This should be better designed. In other words, we
+ // need to figure out what is the best way for people to
+ // re-use *most* of the standard configuration but do
+ // things common things such as remove a component (e.g.
+ // the validator), insert a new component (e.g. XInclude),
+ // etc... -Ac
- // setup document pipeline
- if (fDTDValidator != null) {
- fScanner.setDocumentHandler(fDTDValidator);
- if (fFeatures.get(NAMESPACES) == Boolean.TRUE) {
+ // setup document pipeline
+ if (fDTDValidator != null) {
+ fScanner.setDocumentHandler(fDTDValidator);
+ if (fFeatures.get(NAMESPACES) == Boolean.TRUE) {
- // filters
- fDTDValidator.setDocumentHandler(fNamespaceBinder);
- fDTDValidator.setDocumentSource(fScanner);
- fNamespaceBinder.setDocumentHandler(fDocumentHandler);
- fNamespaceBinder.setDocumentSource(fDTDValidator);
- fLastComponent = fNamespaceBinder;
- }
- else {
- fDTDValidator.setDocumentHandler(fDocumentHandler);
- fDTDValidator.setDocumentSource(fScanner);
- fLastComponent = fDTDValidator;
- }
- }
- else {
- if (fFeatures.get(NAMESPACES) == Boolean.TRUE) {
- fScanner.setDocumentHandler(fNamespaceBinder);
- fNamespaceBinder.setDocumentHandler(fDocumentHandler);
- fNamespaceBinder.setDocumentSource(fScanner);
- fLastComponent = fNamespaceBinder;
- }
- else {
- fScanner.setDocumentHandler(fDocumentHandler);
- fLastComponent = fScanner;
- }
- }
-
+ // filters
+ fDTDValidator.setDocumentHandler(fNamespaceBinder);
+ fDTDValidator.setDocumentSource(fScanner);
+ fNamespaceBinder.setDocumentHandler(fDocumentHandler);
+ fNamespaceBinder.setDocumentSource(fDTDValidator);
+ fLastComponent = fNamespaceBinder;
+ }
+ else {
+ fDTDValidator.setDocumentHandler(fDocumentHandler);
+ fDTDValidator.setDocumentSource(fScanner);
+ fLastComponent = fDTDValidator;
+ }
+ }
+ else {
+ if (fFeatures.get(NAMESPACES) == Boolean.TRUE) {
+ fScanner.setDocumentHandler(fNamespaceBinder);
+ fNamespaceBinder.setDocumentHandler(fDocumentHandler);
+ fNamespaceBinder.setDocumentSource(fScanner);
+ fLastComponent = fNamespaceBinder;
+ }
+ else {
+ fScanner.setDocumentHandler(fDocumentHandler);
+ fLastComponent = fScanner;
+ }
+ }
+
configureDTDPipeline();
- } // configurePipeline()
-
+ } // configurePipeline()
+
protected void configureDTDPipeline (){
-
+
// setup dtd pipeline
if (fDTDScanner != null) {
- fProperties.put(DTD_SCANNER, fDTDScanner);
+ fProperties.put(DTD_SCANNER, fDTDScanner);
if (fDTDProcessor != null) {
fProperties.put(DTD_PROCESSOR, fDTDProcessor);
fDTDScanner.setDTDHandler(fDTDProcessor);
@@ -727,14 +727,14 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/dynamic
// Allows the parser to validate a document only when it
// contains a grammar. Validation is turned on/off based
// on each document instance, automatically.
//
- if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -750,7 +750,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -758,14 +758,14 @@
//
// http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
//
- if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
//
- if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -773,7 +773,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
return FeatureState.NOT_SUPPORTED;
}
@@ -810,7 +810,7 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
+ if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/NonValidatingConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -52,16 +52,16 @@
* configuration with the set of following parser components:
* Document scanner, DTD scanner, namespace binder, document handler.
*
- * Xerces parser that uses this configuration is not conformant
- * non-validating XML processor, since conformant non-validating processor is required
- * to process "all the declarations they read in the internal DTD subset ... must use the information in those declarations to normalize attribute values,
+ * Xerces parser that uses this configuration is not conformant
+ * non-validating XML processor, since conformant non-validating processor is required
+ * to process "all the declarations they read in the internal DTD subset ... must use the information in those declarations to normalize attribute values,
* include the replacement text of internal entities, and supply default attribute values".
- *
+ *
* @author Elena Litani, IBM
* @version $Id: NonValidatingConfiguration.java,v 1.7 2010-11-01 04:40:09 joehw Exp $
*/
public class NonValidatingConfiguration
- extends BasicParserConfiguration
+ extends BasicParserConfiguration
implements XMLPullParserConfiguration {
//
@@ -77,17 +77,17 @@
/** Feature identifier: warn on duplicate entity definition. */
protected static final String WARN_ON_DUPLICATE_ENTITYDEF =
Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE;
-
+
/** Feature identifier: warn on undeclared element definition. */
protected static final String WARN_ON_UNDECLARED_ELEMDEF =
Constants.XERCES_FEATURE_PREFIX + Constants.WARN_ON_UNDECLARED_ELEMDEF_FEATURE;
-
+
/** Feature identifier: allow Java encodings. */
- protected static final String ALLOW_JAVA_ENCODINGS =
+ protected static final String ALLOW_JAVA_ENCODINGS =
Constants.XERCES_FEATURE_PREFIX + Constants.ALLOW_JAVA_ENCODINGS_FEATURE;
-
+
/** Feature identifier: continue after fatal error. */
- protected static final String CONTINUE_AFTER_FATAL_ERROR =
+ protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
/** Feature identifier: load external DTD. */
@@ -97,11 +97,11 @@
/** Feature identifier: notify built-in refereces. */
protected static final String NOTIFY_BUILTIN_REFS =
Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_BUILTIN_REFS_FEATURE;
-
+
/** Feature identifier: notify character refereces. */
protected static final String NOTIFY_CHAR_REFS =
Constants.XERCES_FEATURE_PREFIX + Constants.NOTIFY_CHAR_REFS_FEATURE;
-
+
/** Feature identifier: expose schema normalized value */
protected static final String NORMALIZE_DATA =
@@ -115,27 +115,27 @@
// property identifiers
/** Property identifier: error reporter. */
- protected static final String ERROR_REPORTER =
+ protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
/** Property identifier: entity manager. */
- protected static final String ENTITY_MANAGER =
+ protected static final String ENTITY_MANAGER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY;
-
+
/** Property identifier document scanner: */
- protected static final String DOCUMENT_SCANNER =
+ protected static final String DOCUMENT_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DOCUMENT_SCANNER_PROPERTY;
/** Property identifier: DTD scanner. */
- protected static final String DTD_SCANNER =
+ protected static final String DTD_SCANNER =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_SCANNER_PROPERTY;
/** Property identifier: grammar pool. */
- protected static final String XMLGRAMMAR_POOL =
+ protected static final String XMLGRAMMAR_POOL =
Constants.XERCES_PROPERTY_PREFIX + Constants.XMLGRAMMAR_POOL_PROPERTY;
-
+
/** Property identifier: DTD validator. */
- protected static final String DTD_VALIDATOR =
+ protected static final String DTD_VALIDATOR =
Constants.XERCES_PROPERTY_PREFIX + Constants.DTD_VALIDATOR_PROPERTY;
/** Property identifier: namespace binder. */
@@ -143,7 +143,7 @@
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_BINDER_PROPERTY;
/** Property identifier: datatype validator factory. */
- protected static final String DATATYPE_VALIDATOR_FACTORY =
+ protected static final String DATATYPE_VALIDATOR_FACTORY =
Constants.XERCES_PROPERTY_PREFIX + Constants.DATATYPE_VALIDATOR_FACTORY_PROPERTY;
protected static final String VALIDATION_MANAGER =
@@ -201,12 +201,12 @@
/** Default Xerces implementation of scanner*/
private XMLDocumentScannerImpl fNonNSScanner;
-
-
- /** fConfigUpdated is set to true if there has been any change to the configuration settings,
- * i.e a feature or a property was changed.
- */
- protected boolean fConfigUpdated = false;
+
+
+ /** fConfigUpdated is set to true if there has been any change to the configuration settings,
+ * i.e a feature or a property was changed.
+ */
+ protected boolean fConfigUpdated = false;
// state
@@ -214,7 +214,7 @@
/** Locator */
protected XMLLocator fLocator;
- /**
+ /**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
* validation and namespaces).
@@ -230,8 +230,8 @@
this(null, null, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -243,7 +243,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -259,7 +259,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -273,16 +273,16 @@
super(symbolTable, parentSettings);
// add default recognized features
- final String[] recognizedFeatures = {
- PARSER_SETTINGS,
- NAMESPACES,
+ final String[] recognizedFeatures = {
+ PARSER_SETTINGS,
+ NAMESPACES,
//WARN_ON_DUPLICATE_ATTDEF, // from XMLDTDScannerImpl
//WARN_ON_UNDECLARED_ELEMDEF, // from XMLDTDScannerImpl
//ALLOW_JAVA_ENCODINGS, // from XMLEntityManager
CONTINUE_AFTER_FATAL_ERROR,
//LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
//NOTIFY_BUILTIN_REFS, // from XMLDocumentFragmentScannerImpl
- //NOTIFY_CHAR_REFS, // from XMLDocumentFragmentScannerImpl
+ //NOTIFY_CHAR_REFS, // from XMLDocumentFragmentScannerImpl
//WARN_ON_DUPLICATE_ENTITYDEF // from XMLEntityManager
};
addRecognizedFeatures(recognizedFeatures);
@@ -292,8 +292,8 @@
//setFeature(WARN_ON_UNDECLARED_ELEMDEF, false); // from XMLDTDScannerImpl
//setFeature(ALLOW_JAVA_ENCODINGS, false); // from XMLEntityManager
fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
- fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
- fFeatures.put(NAMESPACES, Boolean.TRUE);
+ fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
+ fFeatures.put(NAMESPACES, Boolean.TRUE);
//setFeature(LOAD_EXTERNAL_DTD, true); // from XMLDTDScannerImpl
//setFeature(NOTIFY_BUILTIN_REFS, false); // from XMLDocumentFragmentScannerImpl
//setFeature(NOTIFY_CHAR_REFS, false); // from XMLDocumentFragmentScannerImpl
@@ -301,31 +301,31 @@
// add default recognized properties
final String[] recognizedProperties = {
- ERROR_REPORTER,
- ENTITY_MANAGER,
+ ERROR_REPORTER,
+ ENTITY_MANAGER,
DOCUMENT_SCANNER,
DTD_SCANNER,
DTD_VALIDATOR,
NAMESPACE_BINDER,
- XMLGRAMMAR_POOL,
+ XMLGRAMMAR_POOL,
DATATYPE_VALIDATOR_FACTORY,
VALIDATION_MANAGER,
LOCALE
};
addRecognizedProperties(recognizedProperties);
-
+
fGrammarPool = grammarPool;
if(fGrammarPool != null){
- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
+ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
}
fEntityManager = createEntityManager();
- fProperties.put(ENTITY_MANAGER, fEntityManager);
+ fProperties.put(ENTITY_MANAGER, fEntityManager);
addComponent(fEntityManager);
fErrorReporter = createErrorReporter();
fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());
- fProperties.put(ERROR_REPORTER, fErrorReporter);
+ fProperties.put(ERROR_REPORTER, fErrorReporter);
addComponent(fErrorReporter);
// this configuration delays creation of the scanner
@@ -333,7 +333,7 @@
fDTDScanner = createDTDScanner();
if (fDTDScanner != null) {
- fProperties.put(DTD_SCANNER, fDTDScanner);
+ fProperties.put(DTD_SCANNER, fDTDScanner);
if (fDTDScanner instanceof XMLComponent) {
addComponent((XMLComponent)fDTDScanner);
}
@@ -341,13 +341,13 @@
fDatatypeValidatorFactory = createDatatypeValidatorFactory();
if (fDatatypeValidatorFactory != null) {
- fProperties.put(DATATYPE_VALIDATOR_FACTORY,
+ fProperties.put(DATATYPE_VALIDATOR_FACTORY,
fDatatypeValidatorFactory);
}
fValidationManager = createValidationManager();
if (fValidationManager != null) {
- fProperties.put(VALIDATION_MANAGER, fValidationManager);
+ fProperties.put(VALIDATION_MANAGER, fValidationManager);
}
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
@@ -355,8 +355,8 @@
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, xmft);
fErrorReporter.putMessageFormatter(XMLMessageFormatter.XMLNS_DOMAIN, xmft);
}
-
- fConfigUpdated = false;
+
+ fConfigUpdated = false;
// set locale
try {
@@ -372,11 +372,11 @@
//
// Public methods
//
- public void setFeature(String featureId, boolean state)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- super.setFeature(featureId, state);
- }
+ public void setFeature(String featureId, boolean state)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ super.setFeature(featureId, state);
+ }
public PropertyState getPropertyState(String propertyId)
throws XMLConfigurationException {
@@ -407,16 +407,16 @@
super.setLocale(locale);
fErrorReporter.setLocale(locale);
} // setLocale(Locale)
-
- public FeatureState getFeatureState(String featureId)
- throws XMLConfigurationException {
- // make this feature special
- if (featureId.equals(PARSER_SETTINGS)){
- return FeatureState.is(fConfigUpdated);
- }
- return super.getFeatureState(featureId);
- } // getFeature(String):boolean
+ public FeatureState getFeatureState(String featureId)
+ throws XMLConfigurationException {
+ // make this feature special
+ if (featureId.equals(PARSER_SETTINGS)){
+ return FeatureState.is(fConfigUpdated);
+ }
+ return super.getFeatureState(featureId);
+
+ } // getFeature(String):boolean
//
// XMLPullParserConfiguration methods
//
@@ -428,7 +428,7 @@
*
* @param inputSource The document's input source.
*
- * @exception XMLConfigurationException Thrown if there is a
+ * @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* @exception IOException Thrown on I/O error.
@@ -437,14 +437,14 @@
*/
public void setInputSource(XMLInputSource inputSource)
throws XMLConfigurationException, IOException {
-
+
// REVISIT: this method used to reset all the components and
// construct the pipeline. Now reset() is called
// in parse (boolean) just before we parse the document
// Should this method still throw exceptions..?
fInputSource = inputSource;
-
+
} // setInputSource(XMLInputSource)
/**
@@ -455,7 +455,7 @@
*
* @return True if there is more document to parse.
*
- * @exception XNIException Any XNI exception, possibly wrapping
+ * @exception XNIException Any XNI exception, possibly wrapping
* another exception.
* @exception IOException An IO exception from the parser, possibly
* from a byte stream or character stream
@@ -472,17 +472,17 @@
reset();
fScanner.setInputSource(fInputSource);
fInputSource = null;
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (RuntimeException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -497,17 +497,17 @@
try {
return fScanner.scanDocument(complete);
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (RuntimeException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -529,7 +529,7 @@
public void cleanup() {
fEntityManager.closeReaders();
}
-
+
//
// XMLParserConfiguration methods
//
@@ -553,12 +553,12 @@
try {
setInputSource(source);
parse(true);
- }
+ }
catch (XNIException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (IOException ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -568,7 +568,7 @@
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
throw ex;
- }
+ }
catch (Exception ex) {
if (PRINT_EXCEPTION_STACK_TRACE)
ex.printStackTrace();
@@ -585,9 +585,9 @@
//
// Protected methods
//
-
- /**
- * Reset all components before parsing.
+
+ /**
+ * Reset all components before parsing.
*
* @throws XNIException Thrown if an error occurs during initialization.
*/
@@ -613,7 +613,7 @@
fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
fNamespaceScanner.setDTDValidator(null);
fScanner = fNamespaceScanner;
- }
+ }
else {
if (fNonNSScanner == null) {
fNonNSScanner = new XMLDocumentScannerImpl();
@@ -657,21 +657,21 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/dynamic
// Allows the parser to validate a document only when it
// contains a grammar. Validation is turned on/off based
// on each document instance, automatically.
//
- if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE.length() &&
+ if (suffixLength == Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE.length() &&
featureId.endsWith(Constants.DEFAULT_ATTRIBUTE_VALUES_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -679,7 +679,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -687,14 +687,14 @@
//
// http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
//
- if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
//
- if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -702,7 +702,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
return FeatureState.NOT_SUPPORTED;
}
@@ -738,8 +738,8 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
-
- if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
+
+ if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
@@ -748,7 +748,7 @@
if (propertyId.startsWith(Constants.JAXP_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.JAXP_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
+ if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
propertyId.endsWith(Constants.SCHEMA_SOURCE)) {
return PropertyState.RECOGNIZED;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/SAXParser.java Wed May 02 13:32:36 2012 +0100
@@ -33,7 +33,7 @@
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
*
- * @version $Id: SAXParser.java,v 1.5 2007/07/19 04:38:54 ofung Exp $
+ * @version $Id: SAXParser.java,v 1.7 2010-11-01 04:40:09 joehw Exp $
*/
public class SAXParser
extends AbstractSAXParser {
@@ -50,7 +50,7 @@
protected static final String REPORT_WHITESPACE =
Constants.SUN_SCHEMA_FEATURE_PREFIX + Constants.SUN_REPORT_IGNORED_ELEMENT_CONTENT_WHITESPACE;
-
+
/** Recognized features. */
private static final String[] RECOGNIZED_FEATURES = {
NOTIFY_BUILTIN_REFS,
@@ -103,10 +103,7 @@
* grammar pool.
*/
public SAXParser(SymbolTable symbolTable, XMLGrammarPool grammarPool) {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
// set features
fConfiguration.addRecognizedFeatures(RECOGNIZED_FEATURES);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/StandardParserConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/StandardParserConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/StandardParserConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -33,13 +33,13 @@
/**
* This is the "standard" parser configuration. It extends the DTD
- * configuration with the standard set of parser components.
+ * configuration with the standard set of parser components.
* The standard set of parser components include those needed
* to parse and validate with DTD's, and those needed for XML
* Schema.
*
* In addition to the features and properties recognized by the base
- * parser configuration, this class recognizes these additional
+ * parser configuration, this class recognizes these additional
* features and properties:
*
* - Features
@@ -91,23 +91,23 @@
/** feature identifier: XML Schema validation */
- protected static final String XMLSCHEMA_VALIDATION =
+ protected static final String XMLSCHEMA_VALIDATION =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_VALIDATION_FEATURE;
/** feature identifier: XML Schema validation -- full checking */
- protected static final String XMLSCHEMA_FULL_CHECKING =
+ protected static final String XMLSCHEMA_FULL_CHECKING =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
+
/** Feature: generate synthetic annotations */
- protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
+ protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
-
+
/** Feature identifier: validate annotations */
protected static final String VALIDATE_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
-
+
/** Feature identifier: honour all schemaLocations */
- protected static final String HONOUR_ALL_SCHEMALOCATIONS =
+ protected static final String HONOUR_ALL_SCHEMALOCATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.HONOUR_ALL_SCHEMALOCATIONS_FEATURE;
/** Feature identifier: namespace growth */
@@ -154,8 +154,8 @@
this(null, null, null);
} //
()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -167,7 +167,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -183,7 +183,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -226,7 +226,7 @@
setFeature(TOLERATE_DUPLICATES, false);
// add default recognized properties
-
+
final String[] recognizedProperties = {
// NOTE: These shouldn't really be here but since the XML Schema
// validator is constructed dynamically, its recognized
@@ -237,7 +237,7 @@
SCHEMA_DV_FACTORY,
};
- addRecognizedProperties(recognizedProperties);
+ addRecognizedProperties(recognizedProperties);
} // (SymbolTable,XMLGrammarPool)
@@ -251,8 +251,8 @@
if ( getFeature(XMLSCHEMA_VALIDATION )) {
// If schema validator was not in the pipeline insert it.
if (fSchemaValidator == null) {
- fSchemaValidator = new XMLSchemaValidator();
-
+ fSchemaValidator = new XMLSchemaValidator();
+
// add schema component
fProperties.put(SCHEMA_VALIDATOR, fSchemaValidator);
addComponent(fSchemaValidator);
@@ -265,10 +265,10 @@
}
fLastComponent = fSchemaValidator;
fNamespaceBinder.setDocumentHandler(fSchemaValidator);
-
+
fSchemaValidator.setDocumentHandler(fDocumentHandler);
fSchemaValidator.setDocumentSource(fNamespaceBinder);
- }
+ }
} // configurePipeline()
@@ -296,12 +296,12 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/schema
// Lets the user turn Schema validation support on/off.
//
- if (suffixLength == Constants.SCHEMA_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.SCHEMA_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.SCHEMA_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -310,15 +310,15 @@
featureId.endsWith(Constants.SCHEMA_FULL_CHECKING)) {
return FeatureState.RECOGNIZED;
}
- // Feature identifier: expose schema normalized value
+ // Feature identifier: expose schema normalized value
// http://apache.org/xml/features/validation/schema/normalized-value
- if (suffixLength == Constants.SCHEMA_NORMALIZED_VALUE.length() &&
+ if (suffixLength == Constants.SCHEMA_NORMALIZED_VALUE.length() &&
featureId.endsWith(Constants.SCHEMA_NORMALIZED_VALUE)) {
return FeatureState.RECOGNIZED;
- }
- // Feature identifier: send element default value via characters()
+ }
+ // Feature identifier: send element default value via characters()
// http://apache.org/xml/features/validation/schema/element-default
- if (suffixLength == Constants.SCHEMA_ELEMENT_DEFAULT.length() &&
+ if (suffixLength == Constants.SCHEMA_ELEMENT_DEFAULT.length() &&
featureId.endsWith(Constants.SCHEMA_ELEMENT_DEFAULT)) {
return FeatureState.RECOGNIZED;
}
@@ -354,12 +354,12 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
-
- if (suffixLength == Constants.SCHEMA_LOCATION.length() &&
+
+ if (suffixLength == Constants.SCHEMA_LOCATION.length() &&
propertyId.endsWith(Constants.SCHEMA_LOCATION)) {
return PropertyState.RECOGNIZED;
}
- if (suffixLength == Constants.SCHEMA_NONS_LOCATION.length() &&
+ if (suffixLength == Constants.SCHEMA_NONS_LOCATION.length() &&
propertyId.endsWith(Constants.SCHEMA_NONS_LOCATION)) {
return PropertyState.RECOGNIZED;
}
@@ -367,8 +367,8 @@
if (propertyId.startsWith(Constants.JAXP_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.JAXP_PROPERTY_PREFIX.length();
-
- if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
+
+ if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
propertyId.endsWith(Constants.SCHEMA_SOURCE)) {
return PropertyState.RECOGNIZED;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XIncludeAwareParserConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -36,70 +36,70 @@
/**
* This class is the configuration used to parse XML 1.0 and XML 1.1 documents
* and provides support for XInclude. This is the default Xerces configuration.
- *
+ *
* @author Michael Glavassevich, IBM
- *
+ *
* @version $Id: XIncludeAwareParserConfiguration.java,v 1.5 2010-11-01 04:40:10 joehw Exp $
*/
public class XIncludeAwareParserConfiguration extends XML11Configuration {
-
+
/** Feature identifier: allow notation and unparsed entity events to be sent out of order. */
protected static final String ALLOW_UE_AND_NOTATION_EVENTS =
Constants.SAX_FEATURE_PREFIX + Constants.ALLOW_DTD_EVENTS_AFTER_ENDDTD_FEATURE;
-
+
/** Feature identifier: fixup base URIs. */
protected static final String XINCLUDE_FIXUP_BASE_URIS =
Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_BASE_URIS_FEATURE;
-
+
/** Feature identifier: fixup language. */
protected static final String XINCLUDE_FIXUP_LANGUAGE =
Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FIXUP_LANGUAGE_FEATURE;
-
+
/** Feature identifier: XInclude processing */
- protected static final String XINCLUDE_FEATURE =
+ protected static final String XINCLUDE_FEATURE =
Constants.XERCES_FEATURE_PREFIX + Constants.XINCLUDE_FEATURE;
-
+
/** Property identifier: error reporter. */
protected static final String XINCLUDE_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.XINCLUDE_HANDLER_PROPERTY;
-
+
/** Property identifier: error reporter. */
protected static final String NAMESPACE_CONTEXT =
Constants.XERCES_PROPERTY_PREFIX + Constants.NAMESPACE_CONTEXT_PROPERTY;
-
+
//
// Components
//
-
+
/** XInclude handler. */
protected XIncludeHandler fXIncludeHandler;
-
+
/** Non-XInclude NamespaceContext. */
protected NamespaceSupport fNonXIncludeNSContext;
-
+
/** XInclude NamespaceContext. */
protected XIncludeNamespaceSupport fXIncludeNSContext;
-
+
/** Current NamespaceContext. */
protected NamespaceContext fCurrentNSContext;
-
+
/** Flag indicating whether XInclude processsing is enabled. */
protected boolean fXIncludeEnabled = false;
-
+
/** Default constructor. */
public XIncludeAwareParserConfiguration() {
this(null, null, null);
} // ()
-
- /**
- * Constructs a parser configuration using the specified symbol table.
+
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
public XIncludeAwareParserConfiguration(SymbolTable symbolTable) {
this(symbolTable, null, null);
} // (SymbolTable)
-
+
/**
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
@@ -113,7 +113,7 @@
XMLGrammarPool grammarPool) {
this(symbolTable, grammarPool, null);
} // (SymbolTable,XMLGrammarPool)
-
+
/**
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
@@ -128,29 +128,29 @@
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
super(symbolTable, grammarPool, parentSettings);
-
+
final String[] recognizedFeatures = {
ALLOW_UE_AND_NOTATION_EVENTS,
XINCLUDE_FIXUP_BASE_URIS,
XINCLUDE_FIXUP_LANGUAGE
};
addRecognizedFeatures(recognizedFeatures);
-
+
// add default recognized properties
final String[] recognizedProperties =
{ XINCLUDE_HANDLER, NAMESPACE_CONTEXT };
addRecognizedProperties(recognizedProperties);
-
+
setFeature(ALLOW_UE_AND_NOTATION_EVENTS, true);
setFeature(XINCLUDE_FIXUP_BASE_URIS, true);
setFeature(XINCLUDE_FIXUP_LANGUAGE, true);
-
+
fNonXIncludeNSContext = new NamespaceSupport();
fCurrentNSContext = fNonXIncludeNSContext;
setProperty(NAMESPACE_CONTEXT, fNonXIncludeNSContext);
}
-
-
+
+
/** Configures the pipeline. */
protected void configurePipeline() {
super.configurePipeline();
@@ -180,8 +180,8 @@
if (fDTDHandler != null) {
fDTDHandler.setDTDSource(fXIncludeHandler);
}
-
- // configure XML document pipeline: insert after DTDValidator and
+
+ // configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
@@ -194,7 +194,7 @@
prev = fLastComponent;
fLastComponent = fXIncludeHandler;
}
-
+
XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
@@ -211,7 +211,7 @@
}
}
} // configurePipeline()
-
+
protected void configureXML11Pipeline() {
super.configureXML11Pipeline();
if (fXIncludeEnabled) {
@@ -240,8 +240,8 @@
if (fDTDHandler != null) {
fDTDHandler.setDTDSource(fXIncludeHandler);
}
-
- // configure XML document pipeline: insert after DTDValidator and
+
+ // configure XML document pipeline: insert after DTDValidator and
// before XML Schema validator
XMLDocumentSource prev = null;
if (fFeatures.get(XMLSCHEMA_VALIDATION) == Boolean.TRUE) {
@@ -254,7 +254,7 @@
prev = fLastComponent;
fLastComponent = fXIncludeHandler;
}
-
+
XMLDocumentHandler next = prev.getDocumentHandler();
prev.setDocumentHandler(fXIncludeHandler);
fXIncludeHandler.setDocumentSource(prev);
@@ -271,7 +271,7 @@
}
}
} // configureXML11Pipeline()
-
+
public FeatureState getFeatureState(String featureId)
throws XMLConfigurationException {
if (featureId.equals(PARSER_SETTINGS)) {
@@ -281,9 +281,9 @@
return FeatureState.is(fXIncludeEnabled);
}
return super.getFeatureState0(featureId);
-
+
} // getFeature(String):boolean
-
+
public void setFeature(String featureId, boolean state)
throws XMLConfigurationException {
if (featureId.equals(XINCLUDE_FEATURE)) {
@@ -293,5 +293,5 @@
}
super.setFeature(featureId,state);
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11Configuration.java Wed May 02 13:32:36 2012 +0100
@@ -140,17 +140,17 @@
/** feature identifier: XML Schema validation -- full checking */
protected static final String XMLSCHEMA_FULL_CHECKING =
Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
-
+
/** Feature: generate synthetic annotations */
- protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
+ protected static final String GENERATE_SYNTHETIC_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
-
+
/** Feature identifier: validate annotations */
protected static final String VALIDATE_ANNOTATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
-
+
/** Feature identifier: honour all schemaLocations */
- protected static final String HONOUR_ALL_SCHEMALOCATIONS =
+ protected static final String HONOUR_ALL_SCHEMALOCATIONS =
Constants.XERCES_FEATURE_PREFIX + Constants.HONOUR_ALL_SCHEMALOCATIONS_FEATURE;
/** Feature identifier: namespace growth */
@@ -164,45 +164,45 @@
/** Feature identifier: use grammar pool only */
protected static final String USE_GRAMMAR_POOL_ONLY =
Constants.XERCES_FEATURE_PREFIX + Constants.USE_GRAMMAR_POOL_ONLY_FEATURE;
-
- // feature identifiers
+
+ // feature identifiers
+
+ /** Feature identifier: validation. */
+ protected static final String VALIDATION =
+ Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
- /** Feature identifier: validation. */
- protected static final String VALIDATION =
- Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
- /** Feature identifier: namespaces. */
- protected static final String NAMESPACES =
- Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
- /** Feature identifier: external general entities. */
- protected static final String EXTERNAL_GENERAL_ENTITIES =
- Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
- /** Feature identifier: external parameter entities. */
- protected static final String EXTERNAL_PARAMETER_ENTITIES =
- Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
-
+ /** Feature identifier: namespaces. */
+ protected static final String NAMESPACES =
+ Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
+
+ /** Feature identifier: external general entities. */
+ protected static final String EXTERNAL_GENERAL_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
+
+ /** Feature identifier: external parameter entities. */
+ protected static final String EXTERNAL_PARAMETER_ENTITIES =
+ Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
+
+
// property identifiers
-
+
- /** Property identifier: xml string. */
- protected static final String XML_STRING =
- Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
+ /** Property identifier: xml string. */
+ protected static final String XML_STRING =
+ Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
- /** Property identifier: symbol table. */
- protected static final String SYMBOL_TABLE =
- Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
+ /** Property identifier: symbol table. */
+ protected static final String SYMBOL_TABLE =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
- /** Property identifier: error handler. */
- protected static final String ERROR_HANDLER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
+ /** Property identifier: error handler. */
+ protected static final String ERROR_HANDLER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
- /** Property identifier: entity resolver. */
- protected static final String ENTITY_RESOLVER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
+ /** Property identifier: entity resolver. */
+ protected static final String ENTITY_RESOLVER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
/** Property identifier: XML Schema validator. */
@@ -279,49 +279,49 @@
/** Set to true and recompile to print exception stack trace. */
protected static final boolean PRINT_EXCEPTION_STACK_TRACE = false;
- //
+ //
// Data
//
- protected SymbolTable fSymbolTable;
+ protected SymbolTable fSymbolTable;
protected XMLInputSource fInputSource;
protected ValidationManager fValidationManager;
- protected XMLVersionDetector fVersionDetector;
+ protected XMLVersionDetector fVersionDetector;
protected XMLLocator fLocator;
- protected Locale fLocale;
+ protected Locale fLocale;
- /** XML 1.0 Components. */
- protected ArrayList fComponents;
-
- /** XML 1.1. Components. */
- protected ArrayList fXML11Components = null;
-
- /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */
- protected ArrayList fCommonComponents = null;
+ /** XML 1.0 Components. */
+ protected ArrayList fComponents;
+
+ /** XML 1.1. Components. */
+ protected ArrayList fXML11Components = null;
+
+ /** Common components: XMLEntityManager, XMLErrorReporter, XMLSchemaValidator */
+ protected ArrayList fCommonComponents = null;
- /** The document handler. */
- protected XMLDocumentHandler fDocumentHandler;
+ /** The document handler. */
+ protected XMLDocumentHandler fDocumentHandler;
- /** The DTD handler. */
- protected XMLDTDHandler fDTDHandler;
+ /** The DTD handler. */
+ protected XMLDTDHandler fDTDHandler;
- /** The DTD content model handler. */
- protected XMLDTDContentModelHandler fDTDContentModelHandler;
+ /** The DTD content model handler. */
+ protected XMLDTDContentModelHandler fDTDContentModelHandler;
- /** Last component in the document pipeline */
- protected XMLDocumentSource fLastComponent;
+ /** Last component in the document pipeline */
+ protected XMLDocumentSource fLastComponent;
- /**
+ /**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
* validation and namespaces).
*/
protected boolean fParseInProgress = false;
-
- /** fConfigUpdated is set to true if there has been any change to the configuration settings,
+
+ /** fConfigUpdated is set to true if there has been any change to the configuration settings,
* i.e a feature or a property was changed.
*/
- protected boolean fConfigUpdated = false;
+ protected boolean fConfigUpdated = false;
//
// XML 1.0 components
@@ -402,8 +402,8 @@
this(null, null, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -415,7 +415,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -430,7 +430,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -442,134 +442,134 @@
SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
-
- super(parentSettings);
+
+ super(parentSettings);
- // create a vector to hold all the components in use
- // XML 1.0 specialized components
- fComponents = new ArrayList();
- // XML 1.1 specialized components
- fXML11Components = new ArrayList();
- // Common components for XML 1.1. and XML 1.0
- fCommonComponents = new ArrayList();
+ // create a vector to hold all the components in use
+ // XML 1.0 specialized components
+ fComponents = new ArrayList();
+ // XML 1.1 specialized components
+ fXML11Components = new ArrayList();
+ // Common components for XML 1.1. and XML 1.0
+ fCommonComponents = new ArrayList();
- // create table for features and properties
- fFeatures = new HashMap();
- fProperties = new HashMap();
+ // create table for features and properties
+ fFeatures = new HashMap();
+ fProperties = new HashMap();
// add default recognized features
final String[] recognizedFeatures =
- {
- CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
- VALIDATION,
- NAMESPACES,
+ {
+ CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
+ VALIDATION,
+ NAMESPACES,
NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
HONOUR_ALL_SCHEMALOCATIONS, NAMESPACE_GROWTH,
TOLERATE_DUPLICATES,
USE_GRAMMAR_POOL_ONLY,
- // NOTE: These shouldn't really be here but since the XML Schema
- // validator is constructed dynamically, its recognized
- // features might not have been set and it would cause a
- // not-recognized exception to be thrown. -Ac
- XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
- EXTERNAL_GENERAL_ENTITIES,
- EXTERNAL_PARAMETER_ENTITIES,
- PARSER_SETTINGS
- };
+ // NOTE: These shouldn't really be here but since the XML Schema
+ // validator is constructed dynamically, its recognized
+ // features might not have been set and it would cause a
+ // not-recognized exception to be thrown. -Ac
+ XMLSCHEMA_VALIDATION, XMLSCHEMA_FULL_CHECKING,
+ EXTERNAL_GENERAL_ENTITIES,
+ EXTERNAL_PARAMETER_ENTITIES,
+ PARSER_SETTINGS
+ };
addRecognizedFeatures(recognizedFeatures);
- // set state for default features
- fFeatures.put(VALIDATION, Boolean.FALSE);
- fFeatures.put(NAMESPACES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
- fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
- fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE);
- fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE);
- fFeatures.put(NORMALIZE_DATA, Boolean.TRUE);
- fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
+ // set state for default features
+ fFeatures.put(VALIDATION, Boolean.FALSE);
+ fFeatures.put(NAMESPACES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
+ fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
+ fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE);
+ fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE);
+ fFeatures.put(NORMALIZE_DATA, Boolean.TRUE);
+ fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE);
fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE);
fFeatures.put(HONOUR_ALL_SCHEMALOCATIONS, Boolean.FALSE);
fFeatures.put(NAMESPACE_GROWTH, Boolean.FALSE);
fFeatures.put(TOLERATE_DUPLICATES, Boolean.FALSE);
fFeatures.put(USE_GRAMMAR_POOL_ONLY, Boolean.FALSE);
- fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
+ fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
// add default recognized properties
final String[] recognizedProperties =
- {
- SYMBOL_TABLE,
- ERROR_HANDLER,
- ENTITY_RESOLVER,
+ {
+ SYMBOL_TABLE,
+ ERROR_HANDLER,
+ ENTITY_RESOLVER,
ERROR_REPORTER,
ENTITY_MANAGER,
DOCUMENT_SCANNER,
DTD_SCANNER,
DTD_PROCESSOR,
DTD_VALIDATOR,
- DATATYPE_VALIDATOR_FACTORY,
- VALIDATION_MANAGER,
- SCHEMA_VALIDATOR,
- XML_STRING,
- XMLGRAMMAR_POOL,
+ DATATYPE_VALIDATOR_FACTORY,
+ VALIDATION_MANAGER,
+ SCHEMA_VALIDATOR,
+ XML_STRING,
+ XMLGRAMMAR_POOL,
JAXP_SCHEMA_SOURCE,
- JAXP_SCHEMA_LANGUAGE,
- // NOTE: These shouldn't really be here but since the XML Schema
- // validator is constructed dynamically, its recognized
- // properties might not have been set and it would cause a
- // not-recognized exception to be thrown. -Ac
- SCHEMA_LOCATION,
+ JAXP_SCHEMA_LANGUAGE,
+ // NOTE: These shouldn't really be here but since the XML Schema
+ // validator is constructed dynamically, its recognized
+ // properties might not have been set and it would cause a
+ // not-recognized exception to be thrown. -Ac
+ SCHEMA_LOCATION,
SCHEMA_NONS_LOCATION,
LOCALE,
SCHEMA_DV_FACTORY,
};
addRecognizedProperties(recognizedProperties);
-
- if (symbolTable == null) {
- symbolTable = new SymbolTable();
- }
- fSymbolTable = symbolTable;
- fProperties.put(SYMBOL_TABLE, fSymbolTable);
-
+
+ if (symbolTable == null) {
+ symbolTable = new SymbolTable();
+ }
+ fSymbolTable = symbolTable;
+ fProperties.put(SYMBOL_TABLE, fSymbolTable);
+
fGrammarPool = grammarPool;
if (fGrammarPool != null) {
- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
+ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
}
fEntityManager = new XMLEntityManager();
- fProperties.put(ENTITY_MANAGER, fEntityManager);
+ fProperties.put(ENTITY_MANAGER, fEntityManager);
addCommonComponent(fEntityManager);
fErrorReporter = new XMLErrorReporter();
fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());
- fProperties.put(ERROR_REPORTER, fErrorReporter);
+ fProperties.put(ERROR_REPORTER, fErrorReporter);
addCommonComponent(fErrorReporter);
fNamespaceScanner = new XMLNSDocumentScannerImpl();
- fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
+ fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
addComponent((XMLComponent) fNamespaceScanner);
fDTDScanner = new XMLDTDScannerImpl();
- fProperties.put(DTD_SCANNER, fDTDScanner);
+ fProperties.put(DTD_SCANNER, fDTDScanner);
addComponent((XMLComponent) fDTDScanner);
fDTDProcessor = new XMLDTDProcessor();
- fProperties.put(DTD_PROCESSOR, fDTDProcessor);
+ fProperties.put(DTD_PROCESSOR, fDTDProcessor);
addComponent((XMLComponent) fDTDProcessor);
fDTDValidator = new XMLNSDTDValidator();
- fProperties.put(DTD_VALIDATOR, fDTDValidator);
+ fProperties.put(DTD_VALIDATOR, fDTDValidator);
addComponent(fDTDValidator);
fDatatypeValidatorFactory = DTDDVFactory.getInstance();
- fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
+ fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
fValidationManager = new ValidationManager();
- fProperties.put(VALIDATION_MANAGER, fValidationManager);
-
+ fProperties.put(VALIDATION_MANAGER, fValidationManager);
+
fVersionDetector = new XMLVersionDetector();
-
+
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
XMLMessageFormatter xmft = new XMLMessageFormatter();
@@ -584,8 +584,8 @@
// do nothing
// REVISIT: What is the right thing to do? -Ac
}
-
- fConfigUpdated = false;
+
+ fConfigUpdated = false;
} // (SymbolTable,XMLGrammarPool)
@@ -597,7 +597,7 @@
*
* @param inputSource The document's input source.
*
- * @exception XMLConfigurationException Thrown if there is a
+ * @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* @exception IOException Thrown on I/O error.
@@ -628,110 +628,110 @@
fLocale = locale;
fErrorReporter.setLocale(locale);
} // setLocale(Locale)
- /**
- * Sets the document handler on the last component in the pipeline
- * to receive information about the document.
- *
- * @param documentHandler The document handler.
- */
- public void setDocumentHandler(XMLDocumentHandler documentHandler) {
- fDocumentHandler = documentHandler;
- if (fLastComponent != null) {
- fLastComponent.setDocumentHandler(fDocumentHandler);
- if (fDocumentHandler !=null){
- fDocumentHandler.setDocumentSource(fLastComponent);
- }
- }
- } // setDocumentHandler(XMLDocumentHandler)
+ /**
+ * Sets the document handler on the last component in the pipeline
+ * to receive information about the document.
+ *
+ * @param documentHandler The document handler.
+ */
+ public void setDocumentHandler(XMLDocumentHandler documentHandler) {
+ fDocumentHandler = documentHandler;
+ if (fLastComponent != null) {
+ fLastComponent.setDocumentHandler(fDocumentHandler);
+ if (fDocumentHandler !=null){
+ fDocumentHandler.setDocumentSource(fLastComponent);
+ }
+ }
+ } // setDocumentHandler(XMLDocumentHandler)
- /** Returns the registered document handler. */
- public XMLDocumentHandler getDocumentHandler() {
- return fDocumentHandler;
- } // getDocumentHandler():XMLDocumentHandler
+ /** Returns the registered document handler. */
+ public XMLDocumentHandler getDocumentHandler() {
+ return fDocumentHandler;
+ } // getDocumentHandler():XMLDocumentHandler
- /**
- * Sets the DTD handler.
- *
- * @param dtdHandler The DTD handler.
- */
- public void setDTDHandler(XMLDTDHandler dtdHandler) {
- fDTDHandler = dtdHandler;
- } // setDTDHandler(XMLDTDHandler)
+ /**
+ * Sets the DTD handler.
+ *
+ * @param dtdHandler The DTD handler.
+ */
+ public void setDTDHandler(XMLDTDHandler dtdHandler) {
+ fDTDHandler = dtdHandler;
+ } // setDTDHandler(XMLDTDHandler)
- /** Returns the registered DTD handler. */
- public XMLDTDHandler getDTDHandler() {
- return fDTDHandler;
- } // getDTDHandler():XMLDTDHandler
+ /** Returns the registered DTD handler. */
+ public XMLDTDHandler getDTDHandler() {
+ return fDTDHandler;
+ } // getDTDHandler():XMLDTDHandler
- /**
- * Sets the DTD content model handler.
- *
- * @param handler The DTD content model handler.
- */
- public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
- fDTDContentModelHandler = handler;
- } // setDTDContentModelHandler(XMLDTDContentModelHandler)
+ /**
+ * Sets the DTD content model handler.
+ *
+ * @param handler The DTD content model handler.
+ */
+ public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
+ fDTDContentModelHandler = handler;
+ } // setDTDContentModelHandler(XMLDTDContentModelHandler)
- /** Returns the registered DTD content model handler. */
- public XMLDTDContentModelHandler getDTDContentModelHandler() {
- return fDTDContentModelHandler;
- } // getDTDContentModelHandler():XMLDTDContentModelHandler
+ /** Returns the registered DTD content model handler. */
+ public XMLDTDContentModelHandler getDTDContentModelHandler() {
+ return fDTDContentModelHandler;
+ } // getDTDContentModelHandler():XMLDTDContentModelHandler
- /**
- * Sets the resolver used to resolve external entities. The EntityResolver
- * interface supports resolution of public and system identifiers.
- *
- * @param resolver The new entity resolver. Passing a null value will
- * uninstall the currently installed resolver.
- */
- public void setEntityResolver(XMLEntityResolver resolver) {
- fProperties.put(ENTITY_RESOLVER, resolver);
- } // setEntityResolver(XMLEntityResolver)
+ /**
+ * Sets the resolver used to resolve external entities. The EntityResolver
+ * interface supports resolution of public and system identifiers.
+ *
+ * @param resolver The new entity resolver. Passing a null value will
+ * uninstall the currently installed resolver.
+ */
+ public void setEntityResolver(XMLEntityResolver resolver) {
+ fProperties.put(ENTITY_RESOLVER, resolver);
+ } // setEntityResolver(XMLEntityResolver)
+
+ /**
+ * Return the current entity resolver.
+ *
+ * @return The current entity resolver, or null if none
+ * has been registered.
+ * @see #setEntityResolver
+ */
+ public XMLEntityResolver getEntityResolver() {
+ return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
+ } // getEntityResolver():XMLEntityResolver
- /**
- * Return the current entity resolver.
- *
- * @return The current entity resolver, or null if none
- * has been registered.
- * @see #setEntityResolver
- */
- public XMLEntityResolver getEntityResolver() {
- return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
- } // getEntityResolver():XMLEntityResolver
-
- /**
- * Allow an application to register an error event handler.
- *
- * If the application does not register an error handler, all
- * error events reported by the SAX parser will be silently
- * ignored; however, normal processing may not continue. It is
- * highly recommended that all SAX applications implement an
- * error handler to avoid unexpected bugs.
- *
- * Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.
- *
- * @param errorHandler The error handler.
- * @exception java.lang.NullPointerException If the handler
- * argument is null.
- * @see #getErrorHandler
- */
- public void setErrorHandler(XMLErrorHandler errorHandler) {
- fProperties.put(ERROR_HANDLER, errorHandler);
- } // setErrorHandler(XMLErrorHandler)
+ /**
+ * Allow an application to register an error event handler.
+ *
+ * If the application does not register an error handler, all
+ * error events reported by the SAX parser will be silently
+ * ignored; however, normal processing may not continue. It is
+ * highly recommended that all SAX applications implement an
+ * error handler to avoid unexpected bugs.
+ *
+ * Applications may register a new or different handler in the
+ * middle of a parse, and the SAX parser must begin using the new
+ * handler immediately.
+ *
+ * @param errorHandler The error handler.
+ * @exception java.lang.NullPointerException If the handler
+ * argument is null.
+ * @see #getErrorHandler
+ */
+ public void setErrorHandler(XMLErrorHandler errorHandler) {
+ fProperties.put(ERROR_HANDLER, errorHandler);
+ } // setErrorHandler(XMLErrorHandler)
- /**
- * Return the current error handler.
- *
- * @return The current error handler, or null if none
- * has been registered.
- * @see #setErrorHandler
- */
- public XMLErrorHandler getErrorHandler() {
- // REVISIT: Should this be a property?
- return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
- } // getErrorHandler():XMLErrorHandler
+ /**
+ * Return the current error handler.
+ *
+ * @return The current error handler, or null if none
+ * has been registered.
+ * @see #setErrorHandler
+ */
+ public XMLErrorHandler getErrorHandler() {
+ // REVISIT: Should this be a property?
+ return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
+ } // getErrorHandler():XMLErrorHandler
/**
@@ -791,7 +791,7 @@
// reset and configure pipeline and set InputSource.
if (fInputSource != null) {
try {
- fValidationManager.reset();
+ fValidationManager.reset();
fVersionDetector.reset(this);
fConfigUpdated = true;
resetCommon();
@@ -805,7 +805,7 @@
configurePipeline();
reset();
}
-
+
// mark configuration as fixed
fConfigUpdated = false;
@@ -852,73 +852,73 @@
}
} // parse(boolean):boolean
-
- /**
- * Returns the state of a feature.
- *
- * @param featureId The feature identifier.
- * @return true if the feature is supported
- *
- * @throws XMLConfigurationException Thrown for configuration error.
- * In general, components should
- * only throw this exception if
- * it is really
- * a critical error.
- */
- public FeatureState getFeatureState(String featureId)
- throws XMLConfigurationException {
- // make this feature special
+
+ /**
+ * Returns the state of a feature.
+ *
+ * @param featureId The feature identifier.
+ * @return true if the feature is supported
+ *
+ * @throws XMLConfigurationException Thrown for configuration error.
+ * In general, components should
+ * only throw this exception if
+ * it is really
+ * a critical error.
+ */
+ public FeatureState getFeatureState(String featureId)
+ throws XMLConfigurationException {
+ // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
- return FeatureState.is(fConfigUpdated);
+ return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);
- } // getFeature(String):boolean
-
- /**
- * Set the state of a feature.
- *
- * Set the state of any feature in a SAX2 parser. The parser
- * might not recognize the feature, and if it does recognize
- * it, it might not be able to fulfill the request.
- *
- * @param featureId The unique identifier (URI) of the feature.
- * @param state The requested state of the feature (true or false).
- *
- * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
- * requested feature is not known.
- */
- public void setFeature(String featureId, boolean state)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setFeature(featureId, state);
- }
- // forward it to common components
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setFeature(featureId, state);
- }
-
- // forward to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setFeature(featureId, state);
- }
- catch (Exception e){
- // no op
- }
- }
- // save state if noone "objects"
- super.setFeature(featureId, state);
+ } // getFeature(String):boolean
- } // setFeature(String,boolean)
+ /**
+ * Set the state of a feature.
+ *
+ * Set the state of any feature in a SAX2 parser. The parser
+ * might not recognize the feature, and if it does recognize
+ * it, it might not be able to fulfill the request.
+ *
+ * @param featureId The unique identifier (URI) of the feature.
+ * @param state The requested state of the feature (true or false).
+ *
+ * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
+ * requested feature is not known.
+ */
+ public void setFeature(String featureId, boolean state)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+ // forward it to common components
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+
+ // forward to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setFeature(featureId, state);
+ }
+ catch (Exception e){
+ // no op
+ }
+ }
+ // save state if noone "objects"
+ super.setFeature(featureId, state);
+
+ } // setFeature(String,boolean)
/**
* Returns the value of a property.
@@ -940,95 +940,95 @@
return super.getPropertyState(propertyId);
}
- /**
- * setProperty
- *
- * @param propertyId
- * @param value
- */
- public void setProperty(String propertyId, Object value)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- if (LOCALE.equals(propertyId)) {
- setLocale((Locale) value);
- }
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every common Component
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setProperty(propertyId, value);
- }
- catch (Exception e){
- // ignore it
- }
- }
+ /**
+ * setProperty
+ *
+ * @param propertyId
+ * @param value
+ */
+ public void setProperty(String propertyId, Object value)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ if (LOCALE.equals(propertyId)) {
+ setLocale((Locale) value);
+ }
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every common Component
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setProperty(propertyId, value);
+ }
+ catch (Exception e){
+ // ignore it
+ }
+ }
- // store value if noone "objects"
- super.setProperty(propertyId, value);
+ // store value if noone "objects"
+ super.setProperty(propertyId, value);
- } // setProperty(String,Object)
-
+ } // setProperty(String,Object)
+
- /** Returns the locale. */
- public Locale getLocale() {
- return fLocale;
- } // getLocale():Locale
-
- /**
- * reset all XML 1.0 components before parsing and namespace context
- */
- protected void reset() throws XNIException {
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.reset(this);
- }
+ /** Returns the locale. */
+ public Locale getLocale() {
+ return fLocale;
+ } // getLocale():Locale
+
+ /**
+ * reset all XML 1.0 components before parsing and namespace context
+ */
+ protected void reset() throws XNIException {
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.reset(this);
+ }
+
+ } // reset()
- } // reset()
-
- /**
- * reset all common components before parsing
- */
- protected void resetCommon() throws XNIException {
- // reset common components
- int count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.reset(this);
- }
+ /**
+ * reset all common components before parsing
+ */
+ protected void resetCommon() throws XNIException {
+ // reset common components
+ int count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.reset(this);
+ }
+
+ } // resetCommon()
- } // resetCommon()
-
-
- /**
- * reset all components before parsing and namespace context
- */
- protected void resetXML11() throws XNIException {
- // reset every component
- int count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- c.reset(this);
- }
- } // resetXML11()
+ /**
+ * reset all components before parsing and namespace context
+ */
+ protected void resetXML11() throws XNIException {
+ // reset every component
+ int count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ c.reset(this);
+ }
+
+ } // resetXML11()
/**
- * Configures the XML 1.1 pipeline.
+ * Configures the XML 1.1 pipeline.
* Note: this method also resets the new XML11 components.
*/
protected void configureXML11Pipeline() {
@@ -1039,7 +1039,7 @@
if (fCurrentDTDScanner != fXML11DTDScanner) {
fCurrentDTDScanner = fXML11DTDScanner;
setProperty(DTD_SCANNER, fCurrentDTDScanner);
- setProperty(DTD_PROCESSOR, fXML11DTDProcessor);
+ setProperty(DTD_PROCESSOR, fXML11DTDProcessor);
}
fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor);
@@ -1075,14 +1075,14 @@
fLastComponent = fXML11NSDTDValidator;
} else {
- // create components
- if (fXML11DocScanner == null) {
- // non namespace document pipeline
- fXML11DocScanner = new XML11DocumentScannerImpl();
- addXML11Component(fXML11DocScanner);
- fXML11DTDValidator = new XML11DTDValidator();
- addXML11Component(fXML11DTDValidator);
- }
+ // create components
+ if (fXML11DocScanner == null) {
+ // non namespace document pipeline
+ fXML11DocScanner = new XML11DocumentScannerImpl();
+ addXML11Component(fXML11DocScanner);
+ fXML11DTDValidator = new XML11DTDValidator();
+ addXML11Component(fXML11DTDValidator);
+ }
if (fCurrentScanner != fXML11DocScanner) {
fCurrentScanner = fXML11DocScanner;
setProperty(DOCUMENT_SCANNER, fXML11DocScanner);
@@ -1105,8 +1105,8 @@
fSchemaValidator = new XMLSchemaValidator();
// add schema component
setProperty(SCHEMA_VALIDATOR, fSchemaValidator);
- addCommonComponent(fSchemaValidator);
- fSchemaValidator.reset(this);
+ addCommonComponent(fSchemaValidator);
+ fSchemaValidator.reset(this);
// add schema message formatter
if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
XSMessageFormatter xmft = new XSMessageFormatter();
@@ -1241,14 +1241,14 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/dynamic
// Allows the parser to validate a document only when it
// contains a grammar. Validation is turned on/off based
// on each document instance, automatically.
//
- if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -1264,7 +1264,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -1272,14 +1272,14 @@
//
// http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
//
- if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
//
- if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -1287,39 +1287,39 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
return FeatureState.NOT_SUPPORTED;
}
-
+
//
// http://apache.org/xml/features/validation/schema
// Lets the user turn Schema validation support on/off.
//
- if (suffixLength == Constants.SCHEMA_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.SCHEMA_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.SCHEMA_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
// activate full schema checking
- if (suffixLength == Constants.SCHEMA_FULL_CHECKING.length() &&
+ if (suffixLength == Constants.SCHEMA_FULL_CHECKING.length() &&
featureId.endsWith(Constants.SCHEMA_FULL_CHECKING)) {
return FeatureState.RECOGNIZED;
}
- // Feature identifier: expose schema normalized value
+ // Feature identifier: expose schema normalized value
// http://apache.org/xml/features/validation/schema/normalized-value
- if (suffixLength == Constants.SCHEMA_NORMALIZED_VALUE.length() &&
+ if (suffixLength == Constants.SCHEMA_NORMALIZED_VALUE.length() &&
featureId.endsWith(Constants.SCHEMA_NORMALIZED_VALUE)) {
return FeatureState.RECOGNIZED;
}
- // Feature identifier: send element default value via characters()
+ // Feature identifier: send element default value via characters()
// http://apache.org/xml/features/validation/schema/element-default
- if (suffixLength == Constants.SCHEMA_ELEMENT_DEFAULT.length() &&
+ if (suffixLength == Constants.SCHEMA_ELEMENT_DEFAULT.length() &&
featureId.endsWith(Constants.SCHEMA_ELEMENT_DEFAULT)) {
return FeatureState.RECOGNIZED;
}
-
- // special performance feature: only component manager is allowed to set it.
- if (suffixLength == Constants.PARSER_SETTINGS.length() &&
+
+ // special performance feature: only component manager is allowed to set it.
+ if (suffixLength == Constants.PARSER_SETTINGS.length() &&
featureId.endsWith(Constants.PARSER_SETTINGS)) {
return FeatureState.NOT_SUPPORTED;
}
@@ -1356,33 +1356,33 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
+ if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
- if (suffixLength == Constants.SCHEMA_LOCATION.length() &&
+ if (suffixLength == Constants.SCHEMA_LOCATION.length() &&
propertyId.endsWith(Constants.SCHEMA_LOCATION)) {
return PropertyState.RECOGNIZED;
}
- if (suffixLength == Constants.SCHEMA_NONS_LOCATION.length() &&
+ if (suffixLength == Constants.SCHEMA_NONS_LOCATION.length() &&
propertyId.endsWith(Constants.SCHEMA_NONS_LOCATION)) {
return PropertyState.RECOGNIZED;
}
}
-
+
if (propertyId.startsWith(Constants.JAXP_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.JAXP_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
+ if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
propertyId.endsWith(Constants.SCHEMA_SOURCE)) {
return PropertyState.RECOGNIZED;
}
}
-
+
// special cases
if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
-
+
//
// http://xml.org/sax/properties/xml-string
// Value type: String
@@ -1393,7 +1393,7 @@
// null (this is a good way to check for availability before the
// parse begins).
//
- if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
+ if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
propertyId.endsWith(Constants.XML_STRING_PROPERTY)) {
// REVISIT - we should probably ask xml-dev for a precise
// definition of what this is actually supposed to return, and
@@ -1411,7 +1411,7 @@
} // checkProperty(String)
- /**
+ /**
* Adds a component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1426,10 +1426,10 @@
}
fComponents.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addComponent(XMLComponent)
-
- /**
+
+ /**
* Adds common component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1446,8 +1446,8 @@
addRecognizedParamsAndSetDefaults(component);
} // addCommonComponent(XMLComponent)
-
- /**
+
+ /**
* Adds an XML 1.1 component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1462,9 +1462,9 @@
}
fXML11Components.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addXML11Component(XMLComponent)
-
+
/**
* Adds all of the component's recognized features and properties
* to the list of default recognized features and properties, and
@@ -1475,11 +1475,11 @@
* and properties will be added to the configuration
*/
protected void addRecognizedParamsAndSetDefaults(XMLComponent component) {
-
+
// register component's recognized features
String[] recognizedFeatures = component.getRecognizedFeatures();
addRecognizedFeatures(recognizedFeatures);
-
+
// register component's recognized properties
String[] recognizedProperties = component.getRecognizedProperties();
addRecognizedProperties(recognizedProperties);
@@ -1519,7 +1519,7 @@
}
}
}
- }
+ }
private void initXML11Components() {
if (!f11Initialized) {
@@ -1538,12 +1538,12 @@
addXML11Component(fXML11NSDocScanner);
fXML11NSDTDValidator = new XML11NSDTDValidator();
addXML11Component(fXML11NSDTDValidator);
-
+
f11Initialized = true;
}
}
-
- /**
+
+ /**
* Returns the state of a feature. This method calls getFeature()
* on ParserConfigurationSettings, bypassing getFeature() on this
* class.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11DTDConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -68,7 +68,7 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration;
/**
- * This class is the DTD-only parser configuration
+ * This class is the DTD-only parser configuration
* used to parse XML 1.0 and XML 1.1 documents.
*
*
@@ -115,48 +115,48 @@
"com.sun.org.apache.xerces.internal.impl.dv.dtd.XML11DTDDVFactoryImpl";
// feature identifiers
-
+
/** Feature identifier: validation. */
protected static final String VALIDATION =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
+
/** Feature identifier: namespaces. */
protected static final String NAMESPACES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
+
/** Feature identifier: external general entities. */
protected static final String EXTERNAL_GENERAL_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
+
/** Feature identifier: external parameter entities. */
protected static final String EXTERNAL_PARAMETER_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
+
/** Feature identifier: continue after fatal error. */
protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
+
/** Feature identifier: load external DTD. */
protected static final String LOAD_EXTERNAL_DTD =
Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
-
+
// property identifiers
- /** Property identifier: xml string. */
- protected static final String XML_STRING =
- Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
+ /** Property identifier: xml string. */
+ protected static final String XML_STRING =
+ Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
- /** Property identifier: symbol table. */
- protected static final String SYMBOL_TABLE =
- Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
+ /** Property identifier: symbol table. */
+ protected static final String SYMBOL_TABLE =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
- /** Property identifier: error handler. */
- protected static final String ERROR_HANDLER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
+ /** Property identifier: error handler. */
+ protected static final String ERROR_HANDLER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
- /** Property identifier: entity resolver. */
- protected static final String ENTITY_RESOLVER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
+ /** Property identifier: entity resolver. */
+ protected static final String ENTITY_RESOLVER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
/** Property identifier: error reporter. */
protected static final String ERROR_REPORTER =
@@ -199,18 +199,18 @@
/** Property identifier: JAXP schema language / DOM schema-type. */
protected static final String JAXP_SCHEMA_LANGUAGE =
- Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE;
+ Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE;
/** Property identifier: JAXP schema source/ DOM schema-location. */
protected static final String JAXP_SCHEMA_SOURCE =
- Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE;
+ Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_SOURCE;
// debugging
/** Set to true and recompile to print exception stack trace. */
protected static final boolean PRINT_EXCEPTION_STACK_TRACE = false;
- //
+ //
// Data
//
protected SymbolTable fSymbolTable;
@@ -219,88 +219,88 @@
protected XMLVersionDetector fVersionDetector;
protected XMLLocator fLocator;
protected Locale fLocale;
-
+
/** XML 1.0 Components. */
protected ArrayList fComponents;
-
+
/** XML 1.1. Components. */
protected ArrayList fXML11Components = null;
-
+
/** Common components: XMLEntityManager, XMLErrorReporter */
protected ArrayList fCommonComponents = null;
-
+
/** The document handler. */
protected XMLDocumentHandler fDocumentHandler;
-
+
/** The DTD handler. */
protected XMLDTDHandler fDTDHandler;
-
+
/** The DTD content model handler. */
protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
- /** Last component in the document pipeline */
+
+ /** Last component in the document pipeline */
protected XMLDocumentSource fLastComponent;
-
- /**
+
+ /**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
* validation and namespaces).
*/
protected boolean fParseInProgress = false;
-
- /**
- * fConfigUpdated is set to true if there has been any change to the configuration settings,
+
+ /**
+ * fConfigUpdated is set to true if there has been any change to the configuration settings,
* i.e a feature or a property was changed.
*/
protected boolean fConfigUpdated = false;
-
+
//
// XML 1.0 components
//
-
+
/** The XML 1.0 Datatype validator factory. */
protected DTDDVFactory fDatatypeValidatorFactory;
-
+
/** The XML 1.0 Document scanner that does namespace binding. */
protected XMLNSDocumentScannerImpl fNamespaceScanner;
-
+
/** The XML 1.0 Non-namespace implementation of scanner */
protected XMLDocumentScannerImpl fNonNSScanner;
-
+
/** The XML 1.0 DTD Validator: binds namespaces */
protected XMLDTDValidator fDTDValidator;
-
+
/** The XML 1.0 DTD Validator that does not bind namespaces */
protected XMLDTDValidator fNonNSDTDValidator;
-
+
/** The XML 1.0 DTD scanner. */
protected XMLDTDScanner fDTDScanner;
-
+
/** The XML 1.0 DTD Processor . */
protected XMLDTDProcessor fDTDProcessor;
-
+
//
// XML 1.1 components
//
-
+
/** The XML 1.1 datatype factory. **/
protected DTDDVFactory fXML11DatatypeFactory = null;
-
+
/** The XML 1.1 document scanner that does namespace binding. **/
protected XML11NSDocumentScannerImpl fXML11NSDocScanner = null;
-
+
/** The XML 1.1 document scanner that does not do namespace binding. **/
protected XML11DocumentScannerImpl fXML11DocScanner = null;
-
+
/** The XML 1.1 DTD validator that does namespace binding. **/
protected XML11NSDTDValidator fXML11NSDTDValidator = null;
-
+
/** The XML 1.1 DTD validator that does not do namespace binding. **/
protected XML11DTDValidator fXML11DTDValidator = null;
-
+
/** The XML 1.1 DTD scanner. **/
protected XML11DTDScannerImpl fXML11DTDScanner = null;
-
+
/** The XML 1.1 DTD processor. **/
protected XML11DTDProcessor fXML11DTDProcessor = null;
@@ -319,10 +319,10 @@
/** Current scanner */
protected XMLDocumentScanner fCurrentScanner;
-
+
/** Current Datatype validator factory. */
protected DTDDVFactory fCurrentDVFactory;
-
+
/** Current DTD scanner. */
protected XMLDTDScanner fCurrentDTDScanner;
@@ -338,8 +338,8 @@
this(null, null, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -351,7 +351,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -366,7 +366,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -378,105 +378,105 @@
SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
-
- super(parentSettings);
+
+ super(parentSettings);
- // create a vector to hold all the components in use
- // XML 1.0 specialized components
- fComponents = new ArrayList();
- // XML 1.1 specialized components
- fXML11Components = new ArrayList();
- // Common components for XML 1.1. and XML 1.0
- fCommonComponents = new ArrayList();
+ // create a vector to hold all the components in use
+ // XML 1.0 specialized components
+ fComponents = new ArrayList();
+ // XML 1.1 specialized components
+ fXML11Components = new ArrayList();
+ // Common components for XML 1.1. and XML 1.0
+ fCommonComponents = new ArrayList();
- // create table for features and properties
- fFeatures = new HashMap();
- fProperties = new HashMap();
+ // create table for features and properties
+ fFeatures = new HashMap();
+ fProperties = new HashMap();
// add default recognized features
final String[] recognizedFeatures =
- {
- CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
- VALIDATION,
- NAMESPACES,
- EXTERNAL_GENERAL_ENTITIES,
- EXTERNAL_PARAMETER_ENTITIES,
- PARSER_SETTINGS
- };
+ {
+ CONTINUE_AFTER_FATAL_ERROR, LOAD_EXTERNAL_DTD, // from XMLDTDScannerImpl
+ VALIDATION,
+ NAMESPACES,
+ EXTERNAL_GENERAL_ENTITIES,
+ EXTERNAL_PARAMETER_ENTITIES,
+ PARSER_SETTINGS
+ };
addRecognizedFeatures(recognizedFeatures);
- // set state for default features
- fFeatures.put(VALIDATION, Boolean.FALSE);
- fFeatures.put(NAMESPACES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
- fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
- fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE);
- fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
+ // set state for default features
+ fFeatures.put(VALIDATION, Boolean.FALSE);
+ fFeatures.put(NAMESPACES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
+ fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
+ fFeatures.put(LOAD_EXTERNAL_DTD, Boolean.TRUE);
+ fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
// add default recognized properties
final String[] recognizedProperties =
- {
- SYMBOL_TABLE,
- ERROR_HANDLER,
- ENTITY_RESOLVER,
+ {
+ SYMBOL_TABLE,
+ ERROR_HANDLER,
+ ENTITY_RESOLVER,
ERROR_REPORTER,
ENTITY_MANAGER,
DOCUMENT_SCANNER,
DTD_SCANNER,
DTD_PROCESSOR,
DTD_VALIDATOR,
- DATATYPE_VALIDATOR_FACTORY,
- VALIDATION_MANAGER,
- XML_STRING,
- XMLGRAMMAR_POOL,
+ DATATYPE_VALIDATOR_FACTORY,
+ VALIDATION_MANAGER,
+ XML_STRING,
+ XMLGRAMMAR_POOL,
JAXP_SCHEMA_SOURCE,
JAXP_SCHEMA_LANGUAGE};
addRecognizedProperties(recognizedProperties);
-
- if (symbolTable == null) {
- symbolTable = new SymbolTable();
- }
- fSymbolTable = symbolTable;
- fProperties.put(SYMBOL_TABLE, fSymbolTable);
-
+
+ if (symbolTable == null) {
+ symbolTable = new SymbolTable();
+ }
+ fSymbolTable = symbolTable;
+ fProperties.put(SYMBOL_TABLE, fSymbolTable);
+
fGrammarPool = grammarPool;
if (fGrammarPool != null) {
- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
+ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
}
fEntityManager = new XMLEntityManager();
- fProperties.put(ENTITY_MANAGER, fEntityManager);
+ fProperties.put(ENTITY_MANAGER, fEntityManager);
addCommonComponent(fEntityManager);
fErrorReporter = new XMLErrorReporter();
fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());
- fProperties.put(ERROR_REPORTER, fErrorReporter);
+ fProperties.put(ERROR_REPORTER, fErrorReporter);
addCommonComponent(fErrorReporter);
fNamespaceScanner = new XMLNSDocumentScannerImpl();
- fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
+ fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
addComponent((XMLComponent) fNamespaceScanner);
fDTDScanner = new XMLDTDScannerImpl();
- fProperties.put(DTD_SCANNER, fDTDScanner);
+ fProperties.put(DTD_SCANNER, fDTDScanner);
addComponent((XMLComponent) fDTDScanner);
fDTDProcessor = new XMLDTDProcessor();
- fProperties.put(DTD_PROCESSOR, fDTDProcessor);
+ fProperties.put(DTD_PROCESSOR, fDTDProcessor);
addComponent((XMLComponent) fDTDProcessor);
fDTDValidator = new XMLNSDTDValidator();
- fProperties.put(DTD_VALIDATOR, fDTDValidator);
+ fProperties.put(DTD_VALIDATOR, fDTDValidator);
addComponent(fDTDValidator);
-
+
fDatatypeValidatorFactory = DTDDVFactory.getInstance();
- fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
+ fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
fValidationManager = new ValidationManager();
- fProperties.put(VALIDATION_MANAGER, fValidationManager);
-
+ fProperties.put(VALIDATION_MANAGER, fValidationManager);
+
fVersionDetector = new XMLVersionDetector();
-
+
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
XMLMessageFormatter xmft = new XMLMessageFormatter();
@@ -491,8 +491,8 @@
// do nothing
// REVISIT: What is the right thing to do? -Ac
}
-
- fConfigUpdated = false;
+
+ fConfigUpdated = false;
} // (SymbolTable,XMLGrammarPool)
@@ -504,7 +504,7 @@
*
* @param inputSource The document's input source.
*
- * @exception XMLConfigurationException Thrown if there is a
+ * @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* @exception IOException Thrown on I/O error.
@@ -535,111 +535,111 @@
fLocale = locale;
fErrorReporter.setLocale(locale);
} // setLocale(Locale)
-
- /**
- * Sets the document handler on the last component in the pipeline
- * to receive information about the document.
- *
- * @param documentHandler The document handler.
- */
- public void setDocumentHandler(XMLDocumentHandler documentHandler) {
- fDocumentHandler = documentHandler;
- if (fLastComponent != null) {
- fLastComponent.setDocumentHandler(fDocumentHandler);
- if (fDocumentHandler !=null){
- fDocumentHandler.setDocumentSource(fLastComponent);
- }
- }
- } // setDocumentHandler(XMLDocumentHandler)
- /** Returns the registered document handler. */
- public XMLDocumentHandler getDocumentHandler() {
- return fDocumentHandler;
- } // getDocumentHandler():XMLDocumentHandler
+ /**
+ * Sets the document handler on the last component in the pipeline
+ * to receive information about the document.
+ *
+ * @param documentHandler The document handler.
+ */
+ public void setDocumentHandler(XMLDocumentHandler documentHandler) {
+ fDocumentHandler = documentHandler;
+ if (fLastComponent != null) {
+ fLastComponent.setDocumentHandler(fDocumentHandler);
+ if (fDocumentHandler !=null){
+ fDocumentHandler.setDocumentSource(fLastComponent);
+ }
+ }
+ } // setDocumentHandler(XMLDocumentHandler)
+
+ /** Returns the registered document handler. */
+ public XMLDocumentHandler getDocumentHandler() {
+ return fDocumentHandler;
+ } // getDocumentHandler():XMLDocumentHandler
- /**
- * Sets the DTD handler.
- *
- * @param dtdHandler The DTD handler.
- */
- public void setDTDHandler(XMLDTDHandler dtdHandler) {
- fDTDHandler = dtdHandler;
- } // setDTDHandler(XMLDTDHandler)
+ /**
+ * Sets the DTD handler.
+ *
+ * @param dtdHandler The DTD handler.
+ */
+ public void setDTDHandler(XMLDTDHandler dtdHandler) {
+ fDTDHandler = dtdHandler;
+ } // setDTDHandler(XMLDTDHandler)
- /** Returns the registered DTD handler. */
- public XMLDTDHandler getDTDHandler() {
- return fDTDHandler;
- } // getDTDHandler():XMLDTDHandler
+ /** Returns the registered DTD handler. */
+ public XMLDTDHandler getDTDHandler() {
+ return fDTDHandler;
+ } // getDTDHandler():XMLDTDHandler
- /**
- * Sets the DTD content model handler.
- *
- * @param handler The DTD content model handler.
- */
- public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
- fDTDContentModelHandler = handler;
- } // setDTDContentModelHandler(XMLDTDContentModelHandler)
+ /**
+ * Sets the DTD content model handler.
+ *
+ * @param handler The DTD content model handler.
+ */
+ public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
+ fDTDContentModelHandler = handler;
+ } // setDTDContentModelHandler(XMLDTDContentModelHandler)
- /** Returns the registered DTD content model handler. */
- public XMLDTDContentModelHandler getDTDContentModelHandler() {
- return fDTDContentModelHandler;
- } // getDTDContentModelHandler():XMLDTDContentModelHandler
+ /** Returns the registered DTD content model handler. */
+ public XMLDTDContentModelHandler getDTDContentModelHandler() {
+ return fDTDContentModelHandler;
+ } // getDTDContentModelHandler():XMLDTDContentModelHandler
- /**
- * Sets the resolver used to resolve external entities. The EntityResolver
- * interface supports resolution of public and system identifiers.
- *
- * @param resolver The new entity resolver. Passing a null value will
- * uninstall the currently installed resolver.
- */
- public void setEntityResolver(XMLEntityResolver resolver) {
- fProperties.put(ENTITY_RESOLVER, resolver);
- } // setEntityResolver(XMLEntityResolver)
+ /**
+ * Sets the resolver used to resolve external entities. The EntityResolver
+ * interface supports resolution of public and system identifiers.
+ *
+ * @param resolver The new entity resolver. Passing a null value will
+ * uninstall the currently installed resolver.
+ */
+ public void setEntityResolver(XMLEntityResolver resolver) {
+ fProperties.put(ENTITY_RESOLVER, resolver);
+ } // setEntityResolver(XMLEntityResolver)
+
+ /**
+ * Return the current entity resolver.
+ *
+ * @return The current entity resolver, or null if none
+ * has been registered.
+ * @see #setEntityResolver
+ */
+ public XMLEntityResolver getEntityResolver() {
+ return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
+ } // getEntityResolver():XMLEntityResolver
- /**
- * Return the current entity resolver.
- *
- * @return The current entity resolver, or null if none
- * has been registered.
- * @see #setEntityResolver
- */
- public XMLEntityResolver getEntityResolver() {
- return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
- } // getEntityResolver():XMLEntityResolver
-
- /**
- * Allow an application to register an error event handler.
- *
- * If the application does not register an error handler, all
- * error events reported by the SAX parser will be silently
- * ignored; however, normal processing may not continue. It is
- * highly recommended that all SAX applications implement an
- * error handler to avoid unexpected bugs.
- *
- * Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.
- *
- * @param errorHandler The error handler.
- * @exception java.lang.NullPointerException If the handler
- * argument is null.
- * @see #getErrorHandler
- */
- public void setErrorHandler(XMLErrorHandler errorHandler) {
- fProperties.put(ERROR_HANDLER, errorHandler);
- } // setErrorHandler(XMLErrorHandler)
+ /**
+ * Allow an application to register an error event handler.
+ *
+ * If the application does not register an error handler, all
+ * error events reported by the SAX parser will be silently
+ * ignored; however, normal processing may not continue. It is
+ * highly recommended that all SAX applications implement an
+ * error handler to avoid unexpected bugs.
+ *
+ * Applications may register a new or different handler in the
+ * middle of a parse, and the SAX parser must begin using the new
+ * handler immediately.
+ *
+ * @param errorHandler The error handler.
+ * @exception java.lang.NullPointerException If the handler
+ * argument is null.
+ * @see #getErrorHandler
+ */
+ public void setErrorHandler(XMLErrorHandler errorHandler) {
+ fProperties.put(ERROR_HANDLER, errorHandler);
+ } // setErrorHandler(XMLErrorHandler)
- /**
- * Return the current error handler.
- *
- * @return The current error handler, or null if none
- * has been registered.
- * @see #setErrorHandler
- */
- public XMLErrorHandler getErrorHandler() {
- // REVISIT: Should this be a property?
- return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
- } // getErrorHandler():XMLErrorHandler
+ /**
+ * Return the current error handler.
+ *
+ * @return The current error handler, or null if none
+ * has been registered.
+ * @see #setErrorHandler
+ */
+ public XMLErrorHandler getErrorHandler() {
+ // REVISIT: Should this be a property?
+ return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
+ } // getErrorHandler():XMLErrorHandler
/**
@@ -699,7 +699,7 @@
// reset and configure pipeline and set InputSource.
if (fInputSource != null) {
try {
- fValidationManager.reset();
+ fValidationManager.reset();
fVersionDetector.reset(this);
resetCommon();
@@ -712,7 +712,7 @@
configurePipeline();
reset();
}
-
+
// mark configuration as fixed
fConfigUpdated = false;
@@ -759,158 +759,158 @@
}
} // parse(boolean):boolean
-
- /**
- * Returns the state of a feature.
- *
- * @param featureId The feature identifier.
- * @return true if the feature is supported
- *
- * @throws XMLConfigurationException Thrown for configuration error.
- * In general, components should
- * only throw this exception if
- * it is really
- * a critical error.
- */
- public FeatureState getFeatureState(String featureId)
- throws XMLConfigurationException {
- // make this feature special
+
+ /**
+ * Returns the state of a feature.
+ *
+ * @param featureId The feature identifier.
+ * @return true if the feature is supported
+ *
+ * @throws XMLConfigurationException Thrown for configuration error.
+ * In general, components should
+ * only throw this exception if
+ * it is really
+ * a critical error.
+ */
+ public FeatureState getFeatureState(String featureId)
+ throws XMLConfigurationException {
+ // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
- return FeatureState.is(fConfigUpdated);
+ return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);
- } // getFeature(String):boolean
-
- /**
- * Set the state of a feature.
- *
- * Set the state of any feature in a SAX2 parser. The parser
- * might not recognize the feature, and if it does recognize
- * it, it might not be able to fulfill the request.
- *
- * @param featureId The unique identifier (URI) of the feature.
- * @param state The requested state of the feature (true or false).
- *
- * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
- * requested feature is not known.
- */
- public void setFeature(String featureId, boolean state)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setFeature(featureId, state);
- }
- // forward it to common components
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setFeature(featureId, state);
- }
-
- // forward to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setFeature(featureId, state);
- }
- catch (Exception e){
- // no op
- }
- }
- // save state if noone "objects"
- super.setFeature(featureId, state);
+ } // getFeature(String):boolean
+
+ /**
+ * Set the state of a feature.
+ *
+ * Set the state of any feature in a SAX2 parser. The parser
+ * might not recognize the feature, and if it does recognize
+ * it, it might not be able to fulfill the request.
+ *
+ * @param featureId The unique identifier (URI) of the feature.
+ * @param state The requested state of the feature (true or false).
+ *
+ * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
+ * requested feature is not known.
+ */
+ public void setFeature(String featureId, boolean state)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+ // forward it to common components
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+
+ // forward to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setFeature(featureId, state);
+ }
+ catch (Exception e){
+ // no op
+ }
+ }
+ // save state if noone "objects"
+ super.setFeature(featureId, state);
+
+ } // setFeature(String,boolean)
- } // setFeature(String,boolean)
-
- /**
- * setProperty
- *
- * @param propertyId
- * @param value
- */
- public void setProperty(String propertyId, Object value)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every common Component
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setProperty(propertyId, value);
- }
- catch (Exception e){
- // ignore it
- }
- }
+ /**
+ * setProperty
+ *
+ * @param propertyId
+ * @param value
+ */
+ public void setProperty(String propertyId, Object value)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every common Component
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setProperty(propertyId, value);
+ }
+ catch (Exception e){
+ // ignore it
+ }
+ }
- // store value if noone "objects"
- super.setProperty(propertyId, value);
+ // store value if noone "objects"
+ super.setProperty(propertyId, value);
- } // setProperty(String,Object)
-
+ } // setProperty(String,Object)
+
- /** Returns the locale. */
- public Locale getLocale() {
- return fLocale;
- } // getLocale():Locale
-
- /**
- * reset all XML 1.0 components before parsing and namespace context
- */
- protected void reset() throws XNIException {
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.reset(this);
- }
+ /** Returns the locale. */
+ public Locale getLocale() {
+ return fLocale;
+ } // getLocale():Locale
+
+ /**
+ * reset all XML 1.0 components before parsing and namespace context
+ */
+ protected void reset() throws XNIException {
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.reset(this);
+ }
+
+ } // reset()
- } // reset()
-
- /**
- * reset all common components before parsing
- */
- protected void resetCommon() throws XNIException {
- // reset common components
- int count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.reset(this);
- }
+ /**
+ * reset all common components before parsing
+ */
+ protected void resetCommon() throws XNIException {
+ // reset common components
+ int count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.reset(this);
+ }
+
+ } // resetCommon()
- } // resetCommon()
-
- /**
- * reset all components before parsing and namespace context
- */
- protected void resetXML11() throws XNIException {
- // reset every component
- int count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- c.reset(this);
- }
+ /**
+ * reset all components before parsing and namespace context
+ */
+ protected void resetXML11() throws XNIException {
+ // reset every component
+ int count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ c.reset(this);
+ }
- } // resetXML11()
+ } // resetXML11()
/**
- * Configures the XML 1.1 pipeline.
+ * Configures the XML 1.1 pipeline.
* Note: this method also resets the new XML11 components.
*/
protected void configureXML11Pipeline() {
@@ -921,7 +921,7 @@
if (fCurrentDTDScanner != fXML11DTDScanner) {
fCurrentDTDScanner = fXML11DTDScanner;
setProperty(DTD_SCANNER, fCurrentDTDScanner);
- setProperty(DTD_PROCESSOR, fXML11DTDProcessor);
+ setProperty(DTD_PROCESSOR, fXML11DTDProcessor);
}
fXML11DTDScanner.setDTDHandler(fXML11DTDProcessor);
@@ -957,14 +957,14 @@
fLastComponent = fXML11NSDTDValidator;
} else {
- // create components
- if (fXML11DocScanner == null) {
- // non namespace document pipeline
- fXML11DocScanner = new XML11DocumentScannerImpl();
- addXML11Component(fXML11DocScanner);
- fXML11DTDValidator = new XML11DTDValidator();
- addXML11Component(fXML11DTDValidator);
- }
+ // create components
+ if (fXML11DocScanner == null) {
+ // non namespace document pipeline
+ fXML11DocScanner = new XML11DocumentScannerImpl();
+ addXML11Component(fXML11DocScanner);
+ fXML11DTDValidator = new XML11DTDValidator();
+ addXML11Component(fXML11DTDValidator);
+ }
if (fCurrentScanner != fXML11DocScanner) {
fCurrentScanner = fXML11DocScanner;
setProperty(DOCUMENT_SCANNER, fXML11DocScanner);
@@ -1074,14 +1074,14 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/dynamic
// Allows the parser to validate a document only when it
// contains a grammar. Validation is turned on/off based
// on each document instance, automatically.
//
- if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -1097,7 +1097,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -1105,14 +1105,14 @@
//
// http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
//
- if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
//
- if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -1120,13 +1120,13 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
return FeatureState.NOT_SUPPORTED;
}
-
- // special performance feature: only component manager is allowed to set it.
- if (suffixLength == Constants.PARSER_SETTINGS.length() &&
+
+ // special performance feature: only component manager is allowed to set it.
+ if (suffixLength == Constants.PARSER_SETTINGS.length() &&
featureId.endsWith(Constants.PARSER_SETTINGS)) {
return FeatureState.NOT_SUPPORTED;
}
@@ -1162,16 +1162,16 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
+ if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
}
-
+
// special cases
if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
-
+
//
// http://xml.org/sax/properties/xml-string
// Value type: String
@@ -1182,7 +1182,7 @@
// null (this is a good way to check for availability before the
// parse begins).
//
- if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
+ if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
propertyId.endsWith(Constants.XML_STRING_PROPERTY)) {
// REVISIT - we should probably ask xml-dev for a precise
// definition of what this is actually supposed to return, and
@@ -1200,7 +1200,7 @@
} // checkProperty(String)
- /**
+ /**
* Adds a component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1215,10 +1215,10 @@
}
fComponents.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addComponent(XMLComponent)
-
- /**
+
+ /**
* Adds common component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1235,8 +1235,8 @@
addRecognizedParamsAndSetDefaults(component);
} // addCommonComponent(XMLComponent)
-
- /**
+
+ /**
* Adds an XML 1.1 component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1251,9 +1251,9 @@
}
fXML11Components.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addXML11Component(XMLComponent)
-
+
/**
* Adds all of the component's recognized features and properties
* to the list of default recognized features and properties, and
@@ -1264,11 +1264,11 @@
* and properties will be added to the configuration
*/
protected void addRecognizedParamsAndSetDefaults(XMLComponent component) {
-
+
// register component's recognized features
String[] recognizedFeatures = component.getRecognizedFeatures();
addRecognizedFeatures(recognizedFeatures);
-
+
// register component's recognized properties
String[] recognizedProperties = component.getRecognizedProperties();
addRecognizedProperties(recognizedProperties);
@@ -1308,7 +1308,7 @@
}
}
}
- }
+ }
private void initXML11Components() {
if (!f11Initialized) {
@@ -1327,7 +1327,7 @@
addXML11Component(fXML11NSDocScanner);
fXML11NSDTDValidator = new XML11NSDTDValidator();
addXML11Component(fXML11NSDTDValidator);
-
+
f11Initialized = true;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XML11NonValidatingConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -62,12 +62,12 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLPullParserConfiguration;
/**
- * This class is the non vlaidating parser configuration
+ * This class is the non vlaidating parser configuration
* used to parse XML 1.0 and XML 1.1 documents.
*
- * Xerces parser that uses this configuration is not conformant
- * non-validating XML processor, since conformant non-validating processor is required
- * to process "all the declarations they read in the internal DTD subset ... must use the information in those declarations to normalize attribute values,
+ * Xerces parser that uses this configuration is not conformant
+ * non-validating XML processor, since conformant non-validating processor is required
+ * to process "all the declarations they read in the internal DTD subset ... must use the information in those declarations to normalize attribute values,
* include the replacement text of internal entities, and supply default attribute values".
* @author Elena Litani, IBM
@@ -90,42 +90,42 @@
/** Feature identifier: validation. */
protected static final String VALIDATION =
Constants.SAX_FEATURE_PREFIX + Constants.VALIDATION_FEATURE;
-
+
/** Feature identifier: namespaces. */
protected static final String NAMESPACES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
+
/** Feature identifier: external general entities. */
protected static final String EXTERNAL_GENERAL_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
-
+
/** Feature identifier: external parameter entities. */
protected static final String EXTERNAL_PARAMETER_ENTITIES =
Constants.SAX_FEATURE_PREFIX + Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
-
-
+
+
/** Feature identifier: continue after fatal error. */
protected static final String CONTINUE_AFTER_FATAL_ERROR =
Constants.XERCES_FEATURE_PREFIX + Constants.CONTINUE_AFTER_FATAL_ERROR_FEATURE;
-
+
// property identifiers
- /** Property identifier: xml string. */
- protected static final String XML_STRING =
- Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
+ /** Property identifier: xml string. */
+ protected static final String XML_STRING =
+ Constants.SAX_PROPERTY_PREFIX + Constants.XML_STRING_PROPERTY;
- /** Property identifier: symbol table. */
- protected static final String SYMBOL_TABLE =
- Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
+ /** Property identifier: symbol table. */
+ protected static final String SYMBOL_TABLE =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
- /** Property identifier: error handler. */
- protected static final String ERROR_HANDLER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
+ /** Property identifier: error handler. */
+ protected static final String ERROR_HANDLER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
- /** Property identifier: entity resolver. */
- protected static final String ENTITY_RESOLVER =
- Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
+ /** Property identifier: entity resolver. */
+ protected static final String ENTITY_RESOLVER =
+ Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
/** Property identifier: error reporter. */
protected static final String ERROR_REPORTER =
@@ -167,7 +167,7 @@
/** Set to true and recompile to print exception stack trace. */
protected static final boolean PRINT_EXCEPTION_STACK_TRACE = false;
- //
+ //
// Data
//
protected SymbolTable fSymbolTable;
@@ -176,95 +176,95 @@
protected XMLVersionDetector fVersionDetector;
protected XMLLocator fLocator;
protected Locale fLocale;
-
+
/** XML 1.0 Components. */
protected ArrayList fComponents;
-
+
/** XML 1.1. Components. */
protected ArrayList fXML11Components = null;
-
+
/** Common components: XMLEntityManager, XMLErrorReporter */
protected ArrayList fCommonComponents = null;
-
+
/** The document handler. */
protected XMLDocumentHandler fDocumentHandler;
-
+
/** The DTD handler. */
protected XMLDTDHandler fDTDHandler;
-
+
/** The DTD content model handler. */
protected XMLDTDContentModelHandler fDTDContentModelHandler;
-
- /** Last component in the document pipeline */
+
+ /** Last component in the document pipeline */
protected XMLDocumentSource fLastComponent;
-
- /**
+
+ /**
* True if a parse is in progress. This state is needed because
* some features/properties cannot be set while parsing (e.g.
* namespaces).
*/
protected boolean fParseInProgress = false;
-
- /** fConfigUpdated is set to true if there has been any change to the configuration settings,
+
+ /** fConfigUpdated is set to true if there has been any change to the configuration settings,
* i.e a feature or a property was changed.
*/
protected boolean fConfigUpdated = false;
-
+
//
// XML 1.0 components
//
-
+
/** The XML 1.0 Datatype validator factory. */
protected DTDDVFactory fDatatypeValidatorFactory;
-
+
/** The XML 1.0 Document scanner that does namespace binding. */
protected XMLNSDocumentScannerImpl fNamespaceScanner;
-
+
/** The XML 1.0 Non-namespace implementation of scanner */
protected XMLDocumentScannerImpl fNonNSScanner;
-
+
/** The XML 1.0 DTD scanner. */
protected XMLDTDScanner fDTDScanner;
-
+
//
// XML 1.1 components
//
-
+
/** The XML 1.1 datatype factory. **/
protected DTDDVFactory fXML11DatatypeFactory = null;
-
+
/** The XML 1.1 document scanner that does namespace binding. **/
protected XML11NSDocumentScannerImpl fXML11NSDocScanner = null;
-
+
/** The XML 1.1 document scanner that does not do namespace binding. **/
protected XML11DocumentScannerImpl fXML11DocScanner = null;
-
+
/** The XML 1.1 DTD scanner. **/
protected XML11DTDScannerImpl fXML11DTDScanner = null;
-
+
//
// Common components
//
-
+
/** Grammar pool. */
protected XMLGrammarPool fGrammarPool;
-
+
/** Error reporter. */
protected XMLErrorReporter fErrorReporter;
-
+
/** Entity manager. */
protected XMLEntityManager fEntityManager;
-
+
/** Current scanner */
protected XMLDocumentScanner fCurrentScanner;
-
+
/** Current Datatype validator factory. */
protected DTDDVFactory fCurrentDVFactory;
-
+
/** Current DTD scanner. */
protected XMLDTDScanner fCurrentDTDScanner;
-
-
+
+
/** Flag indiciating whether XML11 components have been initialized. */
private boolean f11Initialized = false;
@@ -277,8 +277,8 @@
this(null, null, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -290,7 +290,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -305,7 +305,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -317,95 +317,95 @@
SymbolTable symbolTable,
XMLGrammarPool grammarPool,
XMLComponentManager parentSettings) {
-
- super(parentSettings);
+
+ super(parentSettings);
- // create a vector to hold all the components in use
- // XML 1.0 specialized components
- fComponents = new ArrayList();
- // XML 1.1 specialized components
- fXML11Components = new ArrayList();
- // Common components for XML 1.1. and XML 1.0
- fCommonComponents = new ArrayList();
+ // create a vector to hold all the components in use
+ // XML 1.0 specialized components
+ fComponents = new ArrayList();
+ // XML 1.1 specialized components
+ fXML11Components = new ArrayList();
+ // Common components for XML 1.1. and XML 1.0
+ fCommonComponents = new ArrayList();
- // create table for features and properties
- fFeatures = new HashMap();
- fProperties = new HashMap();
+ // create table for features and properties
+ fFeatures = new HashMap();
+ fProperties = new HashMap();
// add default recognized features
final String[] recognizedFeatures =
- {
- CONTINUE_AFTER_FATAL_ERROR, // from XMLDTDScannerImpl
- VALIDATION,
- NAMESPACES,
- EXTERNAL_GENERAL_ENTITIES,
- EXTERNAL_PARAMETER_ENTITIES,
- PARSER_SETTINGS
- };
+ {
+ CONTINUE_AFTER_FATAL_ERROR, // from XMLDTDScannerImpl
+ VALIDATION,
+ NAMESPACES,
+ EXTERNAL_GENERAL_ENTITIES,
+ EXTERNAL_PARAMETER_ENTITIES,
+ PARSER_SETTINGS
+ };
addRecognizedFeatures(recognizedFeatures);
-
- // set state for default features
- fFeatures.put(VALIDATION, Boolean.FALSE);
- fFeatures.put(NAMESPACES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
- fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
- fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
- fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
+
+ // set state for default features
+ fFeatures.put(VALIDATION, Boolean.FALSE);
+ fFeatures.put(NAMESPACES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_GENERAL_ENTITIES, Boolean.TRUE);
+ fFeatures.put(EXTERNAL_PARAMETER_ENTITIES, Boolean.TRUE);
+ fFeatures.put(CONTINUE_AFTER_FATAL_ERROR, Boolean.FALSE);
+ fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
// add default recognized properties
final String[] recognizedProperties =
- {
+ {
XML_STRING,
SYMBOL_TABLE,
- ERROR_HANDLER,
- ENTITY_RESOLVER,
+ ERROR_HANDLER,
+ ENTITY_RESOLVER,
ERROR_REPORTER,
ENTITY_MANAGER,
DOCUMENT_SCANNER,
DTD_SCANNER,
DTD_VALIDATOR,
- DATATYPE_VALIDATOR_FACTORY,
- VALIDATION_MANAGER,
- XML_STRING,
+ DATATYPE_VALIDATOR_FACTORY,
+ VALIDATION_MANAGER,
+ XML_STRING,
XMLGRAMMAR_POOL, };
addRecognizedProperties(recognizedProperties);
-
- if (symbolTable == null) {
- symbolTable = new SymbolTable();
- }
- fSymbolTable = symbolTable;
- fProperties.put(SYMBOL_TABLE, fSymbolTable);
-
+
+ if (symbolTable == null) {
+ symbolTable = new SymbolTable();
+ }
+ fSymbolTable = symbolTable;
+ fProperties.put(SYMBOL_TABLE, fSymbolTable);
+
fGrammarPool = grammarPool;
if (fGrammarPool != null) {
- fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
+ fProperties.put(XMLGRAMMAR_POOL, fGrammarPool);
}
fEntityManager = new XMLEntityManager();
- fProperties.put(ENTITY_MANAGER, fEntityManager);
+ fProperties.put(ENTITY_MANAGER, fEntityManager);
addCommonComponent(fEntityManager);
fErrorReporter = new XMLErrorReporter();
fErrorReporter.setDocumentLocator(fEntityManager.getEntityScanner());
- fProperties.put(ERROR_REPORTER, fErrorReporter);
+ fProperties.put(ERROR_REPORTER, fErrorReporter);
addCommonComponent(fErrorReporter);
fNamespaceScanner = new XMLNSDocumentScannerImpl();
- fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
+ fProperties.put(DOCUMENT_SCANNER, fNamespaceScanner);
addComponent((XMLComponent) fNamespaceScanner);
fDTDScanner = new XMLDTDScannerImpl();
- fProperties.put(DTD_SCANNER, fDTDScanner);
+ fProperties.put(DTD_SCANNER, fDTDScanner);
addComponent((XMLComponent) fDTDScanner);
-
+
fDatatypeValidatorFactory = DTDDVFactory.getInstance();
- fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
+ fProperties.put(DATATYPE_VALIDATOR_FACTORY, fDatatypeValidatorFactory);
fValidationManager = new ValidationManager();
- fProperties.put(VALIDATION_MANAGER, fValidationManager);
-
+ fProperties.put(VALIDATION_MANAGER, fValidationManager);
+
fVersionDetector = new XMLVersionDetector();
-
+
// add message formatters
if (fErrorReporter.getMessageFormatter(XMLMessageFormatter.XML_DOMAIN) == null) {
XMLMessageFormatter xmft = new XMLMessageFormatter();
@@ -420,8 +420,8 @@
// do nothing
// REVISIT: What is the right thing to do? -Ac
}
-
- fConfigUpdated = false;
+
+ fConfigUpdated = false;
} // (SymbolTable,XMLGrammarPool)
@@ -430,7 +430,7 @@
*
* @param inputSource The document's input source.
*
- * @exception XMLConfigurationException Thrown if there is a
+ * @exception XMLConfigurationException Thrown if there is a
* configuration error when initializing the
* parser.
* @exception IOException Thrown on I/O error.
@@ -461,111 +461,111 @@
fLocale = locale;
fErrorReporter.setLocale(locale);
} // setLocale(Locale)
-
- /**
- * Sets the document handler on the last component in the pipeline
- * to receive information about the document.
- *
- * @param documentHandler The document handler.
- */
- public void setDocumentHandler(XMLDocumentHandler documentHandler) {
- fDocumentHandler = documentHandler;
- if (fLastComponent != null) {
- fLastComponent.setDocumentHandler(fDocumentHandler);
- if (fDocumentHandler !=null){
- fDocumentHandler.setDocumentSource(fLastComponent);
- }
- }
- } // setDocumentHandler(XMLDocumentHandler)
- /** Returns the registered document handler. */
- public XMLDocumentHandler getDocumentHandler() {
- return fDocumentHandler;
- } // getDocumentHandler():XMLDocumentHandler
+ /**
+ * Sets the document handler on the last component in the pipeline
+ * to receive information about the document.
+ *
+ * @param documentHandler The document handler.
+ */
+ public void setDocumentHandler(XMLDocumentHandler documentHandler) {
+ fDocumentHandler = documentHandler;
+ if (fLastComponent != null) {
+ fLastComponent.setDocumentHandler(fDocumentHandler);
+ if (fDocumentHandler !=null){
+ fDocumentHandler.setDocumentSource(fLastComponent);
+ }
+ }
+ } // setDocumentHandler(XMLDocumentHandler)
+
+ /** Returns the registered document handler. */
+ public XMLDocumentHandler getDocumentHandler() {
+ return fDocumentHandler;
+ } // getDocumentHandler():XMLDocumentHandler
- /**
- * Sets the DTD handler.
- *
- * @param dtdHandler The DTD handler.
- */
- public void setDTDHandler(XMLDTDHandler dtdHandler) {
- fDTDHandler = dtdHandler;
- } // setDTDHandler(XMLDTDHandler)
+ /**
+ * Sets the DTD handler.
+ *
+ * @param dtdHandler The DTD handler.
+ */
+ public void setDTDHandler(XMLDTDHandler dtdHandler) {
+ fDTDHandler = dtdHandler;
+ } // setDTDHandler(XMLDTDHandler)
- /** Returns the registered DTD handler. */
- public XMLDTDHandler getDTDHandler() {
- return fDTDHandler;
- } // getDTDHandler():XMLDTDHandler
+ /** Returns the registered DTD handler. */
+ public XMLDTDHandler getDTDHandler() {
+ return fDTDHandler;
+ } // getDTDHandler():XMLDTDHandler
- /**
- * Sets the DTD content model handler.
- *
- * @param handler The DTD content model handler.
- */
- public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
- fDTDContentModelHandler = handler;
- } // setDTDContentModelHandler(XMLDTDContentModelHandler)
+ /**
+ * Sets the DTD content model handler.
+ *
+ * @param handler The DTD content model handler.
+ */
+ public void setDTDContentModelHandler(XMLDTDContentModelHandler handler) {
+ fDTDContentModelHandler = handler;
+ } // setDTDContentModelHandler(XMLDTDContentModelHandler)
- /** Returns the registered DTD content model handler. */
- public XMLDTDContentModelHandler getDTDContentModelHandler() {
- return fDTDContentModelHandler;
- } // getDTDContentModelHandler():XMLDTDContentModelHandler
+ /** Returns the registered DTD content model handler. */
+ public XMLDTDContentModelHandler getDTDContentModelHandler() {
+ return fDTDContentModelHandler;
+ } // getDTDContentModelHandler():XMLDTDContentModelHandler
- /**
- * Sets the resolver used to resolve external entities. The EntityResolver
- * interface supports resolution of public and system identifiers.
- *
- * @param resolver The new entity resolver. Passing a null value will
- * uninstall the currently installed resolver.
- */
- public void setEntityResolver(XMLEntityResolver resolver) {
- fProperties.put(ENTITY_RESOLVER, resolver);
- } // setEntityResolver(XMLEntityResolver)
+ /**
+ * Sets the resolver used to resolve external entities. The EntityResolver
+ * interface supports resolution of public and system identifiers.
+ *
+ * @param resolver The new entity resolver. Passing a null value will
+ * uninstall the currently installed resolver.
+ */
+ public void setEntityResolver(XMLEntityResolver resolver) {
+ fProperties.put(ENTITY_RESOLVER, resolver);
+ } // setEntityResolver(XMLEntityResolver)
+
+ /**
+ * Return the current entity resolver.
+ *
+ * @return The current entity resolver, or null if none
+ * has been registered.
+ * @see #setEntityResolver
+ */
+ public XMLEntityResolver getEntityResolver() {
+ return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
+ } // getEntityResolver():XMLEntityResolver
- /**
- * Return the current entity resolver.
- *
- * @return The current entity resolver, or null if none
- * has been registered.
- * @see #setEntityResolver
- */
- public XMLEntityResolver getEntityResolver() {
- return (XMLEntityResolver)fProperties.get(ENTITY_RESOLVER);
- } // getEntityResolver():XMLEntityResolver
-
- /**
- * Allow an application to register an error event handler.
- *
- * If the application does not register an error handler, all
- * error events reported by the SAX parser will be silently
- * ignored; however, normal processing may not continue. It is
- * highly recommended that all SAX applications implement an
- * error handler to avoid unexpected bugs.
- *
- * Applications may register a new or different handler in the
- * middle of a parse, and the SAX parser must begin using the new
- * handler immediately.
- *
- * @param errorHandler The error handler.
- * @exception java.lang.NullPointerException If the handler
- * argument is null.
- * @see #getErrorHandler
- */
- public void setErrorHandler(XMLErrorHandler errorHandler) {
- fProperties.put(ERROR_HANDLER, errorHandler);
- } // setErrorHandler(XMLErrorHandler)
+ /**
+ * Allow an application to register an error event handler.
+ *
+ * If the application does not register an error handler, all
+ * error events reported by the SAX parser will be silently
+ * ignored; however, normal processing may not continue. It is
+ * highly recommended that all SAX applications implement an
+ * error handler to avoid unexpected bugs.
+ *
+ * Applications may register a new or different handler in the
+ * middle of a parse, and the SAX parser must begin using the new
+ * handler immediately.
+ *
+ * @param errorHandler The error handler.
+ * @exception java.lang.NullPointerException If the handler
+ * argument is null.
+ * @see #getErrorHandler
+ */
+ public void setErrorHandler(XMLErrorHandler errorHandler) {
+ fProperties.put(ERROR_HANDLER, errorHandler);
+ } // setErrorHandler(XMLErrorHandler)
- /**
- * Return the current error handler.
- *
- * @return The current error handler, or null if none
- * has been registered.
- * @see #setErrorHandler
- */
- public XMLErrorHandler getErrorHandler() {
- // REVISIT: Should this be a property?
- return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
- } // getErrorHandler():XMLErrorHandler
+ /**
+ * Return the current error handler.
+ *
+ * @return The current error handler, or null if none
+ * has been registered.
+ * @see #setErrorHandler
+ */
+ public XMLErrorHandler getErrorHandler() {
+ // REVISIT: Should this be a property?
+ return (XMLErrorHandler)fProperties.get(ERROR_HANDLER);
+ } // getErrorHandler():XMLErrorHandler
/**
@@ -625,7 +625,7 @@
// reset and configure pipeline and set InputSource.
if (fInputSource != null) {
try {
- fValidationManager.reset();
+ fValidationManager.reset();
fVersionDetector.reset(this);
resetCommon();
@@ -638,7 +638,7 @@
configurePipeline();
reset();
}
-
+
// mark configuration as fixed
fConfigUpdated = false;
@@ -685,160 +685,160 @@
}
} // parse(boolean):boolean
-
- /**
- * Returns the state of a feature.
- *
- * @param featureId The feature identifier.
- * @return true if the feature is supported
- *
- * @throws XMLConfigurationException Thrown for configuration error.
- * In general, components should
- * only throw this exception if
- * it is really
- * a critical error.
- */
- public FeatureState getFeatureState(String featureId)
- throws XMLConfigurationException {
- // make this feature special
+
+ /**
+ * Returns the state of a feature.
+ *
+ * @param featureId The feature identifier.
+ * @return true if the feature is supported
+ *
+ * @throws XMLConfigurationException Thrown for configuration error.
+ * In general, components should
+ * only throw this exception if
+ * it is really
+ * a critical error.
+ */
+ public FeatureState getFeatureState(String featureId)
+ throws XMLConfigurationException {
+ // make this feature special
if (featureId.equals(PARSER_SETTINGS)){
- return FeatureState.is(fConfigUpdated);
+ return FeatureState.is(fConfigUpdated);
}
return super.getFeatureState(featureId);
- } // getFeature(String):boolean
-
- /**
- * Set the state of a feature.
- *
- * Set the state of any feature in a SAX2 parser. The parser
- * might not recognize the feature, and if it does recognize
- * it, it might not be able to fulfill the request.
- *
- * @param featureId The unique identifier (URI) of the feature.
- * @param state The requested state of the feature (true or false).
- *
- * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
- * requested feature is not known.
- */
- public void setFeature(String featureId, boolean state)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setFeature(featureId, state);
- }
- // forward it to common components
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setFeature(featureId, state);
- }
-
- // forward to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setFeature(featureId, state);
- }
- catch (Exception e){
- // no op
- }
- }
- // save state if noone "objects"
- super.setFeature(featureId, state);
+ } // getFeature(String):boolean
+
+ /**
+ * Set the state of a feature.
+ *
+ * Set the state of any feature in a SAX2 parser. The parser
+ * might not recognize the feature, and if it does recognize
+ * it, it might not be able to fulfill the request.
+ *
+ * @param featureId The unique identifier (URI) of the feature.
+ * @param state The requested state of the feature (true or false).
+ *
+ * @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
+ * requested feature is not known.
+ */
+ public void setFeature(String featureId, boolean state)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+ // forward it to common components
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setFeature(featureId, state);
+ }
+
+ // forward to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setFeature(featureId, state);
+ }
+ catch (Exception e){
+ // no op
+ }
+ }
+ // save state if noone "objects"
+ super.setFeature(featureId, state);
+
+ } // setFeature(String,boolean)
- } // setFeature(String,boolean)
-
- /**
- * setProperty
- *
- * @param propertyId
- * @param value
- */
- public void setProperty(String propertyId, Object value)
- throws XMLConfigurationException {
- fConfigUpdated = true;
- // forward to every XML 1.0 component
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every common Component
- count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.setProperty(propertyId, value);
- }
- // forward it to every XML 1.1 component
- count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- try{
- c.setProperty(propertyId, value);
- }
- catch (Exception e){
- // ignore it
- }
- }
+ /**
+ * setProperty
+ *
+ * @param propertyId
+ * @param value
+ */
+ public void setProperty(String propertyId, Object value)
+ throws XMLConfigurationException {
+ fConfigUpdated = true;
+ // forward to every XML 1.0 component
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every common Component
+ count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.setProperty(propertyId, value);
+ }
+ // forward it to every XML 1.1 component
+ count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ try{
+ c.setProperty(propertyId, value);
+ }
+ catch (Exception e){
+ // ignore it
+ }
+ }
- // store value if noone "objects"
- super.setProperty(propertyId, value);
+ // store value if noone "objects"
+ super.setProperty(propertyId, value);
- } // setProperty(String,Object)
-
+ } // setProperty(String,Object)
+
- /** Returns the locale. */
- public Locale getLocale() {
- return fLocale;
- } // getLocale():Locale
-
- /**
- * reset all XML 1.0 components before parsing and namespace context
- */
- protected void reset() throws XNIException {
- int count = fComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fComponents.get(i);
- c.reset(this);
- }
+ /** Returns the locale. */
+ public Locale getLocale() {
+ return fLocale;
+ } // getLocale():Locale
+
+ /**
+ * reset all XML 1.0 components before parsing and namespace context
+ */
+ protected void reset() throws XNIException {
+ int count = fComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fComponents.get(i);
+ c.reset(this);
+ }
+
+ } // reset()
- } // reset()
-
- /**
- * reset all common components before parsing
- */
- protected void resetCommon() throws XNIException {
- // reset common components
- int count = fCommonComponents.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fCommonComponents.get(i);
- c.reset(this);
- }
+ /**
+ * reset all common components before parsing
+ */
+ protected void resetCommon() throws XNIException {
+ // reset common components
+ int count = fCommonComponents.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fCommonComponents.get(i);
+ c.reset(this);
+ }
+
+ } // resetCommon()
- } // resetCommon()
-
-
- /**
- * reset all components before parsing and namespace context
- */
- protected void resetXML11() throws XNIException {
- // reset every component
- int count = fXML11Components.size();
- for (int i = 0; i < count; i++) {
- XMLComponent c = (XMLComponent) fXML11Components.get(i);
- c.reset(this);
- }
- } // resetXML11()
+ /**
+ * reset all components before parsing and namespace context
+ */
+ protected void resetXML11() throws XNIException {
+ // reset every component
+ int count = fXML11Components.size();
+ for (int i = 0; i < count; i++) {
+ XMLComponent c = (XMLComponent) fXML11Components.get(i);
+ c.reset(this);
+ }
+
+ } // resetXML11()
/**
- * Configures the XML 1.1 pipeline.
+ * Configures the XML 1.1 pipeline.
* Note: this method also resets the new XML11 components.
*/
protected void configureXML11Pipeline() {
@@ -846,7 +846,7 @@
fCurrentDVFactory = fXML11DatatypeFactory;
setProperty(DATATYPE_VALIDATOR_FACTORY, fCurrentDVFactory);
}
-
+
// setup DTD pipeline
if (fCurrentDTDScanner != fXML11DTDScanner) {
fCurrentDTDScanner = fXML11DTDScanner;
@@ -870,12 +870,12 @@
fLastComponent = fXML11NSDocScanner;
} else {
- // create components
- if (fXML11DocScanner == null) {
- // non namespace document pipeline
- fXML11DocScanner = new XML11DocumentScannerImpl();
- addXML11Component(fXML11DocScanner);
- }
+ // create components
+ if (fXML11DocScanner == null) {
+ // non namespace document pipeline
+ fXML11DocScanner = new XML11DocumentScannerImpl();
+ addXML11Component(fXML11DocScanner);
+ }
if (fCurrentScanner != fXML11DocScanner) {
fCurrentScanner = fXML11DocScanner;
setProperty(DOCUMENT_SCANNER, fXML11DocScanner);
@@ -924,12 +924,12 @@
fNonNSScanner = new XMLDocumentScannerImpl();
// add components
addComponent((XMLComponent) fNonNSScanner);
-
+
}
if (fCurrentScanner != fNonNSScanner) {
fCurrentScanner = fNonNSScanner;
setProperty(DOCUMENT_SCANNER, fNonNSScanner);
-
+
}
fNonNSScanner.setDocumentHandler(fDocumentHandler);
@@ -964,14 +964,14 @@
if (featureId.startsWith(Constants.XERCES_FEATURE_PREFIX)) {
final int suffixLength = featureId.length() - Constants.XERCES_FEATURE_PREFIX.length();
-
+
//
// http://apache.org/xml/features/validation/dynamic
// Allows the parser to validate a document only when it
// contains a grammar. Validation is turned on/off based
// on each document instance, automatically.
//
- if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
+ if (suffixLength == Constants.DYNAMIC_VALIDATION_FEATURE.length() &&
featureId.endsWith(Constants.DYNAMIC_VALIDATION_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -987,7 +987,7 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_CONTENT_MODELS_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_CONTENT_MODELS_FEATURE)) {
// REVISIT
return FeatureState.NOT_SUPPORTED;
@@ -995,14 +995,14 @@
//
// http://apache.org/xml/features/validation/nonvalidating/load-dtd-grammar
//
- if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_DTD_GRAMMAR_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_DTD_GRAMMAR_FEATURE)) {
return FeatureState.RECOGNIZED;
}
//
// http://apache.org/xml/features/validation/nonvalidating/load-external-dtd
//
- if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
+ if (suffixLength == Constants.LOAD_EXTERNAL_DTD_FEATURE.length() &&
featureId.endsWith(Constants.LOAD_EXTERNAL_DTD_FEATURE)) {
return FeatureState.RECOGNIZED;
}
@@ -1010,12 +1010,12 @@
//
// http://apache.org/xml/features/validation/default-attribute-values
//
- if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
+ if (suffixLength == Constants.VALIDATE_DATATYPES_FEATURE.length() &&
featureId.endsWith(Constants.VALIDATE_DATATYPES_FEATURE)) {
return FeatureState.NOT_SUPPORTED;
}
-
- // special performance feature: only component manager is allowed to set it.
+
+ // special performance feature: only component manager is allowed to set it.
if (suffixLength == Constants.PARSER_SETTINGS.length() &&
featureId.endsWith(Constants.PARSER_SETTINGS)) {
return FeatureState.NOT_SUPPORTED;
@@ -1052,25 +1052,25 @@
if (propertyId.startsWith(Constants.XERCES_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.XERCES_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
+ if (suffixLength == Constants.DTD_SCANNER_PROPERTY.length() &&
propertyId.endsWith(Constants.DTD_SCANNER_PROPERTY)) {
return PropertyState.RECOGNIZED;
}
}
-
+
if (propertyId.startsWith(Constants.JAXP_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.JAXP_PROPERTY_PREFIX.length();
- if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
+ if (suffixLength == Constants.SCHEMA_SOURCE.length() &&
propertyId.endsWith(Constants.SCHEMA_SOURCE)) {
return PropertyState.RECOGNIZED;
}
}
-
+
// special cases
if (propertyId.startsWith(Constants.SAX_PROPERTY_PREFIX)) {
final int suffixLength = propertyId.length() - Constants.SAX_PROPERTY_PREFIX.length();
-
+
//
// http://xml.org/sax/properties/xml-string
// Value type: String
@@ -1081,7 +1081,7 @@
// null (this is a good way to check for availability before the
// parse begins).
//
- if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
+ if (suffixLength == Constants.XML_STRING_PROPERTY.length() &&
propertyId.endsWith(Constants.XML_STRING_PROPERTY)) {
// REVISIT - we should probably ask xml-dev for a precise
// definition of what this is actually supposed to return, and
@@ -1099,7 +1099,7 @@
} // checkProperty(String)
- /**
+ /**
* Adds a component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1114,10 +1114,10 @@
}
fComponents.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addComponent(XMLComponent)
-
- /**
+
+ /**
* Adds common component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1134,8 +1134,8 @@
addRecognizedParamsAndSetDefaults(component);
} // addCommonComponent(XMLComponent)
-
- /**
+
+ /**
* Adds an XML 1.1 component to the parser configuration. This method will
* also add all of the component's recognized features and properties
* to the list of default recognized features and properties.
@@ -1150,9 +1150,9 @@
}
fXML11Components.add(component);
addRecognizedParamsAndSetDefaults(component);
-
+
} // addXML11Component(XMLComponent)
-
+
/**
* Adds all of the component's recognized features and properties
* to the list of default recognized features and properties, and
@@ -1163,11 +1163,11 @@
* and properties will be added to the configuration
*/
protected void addRecognizedParamsAndSetDefaults(XMLComponent component) {
-
+
// register component's recognized features
String[] recognizedFeatures = component.getRecognizedFeatures();
addRecognizedFeatures(recognizedFeatures);
-
+
// register component's recognized properties
String[] recognizedProperties = component.getRecognizedProperties();
addRecognizedProperties(recognizedProperties);
@@ -1207,7 +1207,7 @@
}
}
}
- }
+ }
private void initXML11Components() {
if (!f11Initialized) {
@@ -1222,7 +1222,7 @@
// setup XML 1.1. document pipeline - namespace aware
fXML11NSDocScanner = new XML11NSDocumentScannerImpl();
addXML11Component(fXML11NSDocScanner);
-
+
f11Initialized = true;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLDocumentParser.java Wed May 02 13:32:36 2012 +0100
@@ -33,6 +33,7 @@
* @author Arnaud Le Hors, IBM
* @author Andy Clark, IBM
*
+ * @version $Id: XMLDocumentParser.java,v 1.6 2010-11-01 04:40:10 joehw Exp $
*/
public class XMLDocumentParser
extends AbstractXMLDocumentParser {
@@ -46,10 +47,7 @@
* configuration.
*/
public XMLDocumentParser() {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
} // ()
/**
@@ -63,10 +61,7 @@
* Constructs a document parser using the specified symbol table.
*/
public XMLDocumentParser(SymbolTable symbolTable) {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable);
} // (SymbolTable)
@@ -76,10 +71,7 @@
*/
public XMLDocumentParser(SymbolTable symbolTable,
XMLGrammarPool grammarPool) {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable);
fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.XMLGRAMMAR_POOL_PROPERTY, grammarPool);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarCachingConfiguration.java Wed May 02 13:32:36 2012 +0100
@@ -55,7 +55,7 @@
* directly.
*
* In addition to the features and properties recognized by the base
- * parser configuration, this class recognizes these additional
+ * parser configuration, this class recognizes these additional
* features and properties:
*
*
@@ -64,7 +64,7 @@
*
* @version $Id: XMLGrammarCachingConfiguration.java,v 1.6 2010-11-01 04:40:10 joehw Exp $
*/
-public class XMLGrammarCachingConfiguration
+public class XMLGrammarCachingConfiguration
extends XIncludeAwareParserConfiguration {
//
@@ -78,7 +78,7 @@
public static final int BIG_PRIME = 2039;
// the static symbol table to be shared amongst parsers
- protected static final SynchronizedSymbolTable fStaticSymbolTable =
+ protected static final SynchronizedSymbolTable fStaticSymbolTable =
new SynchronizedSymbolTable(BIG_PRIME);
// the Grammar Pool to be shared similarly
@@ -91,7 +91,7 @@
// Data
- // variables needed for caching schema grammars.
+ // variables needed for caching schema grammars.
protected XMLSchemaLoader fSchemaLoader;
// the DTD grammar loader
@@ -106,8 +106,8 @@
this(fStaticSymbolTable, fStaticGrammarPool, null);
} // ()
- /**
- * Constructs a parser configuration using the specified symbol table.
+ /**
+ * Constructs a parser configuration using the specified symbol table.
*
* @param symbolTable The symbol table to use.
*/
@@ -119,7 +119,7 @@
* Constructs a parser configuration using the specified symbol table and
* grammar pool.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -135,7 +135,7 @@
* Constructs a parser configuration using the specified symbol table,
* grammar pool, and parent settings.
*
- * REVISIT:
+ * REVISIT:
* Grammar pool will be updated when the new validation engine is
* implemented.
*
@@ -168,7 +168,7 @@
/*
* lock the XMLGrammarPoolImpl object so that it does not
- * accept any more grammars from the validators.
+ * accept any more grammars from the validators.
*/
public void lockGrammarPool() {
fGrammarPool.lockPool();
@@ -176,15 +176,15 @@
/*
* clear the XMLGrammarPoolImpl object so that it does not
- * contain any more grammars.
+ * contain any more grammars.
*/
public void clearGrammarPool() {
fGrammarPool.clear();
} // clearGrammarPool()
/*
- * unlock the XMLGrammarPoolImpl object so that it
- * accepts more grammars from the validators.
+ * unlock the XMLGrammarPoolImpl object so that it
+ * accepts more grammars from the validators.
*/
public void unlockGrammarPool() {
fGrammarPool.unlockPool();
@@ -213,7 +213,7 @@
/**
* Parse a grammar from a location identified by an
- * XMLInputSource.
+ * XMLInputSource.
* This method also adds this grammar to the XMLGrammarPool
*
* @param type The type of the grammar to be constructed
@@ -242,15 +242,15 @@
//
// Protected methods
//
-
+
// package-protected methods
- /* This method parses an XML Schema document.
+ /* This method parses an XML Schema document.
* It requires a GrammarBucket parameter so that DOMASBuilder can
* extract the info it needs.
* Therefore, bucket must not be null!
*/
- SchemaGrammar parseXMLSchema(XMLInputSource is)
+ SchemaGrammar parseXMLSchema(XMLInputSource is)
throws IOException {
XMLEntityResolver resolver = getEntityResolver();
if(resolver != null) {
@@ -258,7 +258,7 @@
}
if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) {
fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter());
- }
+ }
fSchemaLoader.setProperty(ERROR_REPORTER, fErrorReporter);
String propPrefix = Constants.XERCES_PROPERTY_PREFIX;
@@ -279,14 +279,14 @@
fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_SCHEMA,
new Grammar[]{grammar});
}
-
+
return grammar;
} // parseXMLSchema(XMLInputSource) : SchemaGrammar
/* This method parses an external DTD entity.
*/
- DTDGrammar parseDTD(XMLInputSource is)
+ DTDGrammar parseDTD(XMLInputSource is)
throws IOException {
XMLEntityResolver resolver = getEntityResolver();
if(resolver != null) {
@@ -303,7 +303,7 @@
fGrammarPool.cacheGrammars(XMLGrammarDescription.XML_DTD,
new Grammar[]{grammar});
}
-
+
return grammar;
} // parseXMLDTD(XMLInputSource) : DTDGrammar
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarParser.java Wed May 02 13:32:36 2012 +0100
@@ -23,9 +23,9 @@
import com.sun.org.apache.xerces.internal.impl.Constants;
import com.sun.org.apache.xerces.internal.impl.dv.DTDDVFactory;
import com.sun.org.apache.xerces.internal.util.SymbolTable;
-import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration;
/**
+ * @version $Id: XMLGrammarParser.java,v 1.6 2010-11-01 04:40:10 joehw Exp $
*/
public abstract class XMLGrammarParser
extends XMLParser {
@@ -47,10 +47,7 @@
* @param symbolTable
*/
protected XMLGrammarParser(SymbolTable symbolTable) {
- super((XMLParserConfiguration)ObjectFactory.createObject(
- "com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- "com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration"
- ));
+ super(new XIncludeAwareParserConfiguration());
fConfiguration.setProperty(Constants.XERCES_PROPERTY_PREFIX+Constants.SYMBOL_TABLE_PROPERTY, symbolTable);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLGrammarPreparser.java Wed May 02 13:32:36 2012 +0100
@@ -37,6 +37,7 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLEntityResolver;
import com.sun.org.apache.xerces.internal.xni.parser.XMLErrorHandler;
import com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
/**
*
This class provides an easy way for a user to preparse grammars
@@ -48,7 +49,7 @@
*
* @author Neil Graham, IBM
*
- * @version $Id: XMLGrammarPreparser.java,v 1.6 2010/07/23 02:09:28 joehw Exp $
+ * @version $Id: XMLGrammarPreparser.java,v 1.7 2010-11-01 04:40:10 joehw Exp $
*/
public class XMLGrammarPreparser {
@@ -155,8 +156,7 @@
// got one; just instantiate it...
String loaderName = (String)KNOWN_LOADERS.get(grammarType);
try {
- ClassLoader cl = ObjectFactory.findClassLoader();
- XMLGrammarLoader gl = (XMLGrammarLoader)(ObjectFactory.newInstance(loaderName, cl, true));
+ XMLGrammarLoader gl = (XMLGrammarLoader)(ObjectFactory.newInstance(loaderName, true));
fLoaders.put(grammarType, gl);
} catch (Exception e) {
return false;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/parsers/XMLParser.java Wed May 02 13:32:36 2012 +0100
@@ -58,11 +58,11 @@
// properties
/** Property identifier: entity resolver. */
- protected static final String ENTITY_RESOLVER =
+ protected static final String ENTITY_RESOLVER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_RESOLVER_PROPERTY;
/** Property identifier: error handler. */
- protected static final String ERROR_HANDLER =
+ protected static final String ERROR_HANDLER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_HANDLER_PROPERTY;
/** Recognized properties. */
@@ -85,12 +85,12 @@
/**
* Query the state of a feature.
*/
- public boolean getFeature(String featureId)
+ public boolean getFeature(String featureId)
throws SAXNotSupportedException, SAXNotRecognizedException {
return fConfiguration.getFeature(featureId);
}
-
+
/**
* Default Constructor.
*/
@@ -116,13 +116,13 @@
* @exception XNIException
* @exception java.io.IOException
*/
- public void parse(XMLInputSource inputSource)
+ public void parse(XMLInputSource inputSource)
throws XNIException, IOException {
reset();
fConfiguration.parse(inputSource);
- } // parse(XMLInputSource)
+ } // parse(XMLInputSource)
//
// Protected methods
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/DOMUtil.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/DOMUtil.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/DOMUtil.java Wed May 02 13:32:36 2012 +0100
@@ -324,7 +324,7 @@
((com.sun.org.apache.xerces.internal.impl.xs.opti.NodeImpl)node).setReadOnly(true, false);
}
else {
- hiddenNodes.put(node, "");
+ hiddenNodes.put(node, "");
}
} // setHidden(node):void
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/FeatureState.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/FeatureState.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/FeatureState.java Wed May 02 13:32:36 2012 +0100
@@ -1,64 +1,64 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
- */
-
-/*
- * $Id: FeatureState.java 3024 2011-03-01 03:46:13Z joehw $
- */
-
-package com.sun.org.apache.xerces.internal.util;
-
-public class FeatureState {
-
- public final Status status;
- public final boolean state;
-
- public static final FeatureState SET_ENABLED = new FeatureState(Status.SET, true);
- public static final FeatureState SET_DISABLED = new FeatureState(Status.SET, false);
- public static final FeatureState UNKNOWN = new FeatureState(Status.UNKNOWN, false);
- public static final FeatureState RECOGNIZED = new FeatureState(Status.RECOGNIZED, false);
- public static final FeatureState NOT_SUPPORTED = new FeatureState(Status.NOT_SUPPORTED, false);
- public static final FeatureState NOT_RECOGNIZED = new FeatureState(Status.NOT_RECOGNIZED, false);
- public static final FeatureState NOT_ALLOWED = new FeatureState(Status.NOT_ALLOWED, false);
-
- public FeatureState(Status status, boolean state) {
- this.status = status;
- this.state = state;
- }
-
- public static FeatureState of(Status status) {
- return new FeatureState(status, false);
- }
-
- public static FeatureState is(boolean value) {
- return new FeatureState(Status.SET, value);
- }
-
- public boolean isExceptional() {
- return this.status.isExceptional();
- }
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+ */
+
+/*
+ * $Id: FeatureState.java 3024 2011-03-01 03:46:13Z joehw $
+ */
+
+package com.sun.org.apache.xerces.internal.util;
+
+public class FeatureState {
+
+ public final Status status;
+ public final boolean state;
+
+ public static final FeatureState SET_ENABLED = new FeatureState(Status.SET, true);
+ public static final FeatureState SET_DISABLED = new FeatureState(Status.SET, false);
+ public static final FeatureState UNKNOWN = new FeatureState(Status.UNKNOWN, false);
+ public static final FeatureState RECOGNIZED = new FeatureState(Status.RECOGNIZED, false);
+ public static final FeatureState NOT_SUPPORTED = new FeatureState(Status.NOT_SUPPORTED, false);
+ public static final FeatureState NOT_RECOGNIZED = new FeatureState(Status.NOT_RECOGNIZED, false);
+ public static final FeatureState NOT_ALLOWED = new FeatureState(Status.NOT_ALLOWED, false);
+
+ public FeatureState(Status status, boolean state) {
+ this.status = status;
+ this.state = state;
+ }
+
+ public static FeatureState of(Status status) {
+ return new FeatureState(status, false);
+ }
+
+ public static FeatureState is(boolean value) {
+ return new FeatureState(Status.SET, value);
+ }
+
+ public boolean isExceptional() {
+ return this.status.isExceptional();
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/NamespaceContextWrapper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/NamespaceContextWrapper.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/NamespaceContextWrapper.java Wed May 02 13:32:36 2012 +0100
@@ -30,9 +30,9 @@
import javax.xml.namespace.NamespaceContext;
/**
- * Writing a wrapper to re-use most of the namespace functionality
+ * Writing a wrapper to re-use most of the namespace functionality
* already provided by NamespaceSupport, which implements NamespaceContext
- * from XNI. It would be good if we can change the XNI NamespaceContext
+ * from XNI. It would be good if we can change the XNI NamespaceContext
* interface to implement the JAXP NamespaceContext interface.
*
* Note that NamespaceSupport assumes the use of symbols. Since this class
@@ -44,27 +44,27 @@
*
*/
public class NamespaceContextWrapper implements NamespaceContext {
-
+
private com.sun.org.apache.xerces.internal.xni.NamespaceContext fNamespaceContext;
-
+
public NamespaceContextWrapper(NamespaceSupport namespaceContext) {
fNamespaceContext = namespaceContext ;
}
-
+
public String getNamespaceURI(String prefix) {
if (prefix == null) {
throw new IllegalArgumentException("Prefix can't be null");
}
return fNamespaceContext.getURI(prefix.intern());
}
-
+
public String getPrefix(String namespaceURI) {
if (namespaceURI == null) {
throw new IllegalArgumentException("URI can't be null.");
}
return fNamespaceContext.getPrefix(namespaceURI.intern());
}
-
+
/**
* TODO: Namespace doesn't give information giving multiple prefixes for
* the same namespaceURI.
@@ -72,14 +72,14 @@
public java.util.Iterator getPrefixes(String namespaceURI) {
if (namespaceURI == null) {
throw new IllegalArgumentException("URI can't be null.");
- }
+ }
else {
- Vector vector =
+ Vector vector =
((NamespaceSupport) fNamespaceContext).getPrefixes(namespaceURI.intern());
return vector.iterator();
}
}
-
+
/**
* This method supports all functions in the NamespaceContext utility class
*/
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/ParserConfigurationSettings.java Wed May 02 13:32:36 2012 +0100
@@ -47,9 +47,9 @@
*/
public class ParserConfigurationSettings
implements XMLComponentManager {
-
- protected static final String PARSER_SETTINGS =
- Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
+
+ protected static final String PARSER_SETTINGS =
+ Constants.XERCES_FEATURE_PREFIX + Constants.PARSER_SETTINGS;
//
// Data
@@ -108,11 +108,20 @@
* Allows a parser to add parser specific features to be recognized
* and managed by the parser configuration.
*
- * @param featureIds An array of the additional feature identifiers
+ * @param featureIds An array of the additional feature identifiers
* to be recognized.
*/
public void addRecognizedFeatures(String[] featureIds) {
- fRecognizedFeatures.addAll(Arrays.asList(featureIds));
+
+ // add recognized features
+ int featureIdsCount = featureIds != null ? featureIds.length : 0;
+ for (int i = 0; i < featureIdsCount; i++) {
+ String featureId = featureIds[i];
+ if (!fRecognizedFeatures.contains(featureId)) {
+ fRecognizedFeatures.add(featureId);
+ }
+ }
+
} // addRecognizedFeatures(String[])
/**
@@ -144,7 +153,7 @@
* Allows a parser to add parser specific properties to be recognized
* and managed by the parser configuration.
*
- * @param propertyIds An array of the additional property identifiers
+ * @param propertyIds An array of the additional property identifiers
* to be recognized.
*/
public void addRecognizedProperties(String[] propertyIds) {
@@ -153,9 +162,9 @@
/**
* setProperty
- *
- * @param propertyId
- * @param value
+ *
+ * @param propertyId
+ * @param value
* @exception com.sun.org.apache.xerces.internal.xni.parser.XMLConfigurationException If the
* requested feature is not known.
*/
@@ -177,10 +186,10 @@
/**
* Returns the state of a feature.
- *
+ *
* @param featureId The feature identifier.
- * @return true if the feature is supported
- *
+ * @return true if the feature is supported
+ *
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
@@ -220,10 +229,10 @@
/**
* Returns the value of a property.
- *
+ *
* @param propertyId The property identifier.
- * @return the value of the property
- *
+ * @return the value of the property
+ *
* @throws XMLConfigurationException Thrown for configuration error.
* In general, components should
* only throw this exception if
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/PropertyState.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/PropertyState.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/PropertyState.java Wed May 02 13:32:36 2012 +0100
@@ -1,62 +1,62 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
- */
-
-/*
- * $Id: PropertyState.java 3024 2011-03-01 03:46:13Z joehw $
- */
-package com.sun.org.apache.xerces.internal.util;
-
-public class PropertyState {
-
- public final Status status;
- public final Object state;
-
- public static final PropertyState UNKNOWN = new PropertyState(Status.UNKNOWN, null);
- public static final PropertyState RECOGNIZED = new PropertyState(Status.RECOGNIZED, null);
- public static final PropertyState NOT_SUPPORTED = new PropertyState(Status.NOT_SUPPORTED, null);
- public static final PropertyState NOT_RECOGNIZED = new PropertyState(Status.NOT_RECOGNIZED, null);
- public static final PropertyState NOT_ALLOWED = new PropertyState(Status.NOT_ALLOWED, null);
-
-
- public PropertyState(Status status, Object state) {
- this.status = status;
- this.state = state;
- }
-
- public static PropertyState of(Status status) {
- return new PropertyState(status, null);
- }
-
- public static PropertyState is(Object value) {
- return new PropertyState(Status.SET, value);
- }
-
- public boolean isExceptional() {
- return this.status.isExceptional();
- }
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+ */
+
+/*
+ * $Id: PropertyState.java 3024 2011-03-01 03:46:13Z joehw $
+ */
+package com.sun.org.apache.xerces.internal.util;
+
+public class PropertyState {
+
+ public final Status status;
+ public final Object state;
+
+ public static final PropertyState UNKNOWN = new PropertyState(Status.UNKNOWN, null);
+ public static final PropertyState RECOGNIZED = new PropertyState(Status.RECOGNIZED, null);
+ public static final PropertyState NOT_SUPPORTED = new PropertyState(Status.NOT_SUPPORTED, null);
+ public static final PropertyState NOT_RECOGNIZED = new PropertyState(Status.NOT_RECOGNIZED, null);
+ public static final PropertyState NOT_ALLOWED = new PropertyState(Status.NOT_ALLOWED, null);
+
+
+ public PropertyState(Status status, Object state) {
+ this.status = status;
+ this.state = state;
+ }
+
+ public static PropertyState of(Status status) {
+ return new PropertyState(status, null);
+ }
+
+ public static PropertyState is(Object value) {
+ return new PropertyState(Status.SET, value);
+ }
+
+ public boolean isExceptional() {
+ return this.status.isExceptional();
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/Status.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/Status.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/Status.java Wed May 02 13:32:36 2012 +0100
@@ -1,59 +1,59 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
- */
-
-/*
- * $Id: Status.java 3024 2011-03-01 03:46:13Z joehw $
- */
-package com.sun.org.apache.xerces.internal.util;
-
-public enum Status {
- SET((short)-3, false),
- UNKNOWN((short)-2, false),
- RECOGNIZED((short)-1, false),
- NOT_SUPPORTED((short)0, true),
- NOT_RECOGNIZED((short)1, true),
- NOT_ALLOWED((short)2, true),
- ;
-
- private final short type;
-
- private boolean isExceptional;
-
- Status(short type, boolean isExceptional) {
- this.type = type;
- this.isExceptional = isExceptional;
- }
-
- public short getType() {
- return type;
- }
-
- public boolean isExceptional() {
- return isExceptional;
- }
-}
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved.
+ */
+
+/*
+ * $Id: Status.java 3024 2011-03-01 03:46:13Z joehw $
+ */
+package com.sun.org.apache.xerces.internal.util;
+
+public enum Status {
+ SET((short)-3, false),
+ UNKNOWN((short)-2, false),
+ RECOGNIZED((short)-1, false),
+ NOT_SUPPORTED((short)0, true),
+ NOT_RECOGNIZED((short)1, true),
+ NOT_ALLOWED((short)2, true),
+ ;
+
+ private final short type;
+
+ private boolean isExceptional;
+
+ Status(short type, boolean isExceptional) {
+ this.type = type;
+ this.isExceptional = isExceptional;
+ }
+
+ public short getType() {
+ return type;
+ }
+
+ public boolean isExceptional() {
+ return isExceptional;
+ }
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolHash.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolHash.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/SymbolHash.java Wed May 02 13:32:36 2012 +0100
@@ -26,7 +26,7 @@
* to Object mapping.
*
* The hash code uses the same algorithm as SymbolTable class.
- *
+ *
* @author Elena Litani
* @version $Id: SymbolHash.java,v 1.7 2010-11-01 04:40:14 joehw Exp $
*/
@@ -223,4 +223,3 @@
} // entry
} // class SymbolHash
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XML11Char.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XML11Char.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XML11Char.java Wed May 02 13:32:36 2012 +0100
@@ -413,4 +413,3 @@
} // isXML11ValidName(String):boolean
} // class XML11Char
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XMLAttributesImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XMLAttributesImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/util/XMLAttributesImpl.java Wed May 02 13:32:36 2012 +0100
@@ -68,8 +68,8 @@
import com.sun.org.apache.xerces.internal.xni.XMLString;
/**
* The XMLAttributesImpl class is an implementation of the XMLAttributes
- * interface which defines a collection of attributes for an element.
- * In the parser, the document source would scan the entire start element
+ * interface which defines a collection of attributes for an element.
+ * In the parser, the document source would scan the entire start element
* and collect the attributes. The attributes are communicated to the
* document handler in the startElement method.
*
@@ -79,7 +79,7 @@
*
* @see com.sun.org.apache.xerces.internal.xni.XMLDocumentHandler#startElement
*
- * @author Andy Clark, IBM
+ * @author Andy Clark, IBM
* @author Elena Litani, IBM
* @author Michael Glavassevich, IBM
*
@@ -91,16 +91,16 @@
//
// Constants
//
-
+
/** Default table size. */
protected static final int TABLE_SIZE = 101;
-
- /**
+
+ /**
* Threshold at which an instance is treated
* as a large attribute list.
*/
protected static final int SIZE_LIMIT = 20;
-
+
//
// Data
//
@@ -112,25 +112,25 @@
// data
- /**
- * Usage count for the attribute table view.
+ /**
+ * Usage count for the attribute table view.
* Incremented each time all attributes are removed
* when the attribute table view is in use.
*/
protected int fLargeCount = 1;
-
+
/** Attribute count. */
protected int fLength;
/** Attribute information. */
protected Attribute[] fAttributes = new Attribute[4];
- /**
- * Hashtable of attribute information.
- * Provides an alternate view of the attribute specification.
+ /**
+ * Hashtable of attribute information.
+ * Provides an alternate view of the attribute specification.
*/
protected Attribute[] fAttributeTableView;
-
+
/**
* Tracks whether each chain in the hash table is stale
* with respect to the current state of this object.
@@ -138,12 +138,12 @@
* of times the attribute table view has been used.
*/
protected int[] fAttributeTableViewChainState;
-
+
/**
* Actual number of buckets in the table view.
*/
protected int fTableViewBuckets;
-
+
/**
* Indicates whether the table view contains consistent data.
*/
@@ -157,7 +157,7 @@
public XMLAttributesImpl() {
this(TABLE_SIZE);
}
-
+
/**
* @param tableSize initial size of table view
*/
@@ -172,7 +172,7 @@
// Public methods
//
- /**
+ /**
* Sets whether namespace processing is being performed. This state
* is needed to return the correct value from the getLocalName method.
*
@@ -199,18 +199,18 @@
* Note: If an attribute of the same name already
* exists, the old values for the attribute are replaced by the new
* values.
- *
+ *
* @param name The attribute name.
* @param type The attribute type. The type name is determined by
* the type specified for this attribute in the DTD.
* For example: "CDATA", "ID", "NMTOKEN", etc. However,
* attributes of type enumeration will have the type
* value specified as the pipe ('|') separated list of
- * the enumeration values prefixed by an open
+ * the enumeration values prefixed by an open
* parenthesis and suffixed by a close parenthesis.
* For example: "(true|false)".
* @param value The attribute value.
- *
+ *
* @return Returns the attribute index.
*
* @see #setNonNormalizedValue
@@ -223,10 +223,10 @@
int index;
if (fLength < SIZE_LIMIT) {
- index = name.uri != null && !name.uri.equals("")
+ index = name.uri != null && !name.uri.equals("")
? getIndexFast(name.uri, name.localpart)
: getIndexFast(name.rawname);
-
+
if (index == -1) {
index = fLength;
if (fLength++ == fAttributes.length) {
@@ -239,14 +239,14 @@
}
}
}
- else if (name.uri == null ||
- name.uri.length() == 0 ||
+ else if (name.uri == null ||
+ name.uri.length() == 0 ||
(index = getIndexFast(name.uri, name.localpart)) == -1) {
-
+
/**
* If attributes were removed from the list after the table
* becomes in use this isn't reflected in the table view. It's
- * assumed that once a user starts removing attributes they're
+ * assumed that once a user starts removing attributes they're
* not likely to add more. We only make the view consistent if
* the user of this class adds attributes, removes them, and
* then adds more.
@@ -256,9 +256,9 @@
fIsTableViewConsistent = true;
}
- int bucket = getTableViewBucket(name.rawname);
-
- // The chain is stale.
+ int bucket = getTableViewBucket(name.rawname);
+
+ // The chain is stale.
// This must be a unique attribute.
if (fAttributeTableViewChainState[bucket] != fLargeCount) {
index = fLength;
@@ -270,13 +270,13 @@
}
fAttributes = attributes;
}
-
+
// Update table view.
fAttributeTableViewChainState[bucket] = fLargeCount;
fAttributes[index].next = null;
fAttributeTableView[bucket] = fAttributes[index];
}
- // This chain is active.
+ // This chain is active.
// We need to check if any of the attributes has the same rawname.
else {
// Search the table.
@@ -298,7 +298,7 @@
}
fAttributes = attributes;
}
-
+
// Update table view
fAttributes[index].next = fAttributeTableView[bucket];
fAttributeTableView[bucket] = fAttributes[index];
@@ -308,7 +308,7 @@
index = getIndexFast(name.rawname);
}
}
- }
+ }
// set values
Attribute attribute = fAttributes[index];
@@ -322,12 +322,12 @@
// clear augmentations
if(attribute.augs != null)
attribute.augs.removeAllItems();
-
+
return index;
} // addAttribute(QName,String,XMLString)
- /**
+ /**
* Removes all of the attributes. This method will also remove all
* entities associated to the attributes.
*/
@@ -340,7 +340,7 @@
*
* Note: This operation changes the indexes of all
* attributes following the attribute at the specified index.
- *
+ *
* @param attrIndex The attribute index.
*/
public void removeAttributeAt(int attrIndex) {
@@ -358,7 +358,7 @@
/**
* Sets the name of the attribute at the specified index.
- *
+ *
* @param attrIndex The attribute index.
* @param attrName The new attribute name.
*/
@@ -369,7 +369,7 @@
/**
* Sets the fields in the given QName structure with the values
* of the attribute name at the specified index.
- *
+ *
* @param attrIndex The attribute index.
* @param attrName The attribute name structure to fill in.
*/
@@ -379,14 +379,14 @@
/**
* Sets the type of the attribute at the specified index.
- *
+ *
* @param attrIndex The attribute index.
* @param attrType The attribute type. The type name is determined by
* the type specified for this attribute in the DTD.
* For example: "CDATA", "ID", "NMTOKEN", etc. However,
* attributes of type enumeration will have the type
* value specified as the pipe ('|') separated list of
- * the enumeration values prefixed by an open
+ * the enumeration values prefixed by an open
* parenthesis and suffixed by a close parenthesis.
* For example: "(true|false)".
*/
@@ -397,7 +397,7 @@
/**
* Sets the value of the attribute at the specified index. This
* method will overwrite the non-normalized value of the attribute.
- *
+ *
* @param attrIndex The attribute index.
* @param attrValue The new attribute value.
*
@@ -406,7 +406,7 @@
public void setValue(int attrIndex, String attrValue) {
setValue(attrIndex,attrValue,null);
}
-
+
public void setValue(int attrIndex, String attrValue,XMLString value) {
Attribute attribute = fAttributes[attrIndex];
attribute.value = attrValue;
@@ -580,7 +580,7 @@
* @param i The index of the attribute in the list (starting at 0).
* @return The name of the indexed attribute, or null
* if the index is out of range.
- * @see #getLength
+ * @see #getLength
*/
public String getName(int index) {
if (index < 0 || index >= fLength) {
@@ -610,7 +610,7 @@
}
return -1;
} // getIndex(String):int
-
+
/**
* Look up the index of an attribute by Namespace name.
*
@@ -687,7 +687,7 @@
String rawname = fAttributes[index].name.rawname;
return rawname != null ? rawname : "";
} // getQName(int):String
-
+
public QName getQualifiedName(int index){
if (index < 0 || index >= fLength) {
return null;
@@ -718,7 +718,7 @@
/**
* Look up the index of an attribute by XML 1.0 qualified name.
*
- * Note:
+ * Note:
* This method uses reference comparison, and thus should
* only be used internally. We cannot use this method in any
* code exposed to users as they may not pass in unique strings.
@@ -736,7 +736,7 @@
}
return -1;
} // getIndexFast(String):int
-
+
/**
* Adds an attribute. The attribute's non-normalized value of the
* attribute will have the same value as the attribute value until
@@ -755,11 +755,11 @@
* Caution: If this method is called it should
* not be mixed with calls to addAttribute
unless
* it has been determined that all the attribute names are unique.
- *
+ *
* @param name the attribute name
* @param type the attribute type
* @param value the attribute value
- *
+ *
* @see #setNonNormalizedValue
* @see #setSpecified
* @see #checkDuplicatesNS
@@ -780,7 +780,7 @@
}
fAttributes = attributes;
}
-
+
// set values
Attribute attribute = fAttributes[index];
attribute.name.setValues(name);
@@ -788,11 +788,11 @@
attribute.value = value;
attribute.nonNormalizedValue = value;
attribute.specified = false;
-
+
// clear augmentations
attribute.augs.removeAllItems();
}
-
+
/**
* Checks for duplicate expanded names (local part and namespace name
* pairs) in the attribute specification. If a duplicate is found its
@@ -801,7 +801,7 @@
* This should be called once all the in-scope namespaces for the element
* enclosing these attributes is known, and after all the attributes
* have gone through namespace binding.
- *
+ *
* @return the name of a duplicate attribute found in the search,
* otherwise null.
*/
@@ -814,14 +814,14 @@
Attribute att2 = fAttributes[j];
if (att1.name.localpart == att2.name.localpart &&
att1.name.uri == att2.name.uri) {
- return att2.name;
+ return att2.name;
}
}
}
}
// If the list is large check duplicates using a hash table.
else {
- // We don't want this table view to be read if someone calls
+ // We don't want this table view to be read if someone calls
// addAttribute so we invalidate it up front.
fIsTableViewConsistent = false;
@@ -833,15 +833,15 @@
for (int i = fLength - 1; i >= 0; --i) {
attr = fAttributes[i];
bucket = getTableViewBucket(attr.name.localpart, attr.name.uri);
-
- // The chain is stale.
+
+ // The chain is stale.
// This must be a unique attribute.
if (fAttributeTableViewChainState[bucket] != fLargeCount) {
fAttributeTableViewChainState[bucket] = fLargeCount;
attr.next = null;
fAttributeTableView[bucket] = attr;
- }
- // This chain is active.
+ }
+ // This chain is active.
// We need to check if any of the attributes has the same name.
else {
// Search the table.
@@ -853,7 +853,7 @@
}
found = found.next;
}
-
+
// Update table view
attr.next = fAttributeTableView[bucket];
fAttributeTableView[bucket] = attr;
@@ -862,11 +862,11 @@
}
return null;
}
-
+
/**
* Look up the index of an attribute by Namespace name.
*
- * Note:
+ * Note:
* This method uses reference comparison, and thus should
* only be used internally. We cannot use this method in any
* code exposed to users as they may not pass in unique strings.
@@ -880,7 +880,7 @@
public int getIndexFast(String uri, String localPart) {
for (int i = 0; i < fLength; ++i) {
Attribute attribute = fAttributes[i];
- if (attribute.name.localpart == localPart &&
+ if (attribute.name.localpart == localPart &&
attribute.name.uri == uri) {
return i;
}
@@ -890,7 +890,7 @@
/**
* Returns the value passed in or NMTOKEN if it's an enumerated type.
- *
+ *
* @param type attribute type
* @return the value passed in or NMTOKEN if it's an enumerated type.
*/
@@ -901,11 +901,11 @@
}
return type;
}
-
+
/**
- * Returns the position in the table view
+ * Returns the position in the table view
* where the given attribute name would be hashed.
- *
+ *
* @param qname the attribute name
* @return the position in the table view where the given attribute
* would be hashed
@@ -913,11 +913,11 @@
protected int getTableViewBucket(String qname) {
return (qname.hashCode() & 0x7FFFFFFF) % fTableViewBuckets;
}
-
+
/**
* Returns the position in the table view
* where the given attribute name would be hashed.
- *
+ *
* @param localpart the local part of the attribute
* @param uri the namespace name of the attribute
* @return the position in the table view where the given attribute
@@ -928,11 +928,11 @@
return (localpart.hashCode() & 0x7FFFFFFF) % fTableViewBuckets;
}
else {
- return ((localpart.hashCode() + uri.hashCode())
+ return ((localpart.hashCode() + uri.hashCode())
& 0x7FFFFFFF) % fTableViewBuckets;
}
}
-
+
/**
* Purges all elements from the table view.
*/
@@ -942,12 +942,12 @@
if (fAttributeTableViewChainState != null) {
for (int i = fTableViewBuckets - 1; i >= 0; --i) {
fAttributeTableViewChainState[i] = 0;
- }
+ }
}
fLargeCount = 1;
}
}
-
+
/**
* Prepares the table view of the attributes list for use.
*/
@@ -960,7 +960,7 @@
cleanTableView();
}
}
-
+
/**
* Prepares the table view of the attributes list for use,
* and populates it with the attributes which have been
@@ -978,7 +978,7 @@
fAttributeTableViewChainState[bucket] = fLargeCount;
attr.next = null;
fAttributeTableView[bucket] = attr;
- }
+ }
else {
// Update table view
attr.next = fAttributeTableView[bucket];
@@ -1014,7 +1014,7 @@
return null;
}
String uri = fAttributes[index].name.uri;
- return uri;
+ return uri;
} // getURI(int):String
/**
@@ -1041,7 +1041,7 @@
*
* @param uri The Namespace URI, or null if the
* @param localName The local name of the attribute.
- * @return Augmentations
+ * @return Augmentations
*/
public Augmentations getAugmentations (String uri, String localName) {
int index = getIndex(uri, localName);
@@ -1066,7 +1066,7 @@
/**
* Look up an augmentations by attributes index.
- *
+ *
* @param attributeIndex The attribute index.
* @return Augmentations
*/
@@ -1079,7 +1079,7 @@
/**
* Sets the augmentations of the attribute at the specified index.
- *
+ *
* @param attrIndex The attribute index.
* @param augs The augmentations.
*/
@@ -1089,31 +1089,31 @@
/**
* Sets the uri of the attribute at the specified index.
- *
+ *
* @param attrIndex The attribute index.
* @param uri Namespace uri
*/
public void setURI(int attrIndex, String uri) {
fAttributes[attrIndex].name.uri = uri;
} // getURI(int,QName)
-
+
// Implementation methods
public void setSchemaId(int attrIndex, boolean schemaId) {
fAttributes[attrIndex].schemaId = schemaId;
}
-
+
public boolean getSchemaId(int index) {
if (index < 0 || index >= fLength) {
return false;
}
return fAttributes[index].schemaId;
}
-
+
public boolean getSchemaId(String qname) {
int index = getIndex(qname);
- return index != -1 ? fAttributes[index].schemaId : false;
+ return index != -1 ? fAttributes[index].schemaId : false;
} // getType(String):String
-
+
public boolean getSchemaId(String uri, String localName) {
if (!fNamespaces) {
return false;
@@ -1121,7 +1121,7 @@
int index = getIndex(uri, localName);
return index != -1 ? fAttributes[index].schemaId : false;
} // getType(String,String):String
-
+
//XMLBufferListener methods
/**
* This method will be invoked by XMLEntityReader before ScannedEntities buffer
@@ -1133,9 +1133,9 @@
getValue(i);
}
}
- }
+ }
public void refresh(int pos) {
- }
+ }
//
// Classes
@@ -1147,7 +1147,7 @@
* @author Andy Clark, IBM
*/
static class Attribute {
-
+
//
// Data
//
@@ -1165,28 +1165,28 @@
/** This will point to the ScannedEntities buffer.*/
public XMLString xmlValue;
-
+
/** Non-normalized value. */
public String nonNormalizedValue;
/** Specified. */
public boolean specified;
-
+
/** Schema ID type. */
public boolean schemaId;
-
- /**
+
+ /**
* Augmentations information for this attribute.
* XMLAttributes has no knowledge if any augmentations
* were attached to Augmentations.
*/
public Augmentations augs = new AugmentationsImpl();
-
+
// Additional data for attribute table view
-
+
/** Pointer to the next attribute in the chain. **/
public Attribute next;
-
+
} // class Attribute
} // class XMLAttributesImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/ConfigurationError.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,58 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xerces.internal.utils;
+
+/**
+ * A configuration error. This was an internal class in ObjectFactory previously
+ */
+public final class ConfigurationError
+ extends Error {
+
+ //
+ // Data
+ //
+
+ /** Exception. */
+ private Exception exception;
+
+ //
+ // Constructors
+ //
+
+ /**
+ * Construct a new instance with the specified detail string and
+ * exception.
+ */
+ ConfigurationError(String msg, Exception x) {
+ super(msg);
+ this.exception = x;
+ } // (String,Exception)
+
+ //
+ // methods
+ //
+
+ /** Returns the exception associated to this error. */
+ public Exception getException() {
+ return exception;
+ } // getException():Exception
+
+} // class ConfigurationError
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,431 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2001-2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xerces.internal.utils;
+
+import java.io.InputStream;
+import java.io.IOException;
+import java.io.File;
+import java.io.FileInputStream;
+
+import java.util.Properties;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ * This class is duplicated for each JAXP subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of the JAXP
+ * API.
+ *
+ * This code is designed to implement the JAXP 1.1 spec pluggability
+ * feature and is designed to run on JDK version 1.1 and
+ * later, and to compile on JDK 1.2 and onward.
+ * The code also runs both as part of an unbundled jar file and
+ * when bundled as part of the JDK.
+ *
+ *
+ * @version $Id: ObjectFactory.java,v 1.6 2010/04/23 01:44:34 joehw Exp $
+ */
+public final class ObjectFactory {
+
+ //
+ // Constants
+ //
+
+ // name of default properties file to look for in JDK's jre/lib directory
+ private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties";
+
+ /** Set to true for debugging */
+ private static final boolean DEBUG = isDebugEnabled();
+
+ /**
+ * Default columns per line.
+ */
+ private static final int DEFAULT_LINE_LENGTH = 80;
+
+ /** cache the contents of the xerces.properties file.
+ * Until an attempt has been made to read this file, this will
+ * be null; if the file does not exist or we encounter some other error
+ * during the read, this will be empty.
+ */
+ private static Properties fXercesProperties = null;
+
+ /***
+ * Cache the time stamp of the xerces.properties file so
+ * that we know if it's been modified and can invalidate
+ * the cache when necessary.
+ */
+ private static long fLastModified = -1;
+
+ //
+ // static methods
+ //
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ *
+ * - query the system property using
System.getProperty
+ * - read
META-INF/services/factoryId
file
+ * - use fallback classname
+ *
+ *
+ * @return Class object of factory, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ public static Object createObject(String factoryId, String fallbackClassName)
+ throws ConfigurationError {
+ return createObject(factoryId, null, fallbackClassName);
+ } // createObject(String,String):Object
+
+ /**
+ * Finds the implementation Class object in the specified order. The
+ * specified order is the following:
+ *
+ * - query the system property using
System.getProperty
+ * - read
$java.home/lib/propertiesFilename
file
+ * - read
META-INF/services/factoryId
file
+ * - use fallback classname
+ *
+ *
+ * @return Class object of factory, never null
+ *
+ * @param factoryId Name of the factory to find, same as
+ * a property name
+ * @param propertiesFilename The filename in the $java.home/lib directory
+ * of the properties file. If none specified,
+ * ${java.home}/lib/xerces.properties will be used.
+ * @param fallbackClassName Implementation class name, if nothing else
+ * is found. Use null to mean no fallback.
+ *
+ * @exception ObjectFactory.ConfigurationError
+ */
+ public static Object createObject(String factoryId,
+ String propertiesFilename,
+ String fallbackClassName)
+ throws ConfigurationError
+ {
+ if (DEBUG) debugPrintln("debug is on");
+
+ ClassLoader cl = findClassLoader();
+
+ // Use the system property first
+ try {
+ String systemProp = SecuritySupport.getSystemProperty(factoryId);
+ if (systemProp != null && systemProp.length() > 0) {
+ if (DEBUG) debugPrintln("found system property, value=" + systemProp);
+ return newInstance(systemProp, cl, true);
+ }
+ } catch (SecurityException se) {
+ // Ignore and continue w/ next location
+ }
+
+ // JAXP specific change
+ // always use fallback class to avoid the expense of constantly
+ // "stat"ing a non-existent "xerces.properties" and jar SPI entry
+ // see CR 6400863: Expensive creating of SAX parser in Mustang
+ if (fallbackClassName == null) {
+ throw new ConfigurationError(
+ "Provider for " + factoryId + " cannot be found", null);
+ }
+
+ if (DEBUG) debugPrintln("using fallback, value=" + fallbackClassName);
+ return newInstance(fallbackClassName, cl, true);
+
+ } // createObject(String,String,String):Object
+
+ //
+ // Private static methods
+ //
+
+ /** Returns true if debug has been enabled. */
+ private static boolean isDebugEnabled() {
+ try {
+ String val = SecuritySupport.getSystemProperty("xerces.debug");
+ // Allow simply setting the prop to turn on debug
+ return (val != null && (!"false".equals(val)));
+ }
+ catch (SecurityException se) {}
+ return false;
+ } // isDebugEnabled()
+
+ /** Prints a message to standard error if debugging is enabled. */
+ private static void debugPrintln(String msg) {
+ if (DEBUG) {
+ System.err.println("XERCES: " + msg);
+ }
+ } // debugPrintln(String)
+
+ /**
+ * Figure out which ClassLoader to use. For JDK 1.2 and later use
+ * the context ClassLoader.
+ */
+ public static ClassLoader findClassLoader()
+ throws ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ //this will ensure bootclassloader is used
+ return null;
+ }
+ // Figure out which ClassLoader to use for loading the provider
+ // class. If there is a Context ClassLoader then use it.
+ ClassLoader context = SecuritySupport.getContextClassLoader();
+ ClassLoader system = SecuritySupport.getSystemClassLoader();
+
+ ClassLoader chain = system;
+ while (true) {
+ if (context == chain) {
+ // Assert: we are on JDK 1.1 or we have no Context ClassLoader
+ // or any Context ClassLoader in chain of system classloader
+ // (including extension ClassLoader) so extend to widest
+ // ClassLoader (always look in system ClassLoader if Xerces
+ // is in boot/extension/system classpath and in current
+ // ClassLoader otherwise); normal classloaders delegate
+ // back to system ClassLoader first so this widening doesn't
+ // change the fact that context ClassLoader will be consulted
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+
+ chain = system;
+ while (true) {
+ if (current == chain) {
+ // Assert: Current ClassLoader in chain of
+ // boot/extension/system ClassLoaders
+ return system;
+ }
+ if (chain == null) {
+ break;
+ }
+ chain = SecuritySupport.getParentClassLoader(chain);
+ }
+
+ // Assert: Current ClassLoader not in chain of
+ // boot/extension/system ClassLoaders
+ return current;
+ }
+
+ if (chain == null) {
+ // boot ClassLoader reached
+ break;
+ }
+
+ // Check for any extension ClassLoaders in chain up to
+ // boot ClassLoader
+ chain = SecuritySupport.getParentClassLoader(chain);
+ };
+
+ // Assert: Context ClassLoader not in chain of
+ // boot/extension/system ClassLoaders
+ return context;
+ } // findClassLoader():ClassLoader
+
+ /**
+ * Create an instance of a class using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static Object newInstance(String className, boolean doFallback)
+ throws ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ return newInstance(className, null, doFallback);
+ } else {
+ return newInstance(className,
+ findClassLoader (), doFallback);
+ }
+ }
+
+ /**
+ * Create an instance of a class using the specified ClassLoader
+ */
+ public static Object newInstance(String className, ClassLoader cl,
+ boolean doFallback)
+ throws ConfigurationError
+ {
+ // assert(className != null);
+ try{
+ Class providerClass = findProviderClass(className, cl, doFallback);
+ Object instance = providerClass.newInstance();
+ if (DEBUG) debugPrintln("created new instance of " + providerClass +
+ " using ClassLoader: " + cl);
+ return instance;
+ } catch (ClassNotFoundException x) {
+ throw new ConfigurationError(
+ "Provider " + className + " not found", x);
+ } catch (Exception x) {
+ throw new ConfigurationError(
+ "Provider " + className + " could not be instantiated: " + x,
+ x);
+ }
+ }
+
+ /**
+ * Find a Class using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static Class findProviderClass(String className, boolean doFallback)
+ throws ClassNotFoundException, ConfigurationError
+ {
+ if (System.getSecurityManager()!=null) {
+ return Class.forName(className);
+ } else {
+ return findProviderClass (className,
+ findClassLoader (), doFallback);
+ }
+ }
+ /**
+ * Find a Class using the specified ClassLoader
+ */
+ public static Class findProviderClass(String className, ClassLoader cl,
+ boolean doFallback)
+ throws ClassNotFoundException, ConfigurationError
+ {
+ //throw security exception if the calling thread is not allowed to access the package
+ //restrict the access to package as speicified in java.security policy
+ SecurityManager security = System.getSecurityManager();
+ if (security != null) {
+ final int lastDot = className.lastIndexOf(".");
+ String packageName = className;
+ if (lastDot != -1) packageName = className.substring(0, lastDot);
+ security.checkPackageAccess(packageName);
+ }
+ Class providerClass;
+ if (cl == null) {
+ //use the bootstrap ClassLoader.
+ providerClass = Class.forName(className);
+ } else {
+ try {
+ providerClass = cl.loadClass(className);
+ } catch (ClassNotFoundException x) {
+ if (doFallback) {
+ // Fall back to current classloader
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+ if (current == null) {
+ providerClass = Class.forName(className);
+ } else if (cl != current) {
+ cl = current;
+ providerClass = cl.loadClass(className);
+ } else {
+ throw x;
+ }
+ } else {
+ throw x;
+ }
+ }
+ }
+
+ return providerClass;
+ }
+
+ /*
+ * Try to find provider using Jar Service Provider Mechanism
+ *
+ * @return instance of provider class if found or null
+ */
+ private static Object findJarServiceProvider(String factoryId)
+ throws ConfigurationError
+ {
+ String serviceId = "META-INF/services/" + factoryId;
+ InputStream is = null;
+
+ // First try the Context ClassLoader
+ ClassLoader cl = findClassLoader();
+
+ is = SecuritySupport.getResourceAsStream(cl, serviceId);
+
+ // If no provider found then try the current ClassLoader
+ if (is == null) {
+ ClassLoader current = ObjectFactory.class.getClassLoader();
+ if (cl != current) {
+ cl = current;
+ is = SecuritySupport.getResourceAsStream(cl, serviceId);
+ }
+ }
+
+ if (is == null) {
+ // No provider found
+ return null;
+ }
+
+ if (DEBUG) debugPrintln("found jar resource=" + serviceId +
+ " using ClassLoader: " + cl);
+
+ // Read the service provider name in UTF-8 as specified in
+ // the jar spec. Unfortunately this fails in Microsoft
+ // VJ++, which does not implement the UTF-8
+ // encoding. Theoretically, we should simply let it fail in
+ // that case, since the JVM is obviously broken if it
+ // doesn't support such a basic standard. But since there
+ // are still some users attempting to use VJ++ for
+ // development, we have dropped in a fallback which makes a
+ // second attempt using the platform's default encoding. In
+ // VJ++ this is apparently ASCII, which is a subset of
+ // UTF-8... and since the strings we'll be reading here are
+ // also primarily limited to the 7-bit ASCII range (at
+ // least, in English versions), this should work well
+ // enough to keep us on the air until we're ready to
+ // officially decommit from VJ++. [Edited comment from
+ // jkesselm]
+ BufferedReader rd;
+ try {
+ rd = new BufferedReader(new InputStreamReader(is, "UTF-8"), DEFAULT_LINE_LENGTH);
+ } catch (java.io.UnsupportedEncodingException e) {
+ rd = new BufferedReader(new InputStreamReader(is), DEFAULT_LINE_LENGTH);
+ }
+
+ String factoryClassName = null;
+ try {
+ // XXX Does not handle all possible input as specified by the
+ // Jar Service Provider specification
+ factoryClassName = rd.readLine();
+ } catch (IOException x) {
+ // No provider found
+ return null;
+ }
+ finally {
+ try {
+ // try to close the reader.
+ rd.close();
+ }
+ // Ignore the exception.
+ catch (IOException exc) {}
+ }
+
+ if (factoryClassName != null &&
+ ! "".equals(factoryClassName)) {
+ if (DEBUG) debugPrintln("found in resource, value="
+ + factoryClassName);
+
+ // Note: here we do not want to fall back to the current
+ // ClassLoader because we want to avoid the case where the
+ // resource file was found using one ClassLoader and the
+ // provider class was instantiated using a different one.
+ return newInstance(factoryClassName, cl, false);
+ }
+
+ // No provider found
+ return null;
+ }
+
+} // class ObjectFactory
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/utils/SecuritySupport.java Wed May 02 13:32:36 2012 +0100
@@ -0,0 +1,163 @@
+/*
+ * reserved comment block
+ * DO NOT REMOVE OR ALTER!
+ */
+/*
+ * Copyright 2002,2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.sun.org.apache.xerces.internal.utils;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+
+/**
+ * This class is duplicated for each subpackage so keep it in sync.
+ * It is package private and therefore is not exposed as part of any API.
+ *
+ * @xerces.internal
+ */
+public final class SecuritySupport {
+
+ private static final SecuritySupport securitySupport = new SecuritySupport();
+
+ /**
+ * Return an instance of this class.
+ */
+ public static SecuritySupport getInstance() {
+ return securitySupport;
+ }
+
+ static ClassLoader getContextClassLoader() {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader cl = null;
+ try {
+ cl = Thread.currentThread().getContextClassLoader();
+ } catch (SecurityException ex) { }
+ return cl;
+ }
+ });
+ }
+
+ static ClassLoader getSystemClassLoader() {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader cl = null;
+ try {
+ cl = ClassLoader.getSystemClassLoader();
+ } catch (SecurityException ex) {}
+ return cl;
+ }
+ });
+ }
+
+ static ClassLoader getParentClassLoader(final ClassLoader cl) {
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader parent = null;
+ try {
+ parent = cl.getParent();
+ } catch (SecurityException ex) {}
+
+ // eliminate loops in case of the boot
+ // ClassLoader returning itself as a parent
+ return (parent == cl) ? null : parent;
+ }
+ });
+ }
+
+ public static String getSystemProperty(final String propName) {
+ return (String)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return System.getProperty(propName);
+ }
+ });
+ }
+
+ static FileInputStream getFileInputStream(final File file)
+ throws FileNotFoundException
+ {
+ try {
+ return (FileInputStream)
+ AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws FileNotFoundException {
+ return new FileInputStream(file);
+ }
+ });
+ } catch (PrivilegedActionException e) {
+ throw (FileNotFoundException)e.getException();
+ }
+ }
+ /**
+ * Return resource using the same classloader for the ObjectFactory by default
+ * or bootclassloader when Security Manager is in place
+ */
+ public static InputStream getResourceAsStream(final String name) {
+ if (System.getSecurityManager()!=null) {
+ return getResourceAsStream(null, name);
+ } else {
+ return getResourceAsStream(ObjectFactory.findClassLoader(), name);
+ }
+ }
+
+ public static InputStream getResourceAsStream(final ClassLoader cl,
+ final String name)
+ {
+ return (InputStream)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ InputStream ris;
+ if (cl == null) {
+ ris = Object.class.getResourceAsStream("/"+name);
+ } else {
+ ris = cl.getResourceAsStream(name);
+ }
+ return ris;
+ }
+ });
+ }
+
+ static boolean getFileExists(final File f) {
+ return ((Boolean)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return f.exists() ? Boolean.TRUE : Boolean.FALSE;
+ }
+ })).booleanValue();
+ }
+
+ static long getLastModified(final File f) {
+ return ((Long)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return new Long(f.lastModified());
+ }
+ })).longValue();
+ }
+
+ private SecuritySupport () {}
+}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xinclude/XIncludeHandler.java Wed May 02 13:32:36 2012 +0100
@@ -66,6 +66,7 @@
import com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration;
import com.sun.org.apache.xerces.internal.xpointer.XPointerHandler;
import com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor;
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
/**
*
@@ -111,6 +112,7 @@
* @author Peter McCracken, IBM
* @author Michael Glavassevich, IBM
*
+ * @version $Id: XIncludeHandler.java,v 1.7 2010-11-01 04:40:18 joehw Exp $
*
* @see XIncludeNamespaceSupport
*/
@@ -943,7 +945,8 @@
setState(STATE_IGNORE);
}
else {
- reportFatalError("NoFallback");
+ reportFatalError("NoFallback",
+ new Object[] { attributes.getValue(null, "href") });
}
}
else if (isFallbackElement(element)) {
@@ -1001,7 +1004,8 @@
// we check to see if the children of this include element contained a fallback
if (getState() == STATE_EXPECT_FALLBACK
&& !getSawFallback(fDepth + 1)) {
- reportFatalError("NoFallback");
+ reportFatalError("NoFallback",
+ new Object[] { "unknown" });
}
}
if (isFallbackElement(element)) {
@@ -1567,7 +1571,6 @@
fChildConfig =
(XMLParserConfiguration)ObjectFactory.newInstance(
parserName,
- ObjectFactory.findClassLoader(),
true);
// use the same symbol table, error reporter, entity resolver, security manager and buffer size.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/QName.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/QName.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/QName.java Wed May 02 13:32:36 2012 +0100
@@ -81,55 +81,55 @@
*/
public class QName
implements Cloneable {
-
-
+
+
/**
* The qname prefix. For example, the prefix for the qname "a:foo"
* is "a".
*/
public String prefix;
-
+
/**
* The qname localpart. For example, the localpart for the qname "a:foo"
* is "foo".
*/
public String localpart;
-
+
/**
* The qname rawname. For example, the rawname for the qname "a:foo"
* is "a:foo".
*/
public String rawname;
-
+
/**
* The URI to which the qname prefix is bound. This binding must be
* performed by a XML Namespaces aware processor.
*/
public String uri;
-
+
//
// Constructors
//
-
+
/** Default constructor. */
public QName() {
clear();
} // ()
-
+
/** Constructs a QName with the specified values. */
public QName(String prefix, String localpart, String rawname, String uri) {
setValues(prefix, localpart, rawname, uri);
} // (String,String,String,String)
-
+
/** Constructs a copy of the specified QName. */
public QName(QName qname) {
setValues(qname);
} // (QName)
-
+
//
// Public methods
//
-
+
/**
* Convenience method to set the values of the qname components.
*
@@ -141,7 +141,7 @@
rawname = qname.rawname;
uri = qname.uri;
} // setValues(QName)
-
+
/**
* Convenience method to set the values of the qname components.
*
@@ -157,7 +157,7 @@
this.rawname = rawname;
this.uri = uri;
} // setValues(String,String,String,String)
-
+
/** Clears the values of the qname components. */
public void clear() {
prefix = null;
@@ -182,7 +182,7 @@
/** Returns the hashcode for this object. */
public int hashCode() {
if (uri != null) {
- return uri.hashCode() +
+ return uri.hashCode() +
((localpart != null) ? localpart.hashCode() : 0);
}
return (rawname != null) ? rawname.hashCode() : 0;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/XNIException.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/XNIException.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/XNIException.java Wed May 02 13:32:36 2012 +0100
@@ -25,8 +25,8 @@
* can be constructed with an error message or used to wrap another
* exception object.
*
- * Note: By extending the Java
- * RuntimeException
, XNI handlers and components are
+ * Note: By extending the Java
+ * RuntimeException
, XNI handlers and components are
* not required to catch XNI exceptions but may explicitly catch
* them, if so desired.
*
@@ -34,12 +34,12 @@
*
* @version $Id: XNIException.java,v 1.6 2010-11-01 04:40:19 joehw Exp $
*/
-public class XNIException
+public class XNIException
extends RuntimeException {
/** Serialization version. */
static final long serialVersionUID = 9019819772686063775L;
-
+
//
// Data
//
@@ -52,7 +52,7 @@
//
/**
- * Constructs an XNI exception with a message.
+ * Constructs an XNI exception with a message.
*
* @param message The exception message.
*/
@@ -61,7 +61,7 @@
} // (String)
/**
- * Constructs an XNI exception with a wrapped exception.
+ * Constructs an XNI exception with a wrapped exception.
*
* @param exception The wrapped exception.
*/
@@ -71,7 +71,7 @@
} // (Exception)
/**
- * Constructs an XNI exception with a message and wrapped exception.
+ * Constructs an XNI exception with a message and wrapped exception.
*
* @param message The exception message.
* @param exception The wrapped exception.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLComponentManager.java Wed May 02 13:32:36 2012 +0100
@@ -46,9 +46,9 @@
/**
* Returns the state of a feature.
- *
+ *
* @param featureId The feature identifier.
- *
+ *
* @throws XMLConfigurationException Thrown on configuration error.
*/
public boolean getFeature(String featureId)
@@ -65,9 +65,9 @@
/**
* Returns the value of a property.
- *
+ *
* @param propertyId The property identifier.
- *
+ *
* @throws XMLConfigurationException Thrown on configuration error.
*/
public Object getProperty(String propertyId)
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xni/parser/XMLConfigurationException.java Wed May 02 13:32:36 2012 +0100
@@ -37,7 +37,7 @@
/** Serialization version. */
static final long serialVersionUID = -5437427404547669188L;
-
+
//
// Data
//
@@ -52,7 +52,7 @@
// Constructors
//
- /**
+ /**
* Constructs a configuration exception with the specified type
* and feature/property identifier.
*
@@ -65,7 +65,7 @@
fIdentifier = identifier;
} // (short,String)
- /**
+ /**
* Constructs a configuration exception with the specified type,
* feature/property identifier, and error message
*
@@ -84,8 +84,8 @@
// Public methods
//
- /**
- * Returns the exception type.
+ /**
+ * Returns the exception type.
*/
public Status getType() {
return fType;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xpointer/ElementSchemePointer.java Wed May 02 13:32:36 2012 +0100
@@ -36,7 +36,7 @@
*
*
* @xerces.internal
- *
+ *
* @version $Id: ElementSchemePointer.java,v 1.4 2009/06/11 23:51:50 joehw Exp $
*
*/
@@ -53,17 +53,17 @@
// The scheme Data & child sequence
private String fShortHandPointerName;
- // Should we attempt to resolve the ChildSequence from the
+ // Should we attempt to resolve the ChildSequence from the
// current element position. If a ShortHand Pointer is present
// attempt to resolve relative to the short hand pointer.
private boolean fIsResolveElement = false;
// Has the element been found
private boolean fIsElementFound = false;
-
+
// Was only an empty element found
private boolean fWasOnlyEmptyElementFound = false;
-
+
// If a shorthand pointer is present and resolved
boolean fIsShortHand = false;
@@ -117,10 +117,10 @@
// XPointerPart implementation
// ************************************************************************
- /**
+ /**
* Parses the XPointer expression and tokenizes it into Strings
- * delimited by whitespace.
- *
+ * delimited by whitespace.
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#parseXPointer(java.lang.String)
*/
public void parseXPointer(String xpointer) throws XNIException {
@@ -153,13 +153,13 @@
if (!success) {
reportError("InvalidElementSchemeXPointer",
new Object[] { xpointer });
- }
+ }
- // Initialize a temp arrays to the size of token count which should
+ // Initialize a temp arrays to the size of token count which should
// be atleast twice the size of child sequence, to hold the ChildSequence.
int tmpChildSequence[] = new int[tokens.getTokenCount() / 2 + 1];
- // the element depth
+ // the element depth
int i = 0;
// Traverse the scanned tokens
@@ -209,7 +209,7 @@
/**
* Returns the scheme data
- *
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#getSchemeData()
*/
public String getSchemeData() {
@@ -218,7 +218,7 @@
/**
* Sets the scheme name
- *
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#setSchemeName(java.lang.String)
*/
public void setSchemeName(String schemeName) {
@@ -228,7 +228,7 @@
/**
* Sets the scheme data
- *
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#setSchemeData(java.lang.String)
*/
public void setSchemeData(String schemeData) {
@@ -239,7 +239,7 @@
* Responsible for resolving the element() scheme XPointer. If a ShortHand
* Pointer is present and it is successfully resolved and if a child
* sequence is present, the child sequence is resolved relative to it.
- *
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#resolveXPointer(com.sun.org.apache.xerces.internal.xni.QName, com.sun.org.apache.xerces.internal.xni.XMLAttributes, com.sun.org.apache.xerces.internal.xni.Augmentations, int event)
*/
public boolean resolveXPointer(QName element, XMLAttributes attributes,
@@ -281,15 +281,15 @@
/**
* Matches the current element position in the document tree with the
* element position specified in the element XPointer scheme.
- *
+ *
* @param event
- * @return boolean - true if the current element position in the document
- * tree matches theelement position specified in the element XPointer
+ * @return boolean - true if the current element position in the document
+ * tree matches theelement position specified in the element XPointer
* scheme.
*/
protected boolean matchChildSequence(QName element, int event)
throws XNIException {
-
+
// need to resize fCurrentChildSequence
if (fCurrentChildDepth >= fCurrentChildSequence.length) {
int tmpCurrentChildSequence[] = new int[fCurrentChildSequence.length];
@@ -302,7 +302,7 @@
0, tmpCurrentChildSequence.length);
}
- //
+ //
if (fIsResolveElement) {
// start
fWasOnlyEmptyElementFound = false;
@@ -310,7 +310,7 @@
fCurrentChildSequence[fCurrentChildDepth] = fCurrentChildPosition;
fCurrentChildDepth++;
- // reset the current child position
+ // reset the current child position
fCurrentChildPosition = 1;
//if (!fSchemeNameFound) {
@@ -338,14 +338,14 @@
fCurrentChildDepth--;
fCurrentChildPosition = fCurrentChildSequence[fCurrentChildDepth] + 1;
-
+
} else if (event == XPointerPart.EVENT_ELEMENT_EMPTY) {
fCurrentChildSequence[fCurrentChildDepth] = fCurrentChildPosition;
fCurrentChildPosition++;
- // Donot check for empty elements if the empty element is
- // a child of a found parent element
+ // Donot check for empty elements if the empty element is
+ // a child of a found parent element
//if (!fIsElementFound) {
if (checkMatch()) {
fIsElementFound = true;
@@ -353,8 +353,8 @@
} else {
fIsElementFound = false;
}
- //}
-
+ //}
+
}
}
@@ -362,11 +362,11 @@
}
/**
- * Matches the current position of the element being visited by checking
- * its position and previous elements against the element XPointer expression.
+ * Matches the current position of the element being visited by checking
+ * its position and previous elements against the element XPointer expression.
* If a match is found it return true else false.
- *
- * @return boolean
+ *
+ * @return boolean
*/
protected boolean checkMatch() {
// If the number of elements in the ChildSequence is greater than the
@@ -387,7 +387,7 @@
} else {
// If a shorthand pointer is present traverse the children
// ignoring the first element of the CurrenChildSequence which
- // contains the ShortHand pointer element and compare
+ // contains the ShortHand pointer element and compare
if (fChildSequence.length <= fCurrentChildDepth + 1) {
for (int i = 0; i < fChildSequence.length; i++) {
@@ -413,7 +413,7 @@
/**
* Returns true if the node matches or is a child of a matching element()
* scheme XPointer.
- *
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerProcessor#isFragmentResolved()
*/
public boolean isFragmentResolved() throws XNIException {
@@ -424,32 +424,32 @@
/**
* Returns true if the XPointer expression resolves to a non-element child
- * of the current resource fragment.
- *
+ * of the current resource fragment.
+ *
* @see com.sun.org.apache.xerces.internal.xpointer.XPointerPart#isChildFragmentResolved()
- *
- */
+ *
+ */
public boolean isChildFragmentResolved() {
- // if only a shorthand pointer was present
- if (fIsShortHand && fShortHandPointer != null && fChildSequence.length <= 0) {
- return fShortHandPointer.isChildFragmentResolved();
- } else {
- return fWasOnlyEmptyElementFound ? !fWasOnlyEmptyElementFound
- : (fIsFragmentResolved && (fCurrentChildDepth >= fFoundDepth));
- }
+ // if only a shorthand pointer was present
+ if (fIsShortHand && fShortHandPointer != null && fChildSequence.length <= 0) {
+ return fShortHandPointer.isChildFragmentResolved();
+ } else {
+ return fWasOnlyEmptyElementFound ? !fWasOnlyEmptyElementFound
+ : (fIsFragmentResolved && (fCurrentChildDepth >= fFoundDepth));
+ }
}
-
+
/**
- * Reports an XPointer error
- */
+ * Reports an XPointer error
+ */
protected void reportError(String key, Object[] arguments)
throws XNIException {
- /*fErrorReporter.reportError(XPointerMessageFormatter.XPOINTER_DOMAIN,
- key, arguments, XMLErrorReporter.SEVERITY_ERROR);
- */
- throw new XNIException((fErrorReporter
- .getMessageFormatter(XPointerMessageFormatter.XPOINTER_DOMAIN))
- .formatMessage(fErrorReporter.getLocale(), key, arguments));
+ /*fErrorReporter.reportError(XPointerMessageFormatter.XPOINTER_DOMAIN,
+ key, arguments, XMLErrorReporter.SEVERITY_ERROR);
+ */
+ throw new XNIException((fErrorReporter
+ .getMessageFormatter(XPointerMessageFormatter.XPOINTER_DOMAIN))
+ .formatMessage(fErrorReporter.getLocale(), key, arguments));
}
/**
@@ -482,7 +482,7 @@
fCurrentChildDepth = 0;
fIsFragmentResolved = false;
fShortHandPointer = null;
-
+
initErrorReporter();
}
@@ -492,19 +492,19 @@
/**
* List of XPointer Framework tokens.
- *
+ *
* @xerces.internal
- *
+ *
* @author Neil Delima, IBM
* @version $Id: ElementSchemePointer.java,v 1.4 2009/06/11 23:51:50 joehw Exp $
- *
+ *
*/
private final class Tokens {
/**
* XPointer element() scheme
- * [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence
- * [2] ChildSequence ::= ('/' [1-9] [0-9]*)+
+ * [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence
+ * [2] ChildSequence ::= ('/' [1-9] [0-9]*)+
*/
private static final int XPTRTOKEN_ELEM_NCNAME = 0;
@@ -529,8 +529,8 @@
private Hashtable fTokenNames = new Hashtable();
/**
- * Constructor
- *
+ * Constructor
+ *
* @param symbolTable SymbolTable
*/
private Tokens(SymbolTable symbolTable) {
@@ -543,7 +543,7 @@
}
/*
- * Returns the token String
+ * Returns the token String
* @param token The index of the token
* @return String The token string
*/
@@ -552,7 +552,7 @@
}
/**
- * Returns the token String
+ * Returns the token String
* @param token The index of the token
* @return String The token string
*/
@@ -562,7 +562,7 @@
/**
* Add the specified string as a token
- *
+ *
* @param token The token string
*/
private void addToken(String tokenStr) {
@@ -576,7 +576,7 @@
/**
* Add the specified int token
- *
+ *
* @param token The int specifying the token
*/
private void addToken(int token) {
@@ -609,7 +609,7 @@
/**
* Obtains the token at the current position, then advance
* the current position by one.
- *
+ *
* If there's no such next token, this method throws
* new XNIException("InvalidXPointerExpression");.
*/
@@ -622,7 +622,7 @@
/**
* Obtains the token at the current position, without advancing
* the current position.
- *
+ *
* If there's no such next token, this method throws
* new XNIException("InvalidXPointerExpression");.
*/
@@ -634,9 +634,9 @@
/**
* Obtains the token at the current position as a String.
- *
+ *
* If there's no current token or if the current token
- * is not a string token, this method throws
+ * is not a string token, this method throws
* If there's no such next token, this method throws
* new XNIException("InvalidXPointerExpression");.
*/
@@ -649,7 +649,7 @@
/**
* Returns the number of tokens.
- *
+ *
*/
private int getTokenCount() {
return fTokenCount;
@@ -657,11 +657,11 @@
}
/**
- *
+ *
* The XPointer expression scanner. Scans the XPointer framework expression.
- *
+ *
* @xerces.internal
- *
+ *
* @version $Id: ElementSchemePointer.java,v 1.4 2009/06/11 23:51:50 joehw Exp $
*/
private class Scanner {
@@ -711,10 +711,10 @@
// Constructors
//
- /**
- * Constructs an XPath expression scanner.
+ /**
+ * Constructs an XPath expression scanner.
*
- * @param symbolTable SymbolTable
+ * @param symbolTable SymbolTable
*/
private Scanner(SymbolTable symbolTable) {
// save pool and tokens
@@ -724,7 +724,7 @@
/**
* Scans the XPointer Expression
- *
+ *
*/
private boolean scanExpr(SymbolTable symbolTable, Tokens tokens,
String data, int currentOffset, int endOffset)
@@ -743,10 +743,10 @@
byte chartype = (ch >= 0x80) ? CHARTYPE_NONASCII
: fASCIICharMap[ch];
- //
- // [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence
- // [2] ChildSequence ::= ('/' [1-9] [0-9]*)+
- //
+ //
+ // [1] ElementSchemeData ::= (NCName ChildSequence?) | ChildSequence
+ // [2] ChildSequence ::= ('/' [1-9] [0-9]*)+
+ //
switch (chartype) {
@@ -759,7 +759,7 @@
addToken(tokens, Tokens.XPTRTOKEN_ELEM_CHILD);
ch = data.charAt(currentOffset);
- // ChildSequence ::= ('/' [1-9] [0-9]*)+
+ // ChildSequence ::= ('/' [1-9] [0-9]*)+
int child = 0;
while (ch >= '0' && ch <= '9') {
child = (child * 10) + (ch - '0');
@@ -787,7 +787,7 @@
case CHARTYPE_OTHER:
case CHARTYPE_PERIOD:
case CHARTYPE_UNDERSCORE:
- // Scan the ShortHand Pointer NCName
+ // Scan the ShortHand Pointer NCName
nameOffset = currentOffset;
currentOffset = scanNCName(data, endOffset, currentOffset);
@@ -815,14 +815,14 @@
return true;
}
- /**
- * Scans a NCName.
- * From Namespaces in XML
+ /**
+ * Scans a NCName.
+ * From Namespaces in XML
* [5] NCName ::= (Letter | '_') (NCNameChar)*
* [6] NCNameChar ::= Letter | Digit | '.' | '-' | '_' | CombiningChar | Extender
- *
+ *
* @param data A String containing the XPointer expression
- * @param endOffset The int XPointer expression length
+ * @param endOffset The int XPointer expression length
* @param currentOffset An int representing the current position of the XPointer expression pointer
*/
private int scanNCName(String data, int endOffset, int currentOffset) {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSAttributeUse.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSAttributeUse.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSAttributeUse.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,7 @@
package com.sun.org.apache.xerces.internal.xs;
/**
- * This interface represents the Attribute Use schema component.
+ * This interface represents the Attribute Use schema component.
*/
public interface XSAttributeUse extends XSObject {
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSElementDeclaration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSElementDeclaration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSElementDeclaration.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,7 @@
package com.sun.org.apache.xerces.internal.xs;
/**
- * The interface represents the Element Declaration schema component.
+ * The interface represents the Element Declaration schema component.
*/
public interface XSElementDeclaration extends XSTerm {
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSLoader.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSLoader.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSLoader.java Wed May 02 13:32:36 2012 +0100
@@ -24,7 +24,7 @@
import org.w3c.dom.ls.LSInput;
/**
- * An interface that provides a method to load XML Schema documents. This
+ * An interface that provides a method to load XML Schema documents. This
* interface uses the DOM Level 3 Core and Load and Save interfaces.
*/
public interface XSLoader {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSModel.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSModel.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSModel.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,7 @@
package com.sun.org.apache.xerces.internal.xs;
/**
- * This interface represents an XML Schema.
+ * This interface represents an XML Schema.
*/
public interface XSModel {
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/XSNotationDeclaration.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,7 @@
package com.sun.org.apache.xerces.internal.xs;
/**
- * This interface represents the Notation Declaration schema component.
+ * This interface represents the Notation Declaration schema component.
*/
public interface XSNotationDeclaration extends XSObject {
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ByteList.java Wed May 02 13:32:36 2012 +0100
@@ -24,11 +24,11 @@
import com.sun.org.apache.xerces.internal.xs.XSException;
/**
- * The ByteList
is an immutable ordered collection of
+ *
The ByteList
is an immutable ordered collection of
* byte
.
- *
+ *
* @author Ankit Pasricha, IBM
- *
+ *
* @version $Id: ByteList.java,v 1.7 2010-11-01 04:40:31 joehw Exp $
*/
public interface ByteList extends List {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xerces/internal/xs/datatypes/ObjectList.java Wed May 02 13:32:36 2012 +0100
@@ -22,11 +22,11 @@
import java.util.List;
/**
- * The ObjectList
is an immutable ordered collection of
- * Object
.
- *
+ * The ObjectList
is an immutable ordered collection of
+ * Object
.
+ *
* @author Ankit Pasricha, IBM
- *
+ *
* @version $Id: ObjectList.java,v 1.7 2010-11-01 04:40:31 joehw Exp $
*/
public interface ObjectList extends List {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/DTMManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/DTMManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/DTMManager.java Wed May 02 13:32:36 2012 +0100
@@ -26,6 +26,7 @@
import com.sun.org.apache.xml.internal.res.XMLMessages;
import com.sun.org.apache.xml.internal.utils.PrefixResolver;
import com.sun.org.apache.xml.internal.utils.XMLStringFactory;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
* A DTMManager instance can be used to create DTM and
@@ -64,6 +65,7 @@
*/
protected XMLStringFactory m_xsf = null;
+ private boolean _useServicesMechanism;
/**
* Default constructor is protected on purpose.
*/
@@ -133,13 +135,23 @@
public static DTMManager newInstance(XMLStringFactory xsf)
throws DTMConfigurationException
{
+ return newInstance(xsf, true);
+ }
+
+ public static DTMManager newInstance(XMLStringFactory xsf, boolean useServicesMechanism)
+ throws DTMConfigurationException
+ {
DTMManager factoryImpl = null;
try
{
- factoryImpl = (DTMManager) ObjectFactory
- .createObject(defaultPropName, defaultClassName);
+ if (useServicesMechanism) {
+ factoryImpl = (DTMManager) ObjectFactory
+ .createObject(defaultPropName, defaultClassName);
+ } else {
+ factoryImpl = new com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault();
+ }
}
- catch (ObjectFactory.ConfigurationError e)
+ catch (ConfigurationError e)
{
throw new DTMConfigurationException(XMLMessages.createXMLMessage(
XMLErrorResources.ER_NO_DEFAULT_IMPL, null), e.getException());
@@ -346,6 +358,19 @@
m_source_location = sourceLocation;
}
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return _useServicesMechanism;
+ }
+
+ /**
+ * Set the state of the services mechanism feature.
+ */
+ public void setServicesMechnism(boolean flag) {
+ _useServicesMechanism = flag;
+ }
// -------------------- private methods --------------------
@@ -429,4 +454,46 @@
return IDENT_NODE_DEFAULT;
}
+ //
+ // Classes
+ //
+
+ /**
+ * A configuration error.
+ * Originally in ObjectFactory. This is the only portion used in this package
+ */
+ static class ConfigurationError
+ extends Error {
+ static final long serialVersionUID = 5122054096615067992L;
+ //
+ // Data
+ //
+
+ /** Exception. */
+ private Exception exception;
+
+ //
+ // Constructors
+ //
+
+ /**
+ * Construct a new instance with the specified detail string and
+ * exception.
+ */
+ ConfigurationError(String msg, Exception x) {
+ super(msg);
+ this.exception = x;
+ } // (String,Exception)
+
+ //
+ // Public methods
+ //
+
+ /** Returns the exception associated to this error. */
+ Exception getException() {
+ return exception;
+ } // getException():Exception
+
+ } // class ConfigurationError
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.7 2008/04/02 00:41:00 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 5122054096615067992L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBase.java Wed May 02 13:32:36 2012 +0100
@@ -844,12 +844,10 @@
break;
}
- StringBuffer sb=new StringBuffer();
- sb.append("["+nodeHandle+": "+typestring+
- "(0x"+Integer.toHexString(getExpandedTypeID(nodeHandle))+") "+
- getNodeNameX(nodeHandle)+" {"+getNamespaceURI(nodeHandle)+"}"+
- "=\""+ getNodeValue(nodeHandle)+"\"]");
- return sb.toString();
+ return "[" + nodeHandle + ": " + typestring +
+ "(0x" + Integer.toHexString(getExpandedTypeID(nodeHandle)) + ") " +
+ getNodeNameX(nodeHandle) + " {" + getNamespaceURI(nodeHandle) + "}" +
+ "=\"" + getNodeValue(nodeHandle) + "\"]";
}
// ========= DTM Implementation Control Functions. ==============
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMDefaultBaseIterators.java Wed May 02 13:32:36 2012 +0100
@@ -47,7 +47,7 @@
* @param whiteSpaceFilter The white space filter for this DTM, which may
* be null.
* @param xstringfactory The factory to use for creating XMLStrings.
- * @param doIndexing true if the caller considers it worth it to use
+ * @param doIndexing true if the caller considers it worth it to use
* indexing schemes.
*/
public DTMDefaultBaseIterators(DTMManager mgr, Source source,
@@ -56,7 +56,7 @@
XMLStringFactory xstringfactory,
boolean doIndexing)
{
- super(mgr, source, dtmIdentity, whiteSpaceFilter,
+ super(mgr, source, dtmIdentity, whiteSpaceFilter,
xstringfactory, doIndexing);
}
@@ -69,7 +69,7 @@
* @param whiteSpaceFilter The white space filter for this DTM, which may
* be null.
* @param xstringfactory The factory to use for creating XMLStrings.
- * @param doIndexing true if the caller considers it worth it to use
+ * @param doIndexing true if the caller considers it worth it to use
* indexing schemes.
* @param blocksize The block size of the DTM.
* @param usePrevsib true if we want to build the previous sibling node array.
@@ -84,7 +84,7 @@
boolean usePrevsib,
boolean newNameTable)
{
- super(mgr, source, dtmIdentity, whiteSpaceFilter,
+ super(mgr, source, dtmIdentity, whiteSpaceFilter,
xstringfactory, doIndexing, blocksize, usePrevsib, newNameTable);
}
@@ -116,7 +116,7 @@
// iterator = new FilterIterator(getAxisIterator(axis),
// getElementFilter());
// }
- // else
+ // else
{
switch (axis)
{
@@ -160,8 +160,8 @@
break;
default :
throw new DTMException(XMLMessages.createXMLMessage(
- XMLErrorResources.ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
- new Object[]{Axis.getNames(axis)}));
+ XMLErrorResources.ER_TYPED_ITERATOR_AXIS_NOT_IMPLEMENTED,
+ new Object[]{Axis.getNames(axis)}));
//"Error: typed iterator for axis "
//+ Axis.names[axis] + "not implemented");
}
@@ -227,8 +227,8 @@
break;
default :
throw new DTMException(XMLMessages.createXMLMessage(
- XMLErrorResources.ER_ITERATOR_AXIS_NOT_IMPLEMENTED,
- new Object[]{Axis.getNames(axis)}));
+ XMLErrorResources.ER_ITERATOR_AXIS_NOT_IMPLEMENTED,
+ new Object[]{Axis.getNames(axis)}));
//"Error: iterator for axis '" + Axis.names[axis]
//+ "' not implemented");
}
@@ -281,8 +281,8 @@
{
_currentNode = _markedNode;
}
-
- } // end of InternalAxisIteratorBase
+
+ } // end of InternalAxisIteratorBase
/**
* Iterator that returns all immediate children of a given node
@@ -578,9 +578,9 @@
return END;
}
} // end of NamespaceChildrenIterator
-
+
/**
- * Iterator that returns the namespace nodes as defined by the XPath data model
+ * Iterator that returns the namespace nodes as defined by the XPath data model
* for a given node.
*/
public class NamespaceIterator
@@ -636,9 +636,9 @@
return returnNode(node);
}
} // end of NamespaceIterator
-
+
/**
- * Iterator that returns the namespace nodes as defined by the XPath data model
+ * Iterator that returns the namespace nodes as defined by the XPath data model
* for a given node, filtered by extended type ID.
*/
public class TypedNamespaceIterator extends NamespaceIterator
@@ -666,7 +666,7 @@
*/
public int next()
{
- int node;
+ int node;
for (node = _currentNode;
node != END;
@@ -683,9 +683,9 @@
return (_currentNode =END);
}
} // end of TypedNamespaceIterator
-
+
/**
- * Iterator that returns the the root node as defined by the XPath data model
+ * Iterator that returns the the root node as defined by the XPath data model
* for a given node.
*/
public class RootIterator
@@ -738,9 +738,9 @@
return returnNode(_startNode);
}
} // end of RootIterator
-
+
/**
- * Iterator that returns the namespace nodes as defined by the XPath data model
+ * Iterator that returns the namespace nodes as defined by the XPath data model
* for a given node, filtered by extended type ID.
*/
public class TypedRootIterator extends RootIterator
@@ -767,7 +767,7 @@
*/
public int next()
{
- if(_startNode == _currentNode)
+ if(_startNode == _currentNode)
return NULL;
int nodeType = _nodeType;
@@ -1070,7 +1070,7 @@
final int node = _currentNode;
- // singleton iterator, since there can only be one attribute of
+ // singleton iterator, since there can only be one attribute of
// a given type.
_currentNode = NULL;
@@ -1124,7 +1124,7 @@
}
int type = m_expandedNameTable.getType(_exptype(node));
- if(ExpandedNameTable.ATTRIBUTE == type
+ if(ExpandedNameTable.ATTRIBUTE == type
|| ExpandedNameTable.NAMESPACE == type )
{
_currentNode = node;
@@ -1133,7 +1133,7 @@
{
// Be careful to handle the Document node properly
_currentNode = _parent(node);
- if(NULL!=_currentNode)
+ if(NULL!=_currentNode)
_currentNode = _firstch(_currentNode);
else
_currentNode = node;
@@ -1317,22 +1317,22 @@
_startNode = node;
_stack[index = 0] = node;
-
-
+
+
- parent=node;
- while ((parent = _parent(parent)) != NULL)
- {
- if (++index == _stack.length)
- {
- final int[] stack = new int[index + 4];
- System.arraycopy(_stack, 0, stack, 0, index);
- _stack = stack;
- }
- _stack[index] = parent;
+ parent=node;
+ while ((parent = _parent(parent)) != NULL)
+ {
+ if (++index == _stack.length)
+ {
+ final int[] stack = new int[index + 4];
+ System.arraycopy(_stack, 0, stack, 0, index);
+ _stack = stack;
+ }
+ _stack[index] = parent;
}
if(index>0)
- --index; // Pop actual root node (if not start) back off the stack
+ --index; // Pop actual root node (if not start) back off the stack
_currentNode=_stack[index]; // Last parent before root node
@@ -1351,23 +1351,23 @@
*/
public int next()
{
- // Bugzilla 8324: We were forgetting to skip Attrs and NS nodes.
- // Also recoded the loop controls for clarity and to flatten out
- // the tail-recursion.
- for(++_currentNode;
- _sp>=0;
- ++_currentNode)
- {
- if(_currentNode < _stack[_sp])
- {
- if(_type(_currentNode) != ATTRIBUTE_NODE &&
- _type(_currentNode) != NAMESPACE_NODE)
- return returnNode(makeNodeHandle(_currentNode));
- }
- else
- --_sp;
- }
- return NULL;
+ // Bugzilla 8324: We were forgetting to skip Attrs and NS nodes.
+ // Also recoded the loop controls for clarity and to flatten out
+ // the tail-recursion.
+ for(++_currentNode;
+ _sp>=0;
+ ++_currentNode)
+ {
+ if(_currentNode < _stack[_sp])
+ {
+ if(_type(_currentNode) != ATTRIBUTE_NODE &&
+ _type(_currentNode) != NAMESPACE_NODE)
+ return returnNode(makeNodeHandle(_currentNode));
+ }
+ else
+ --_sp;
+ }
+ return NULL;
}
// redefine DTMAxisIteratorBase's reset
@@ -1476,7 +1476,7 @@
}
_currentNode = node;
-
+
return (node == NULL) ? NULL : returnNode(makeNodeHandle(node));
}
} // end of TypedPrecedingIterator
@@ -1487,7 +1487,7 @@
public class FollowingIterator extends InternalAxisIteratorBase
{
DTMAxisTraverser m_traverser; // easier for now
-
+
public FollowingIterator()
{
m_traverser = getAxisTraverser(Axis.FOLLOWING);
@@ -1575,7 +1575,7 @@
_currentNode = m_traverser.next(_startNode, _currentNode);
- }
+ }
while (node != DTM.NULL
&& (getExpandedTypeID(node) != _nodeType && getNodeType(node) != _nodeType));
@@ -1589,16 +1589,16 @@
*/
public class AncestorIterator extends InternalAxisIteratorBase
{
- com.sun.org.apache.xml.internal.utils.NodeVector m_ancestors =
+ com.sun.org.apache.xml.internal.utils.NodeVector m_ancestors =
new com.sun.org.apache.xml.internal.utils.NodeVector();
-
+
int m_ancestorsPos;
int m_markedPos;
-
+
/** The real start node for this axes, since _startNode will be adjusted. */
int m_realStartNode;
-
+
/**
* Get start to END should 'close' the iterator,
* i.e. subsequent call to next() should return END.
@@ -1713,12 +1713,12 @@
{
int next = _currentNode;
-
+
int pos = --m_ancestorsPos;
_currentNode = (pos >= 0) ? m_ancestors.elementAt(m_ancestorsPos)
: DTM.NULL;
-
+
return returnNode(next);
}
@@ -1898,11 +1898,11 @@
_currentNode = node;
return returnNode(makeNodeHandle(node)); // make handle.
}
-
+
/**
* Reset.
*
- */
+ */
public DTMAxisIterator reset()
{
@@ -1916,7 +1916,7 @@
return this;
}
-
+
} // end of DescendantIterator
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/DTMManagerDefault.java Wed May 02 13:32:36 2012 +0100
@@ -22,6 +22,7 @@
*/
package com.sun.org.apache.xml.internal.dtm.ref;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.transform.Source;
@@ -606,7 +607,7 @@
// If user did not supply a reader, ask for one from the reader manager
if (null == reader) {
if (m_readerManager == null) {
- m_readerManager = XMLReaderManager.getInstance();
+ m_readerManager = XMLReaderManager.getInstance(super.useServicesMechnism());
}
reader = m_readerManager.getXMLReader();
@@ -765,8 +766,7 @@
try
{
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
-
+ DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(super.useServicesMechnism());
dbf.setNamespaceAware(true);
DocumentBuilder db = dbf.newDocumentBuilder();
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/IncrementalSAXSource_Xerces.java Wed May 02 13:32:36 2012 +0100
@@ -30,6 +30,7 @@
import com.sun.org.apache.xerces.internal.parsers.SAXParser;
import com.sun.org.apache.xml.internal.res.XMLErrorResources;
import com.sun.org.apache.xml.internal.res.XMLMessages;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@@ -101,7 +102,7 @@
// If we can't get the magic constructor, no need to look further.
Class xniConfigClass=ObjectFactory.findProviderClass(
"com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration",
- ObjectFactory.findClassLoader(), true);
+ true);
Class[] args1={xniConfigClass};
Constructor ctor=SAXParser.class.getConstructor(args1);
@@ -110,7 +111,7 @@
// we're going to want to use.
Class xniStdConfigClass=ObjectFactory.findProviderClass(
"com.sun.org.apache.xerces.internal.parsers.StandardParserConfiguration",
- ObjectFactory.findClassLoader(), true);
+ true);
fPullParserConfig=xniStdConfigClass.newInstance();
Object[] args2={fPullParserConfig};
fIncrementalParser = (SAXParser)ctor.newInstance(args2);
@@ -120,7 +121,7 @@
// API changes again.
Class fXniInputSourceClass=ObjectFactory.findProviderClass(
"com.sun.org.apache.xerces.internal.xni.parser.XMLInputSource",
- ObjectFactory.findClassLoader(), true);
+ true);
Class[] args3={fXniInputSourceClass};
fConfigSetInput=xniStdConfigClass.getMethod("setInputSource",args3);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.7 2008/04/02 00:41:01 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 7772782876036961354L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/dtm/ref/dom2dtm/DOM2DTM.java Wed May 02 13:32:36 2012 +0100
@@ -1725,7 +1725,7 @@
try
{
Node node = getNode(nodeHandle);
- treeWalker.traverse(node);
+ treeWalker.traverseFragment(node);
}
finally
{
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Function not supported!"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Coroutine not available, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager received co_exit() request"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"Not supported: {0}"},
-
+
{ ER_NODE_NON_NULL,
"Node must be non-null for getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Scheme is required!"},
-
+
{ ER_NO_SCHEME_IN_URI,
"No scheme found in URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"Cannot change {0} {1} while parsing"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Self-causation not permitted"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"Port may not be specified if host is not specified"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"Query string cannot be specified in path and query string"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"Fragment cannot be specified in both the path and fragment"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"Cannot initialize URI with empty parameters"},
{ ER_METHOD_NOT_SUPPORTED,
"Method not yet supported "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter not currently restartable"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"Argument 'localName' is null"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"Prefix in QNAME should be a valid NCName"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"Name cannot start with a colon"},
-
+
{ "BAD_CODE", "Parameter to createMessage was out of bounds"},
{ "FORMAT_FAILED", "Exception thrown during messageFormat call"},
{ "line", "Line #"},
{ "column","Column #"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"The resource [ {0} ] could not be found.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"The resource [ {0} ] could not load: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Buffer size <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Invalid UTF-16 surrogate detected: {0} ?" },
-
+
{ER_OIERROR,
"IO error" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"Cannot add attribute {0} after child nodes or before an element is produced. Attribute will be ignored."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_de.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funktion nicht unterst\u00FCtzt."},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Coroutine nicht verf\u00FCgbar; ID={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager hat co_exit()-Anforderung erhalten"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"Nicht unterst\u00FCtzt: {0}"},
-
+
{ ER_NODE_NON_NULL,
"Knoten darf nicht null sein f\u00FCr getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Schema ist erforderlich."},
-
+
{ ER_NO_SCHEME_IN_URI,
"Kein Schema gefunden in URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"{0} {1} kann w\u00E4hrend Parsing nicht ge\u00E4ndert werden"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Selbstkausalit\u00E4t nicht zul\u00E4ssig"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"Port kann nicht angegeben werden, wenn der Host nicht angegeben wurde"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"Abfragezeichenfolge kann nicht im Pfad und in der Abfragezeichenfolge angegeben werden"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"Fragment kann nicht im Pfad und im Fragment angegeben werden"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"URI kann nicht mit leeren Parametern initialisiert werden"},
{ ER_METHOD_NOT_SUPPORTED,
"Methode noch nicht unterst\u00FCtzt "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter kann derzeit nicht neu gestartet werden"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"Argument \"localName\" ist null"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"Pr\u00E4fix in QNAME muss ein g\u00FCltiger NCName sein"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"Name darf nicht mit einem Doppelpunkt beginnen"},
-
+
{ "BAD_CODE", "Parameter f\u00FCr createMessage war au\u00DFerhalb des g\u00FCltigen Bereichs"},
{ "FORMAT_FAILED", "Ausnahme bei messageFormat-Aufruf ausgel\u00F6st"},
{ "line", "Zeilennummer"},
{ "column","Spaltennummer"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"Serializer-Klasse \"{0}\" implementiert org.xml.sax.ContentHandler nicht."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"Ressource [ {0} ] konnte nicht gefunden werden.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"Ressource [ {0} ] konnte nicht geladen werden: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Puffergr\u00F6\u00DFe <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Ung\u00FCltige UTF-16-Ersetzung festgestellt: {0}?" },
-
+
{ER_OIERROR,
"I/O-Fehler" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"Attribut {0} kann nicht nach untergeordneten Knoten oder vor dem Erstellen eines Elements hinzugef\u00FCgt werden. Attribut wird ignoriert."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"Versuch, Zeichen mit Integralwert {0} auszugeben, das nicht in der speziellen Ausgabecodierung von {1} dargestellt wird."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"Property-Datei \"{0}\" konnte f\u00FCr Ausgabemethode \"{1}\" nicht geladen werden (CLASSPATH pr\u00FCfen)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_es.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funci\u00F3n no soportada."},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Corrutina no disponible, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager ha recibido la solicitud co_exit()"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"No soportado: {0}"},
-
+
{ ER_NODE_NON_NULL,
"El nodo debe ser no nulo para getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Se necesita un esquema."},
-
+
{ ER_NO_SCHEME_IN_URI,
"No se ha encontrado un esquema en el URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"No se puede cambiar {0} {1} durante el an\u00E1lisis"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"La autocausalidad no est\u00E1 permitida"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"No se puede especificar el puerto si no se ha especificado el host"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"No se puede especificar la cadena de consulta en la ruta de acceso y en la cadena de consulta"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"No se puede especificar el fragmento en la ruta de acceso y en el fragmento"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"No se puede inicializar el URI con par\u00E1metros vac\u00EDos"},
{ ER_METHOD_NOT_SUPPORTED,
"M\u00E9todo no soportado a\u00FAn "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter no se puede reiniciar actualmente"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"El argumento 'localName' es nulo"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"El prefijo de QNAME debe ser un NCName v\u00E1lido"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"El nombre no puede empezar con dos puntos"},
-
+
{ "BAD_CODE", "El par\u00E1metro para crear un mensaje est\u00E1 fuera de los l\u00EDmites"},
{ "FORMAT_FAILED", "Se ha emitido una excepci\u00F3n durante la llamada a messageFormat"},
{ "line", "N\u00BA de L\u00EDnea"},
{ "column","N\u00BA de Columna"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"La clase de serializador ''{0}'' no implanta org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"No se ha encontrado el recurso [ {0} ].\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Tama\u00F1o de buffer menor o igual que 0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"\u00BFSe ha detectado un sustituto UTF-16 no v\u00E1lido: {0}?" },
-
+
{ER_OIERROR,
"Error de ES" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"No se puede agregar el atributo {0} despu\u00E9s de nodos secundarios o antes de que se produzca un elemento. Se ignorar\u00E1 el atributo."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"Intento de realizar la salida del car\u00E1cter del valor integral {0}, que no est\u00E1 representado en la codificaci\u00F3n de salida de {1}."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00E9todo de salida ''{1}'' (compruebe la CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_fr.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Fonction non prise en charge."},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Coroutine non disponible, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager a re\u00E7u la demande co_exit()"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"Non pris en charge : {0}"},
-
+
{ ER_NODE_NON_NULL,
"Le noeud doit \u00EAtre non NULL pour getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Mod\u00E8le obligatoire."},
-
+
{ ER_NO_SCHEME_IN_URI,
"Mod\u00E8le introuvable dans l''URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"Impossible de modifier {0} {1} pendant l''analyse"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Causalit\u00E9 circulaire non autoris\u00E9e"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"Le port peut ne pas \u00EAtre sp\u00E9cifi\u00E9 si l'h\u00F4te ne l'est pas"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"La cha\u00EEne de requ\u00EAte ne doit pas figurer dans un chemin et une cha\u00EEne de requ\u00EAte"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"Le fragment ne doit pas \u00EAtre indiqu\u00E9 \u00E0 la fois dans le chemin et dans le fragment"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"Impossible d'initialiser l'URI avec des param\u00E8tres vides"},
{ ER_METHOD_NOT_SUPPORTED,
"La m\u00E9thode n'est pas encore prise en charge "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter ne peut actuellement pas \u00EAtre red\u00E9marr\u00E9"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"L'argument \"localName\" est NULL"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"Le pr\u00E9fixe du QName doit \u00EAtre un NCName valide"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"Le nom ne peut pas commencer par deux-points"},
-
+
{ "BAD_CODE", "Le param\u00E8tre createMessage \u00E9tait hors limites"},
{ "FORMAT_FAILED", "Exception g\u00E9n\u00E9r\u00E9e pendant l'appel messageFormat"},
{ "line", "Ligne n\u00B0"},
{ "column","Colonne n\u00B0"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"La classe de serializer ''{0}'' n''impl\u00E9mente pas org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"La ressource [ {0} ] est introuvable.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Taille du tampon <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Substitut UTF-16 non valide d\u00E9tect\u00E9 : {0} ?" },
-
+
{ER_OIERROR,
"Erreur d'E-S" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"Impossible d''ajouter l''attribut {0} apr\u00E8s des noeuds enfant ou avant la production d''un \u00E9l\u00E9ment. L''attribut est ignor\u00E9."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"Tentative de sortie d''un caract\u00E8re avec une valeur enti\u00E8re {0}, non repr\u00E9sent\u00E9 dans l''encodage de sortie sp\u00E9cifi\u00E9 pour {1}."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"Impossible de charger le fichier de propri\u00E9t\u00E9s ''{0}'' pour la m\u00E9thode de sortie ''{1}'' (v\u00E9rifier CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_it.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funzione non supportata."},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Co-routine non disponibile, ID={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager ha ricevuto una richiesta co_exit()"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"Non supportato: {0}"},
-
+
{ ER_NODE_NON_NULL,
"Il nodo deve essere non nullo per getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Lo schema \u00E8 obbligatorio."},
-
+
{ ER_NO_SCHEME_IN_URI,
"Nessuno schema trovato nell''URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"Impossibile modificare {0} {1} durante l''analisi"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Creazione automatica della causa non consentita"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"La porta non pu\u00F2 essere specificata se l'host non \u00E8 specificato"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"La stringa di query non pu\u00F2 essere specificata nella stringa di percorso e query."},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"Il frammento non pu\u00F2 essere specificato sia nel percorso che nel frammento"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"Impossibile inizializzare l'URI con i parametri vuoti"},
{ ER_METHOD_NOT_SUPPORTED,
"Metodo attualmente non supportato "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter attualmente non riavviabile"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"L'argomento 'localName' \u00E8 nullo"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"Il prefisso in QNAME deve essere un NCName valido"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"Il nome non pu\u00F2 iniziare con i due punti"},
-
+
{ "BAD_CODE", "Parametro per createMessage fuori limite"},
{ "FORMAT_FAILED", "Eccezione durante la chiamata messageFormat"},
{ "line", "N. riga"},
{ "column","N. colonna"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"La classe serializzatore ''{0}'' non implementa org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"Risorsa [ {0} ] non trovata.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Dimensione buffer <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Rilevato surrogato UTF-16 non valido: {0}?" },
-
+
{ER_OIERROR,
"Errore IO" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"Impossibile aggiungere l''attributo {0} dopo i nodi figlio o prima che sia prodotto un elemento. L''attributo verr\u00E0 ignorato."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"Tentativo di eseguire l''output di un carattere di valore integrale {0} non rappresentato nella codifica di output {1} specificata."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"Impossibile caricare il file delle propriet\u00E0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ja.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u95A2\u6570\u304C\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"\u30B3\u30EB\u30FC\u30C1\u30F3\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager\u304Cco_exit()\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u53D7\u3051\u53D6\u308A\u307E\u3057\u305F"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093: {0}"},
-
+
{ ER_NODE_NON_NULL,
"\u30CE\u30FC\u30C9\u306FgetDTMHandleFromNode\u306B\u3064\u3044\u3066\u975Enull\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"\u30B9\u30AD\u30FC\u30E0\u304C\u5FC5\u8981\u3067\u3059\u3002"},
-
+
{ ER_NO_SCHEME_IN_URI,
"\u30B9\u30AD\u30FC\u30E0\u304CURI\u306B\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"\u89E3\u6790\u4E2D\u306B{0} {1}\u3092\u5909\u66F4\u3067\u304D\u307E\u305B\u3093"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"\u81EA\u5DF1\u539F\u56E0\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"\u30DB\u30B9\u30C8\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u306F\u30DD\u30FC\u30C8\u3092\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"\u554F\u5408\u305B\u6587\u5B57\u5217\u306F\u30D1\u30B9\u304A\u3088\u3073\u554F\u5408\u305B\u6587\u5B57\u5217\u5185\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306F\u30D1\u30B9\u3068\u30D5\u30E9\u30B0\u30E1\u30F3\u30C8\u306E\u4E21\u65B9\u306B\u6307\u5B9A\u3067\u304D\u307E\u305B\u3093"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"URI\u306F\u7A7A\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u4F7F\u7528\u3057\u3066\u521D\u671F\u5316\u3067\u304D\u307E\u305B\u3093"},
{ ER_METHOD_NOT_SUPPORTED,
"\u30E1\u30BD\u30C3\u30C9\u306F\u307E\u3060\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093 "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter\u306F\u73FE\u5728\u306F\u518D\u8D77\u52D5\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"\u5F15\u6570'localName'\u306Fnull\u3067\u3059"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"QNAME\u306E\u63A5\u982D\u8F9E\u306F\u6709\u52B9\u306ANCName\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"\u540D\u524D\u306E\u5148\u982D\u3092\u30B3\u30ED\u30F3\u306B\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093"},
-
+
{ "BAD_CODE", "createMessage\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u304C\u7BC4\u56F2\u5916\u3067\u3059"},
{ "FORMAT_FAILED", "messageFormat\u306E\u547C\u51FA\u3057\u4E2D\u306B\u4F8B\u5916\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F"},
{ "line", "\u884C\u756A\u53F7"},
{ "column","\u5217\u756A\u53F7"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"\u30B7\u30EA\u30A2\u30E9\u30A4\u30B6\u30FB\u30AF\u30E9\u30B9''{0}''\u306Forg.xml.sax.ContentHandler\u3092\u5B9F\u88C5\u3057\u307E\u305B\u3093\u3002"},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"\u30EA\u30BD\u30FC\u30B9[ {0} ]\u306F\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"\u30EA\u30BD\u30FC\u30B9[ {0} ]\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"\u30D0\u30C3\u30D5\u30A1\u30FB\u30B5\u30A4\u30BA<=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"\u7121\u52B9\u306AUTF-16\u30B5\u30ED\u30B2\u30FC\u30C8\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F: {0}\u3002" },
-
+
{ER_OIERROR,
"\u5165\u51FA\u529B\u30A8\u30E9\u30FC" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"\u5B50\u30CE\u30FC\u30C9\u306E\u5F8C\u307E\u305F\u306F\u8981\u7D20\u304C\u751F\u6210\u3055\u308C\u308B\u524D\u306B\u5C5E\u6027{0}\u3092\u8FFD\u52A0\u3067\u304D\u307E\u305B\u3093\u3002\u5C5E\u6027\u306F\u7121\u8996\u3055\u308C\u307E\u3059\u3002"},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"{1}\u306E\u6307\u5B9A\u3055\u308C\u305F\u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u793A\u3055\u308C\u306A\u3044\u6574\u6570\u5024{0}\u306E\u6587\u5B57\u3092\u51FA\u529B\u3057\u3088\u3046\u3068\u3057\u307E\u3057\u305F\u3002"},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"\u51FA\u529B\u30E1\u30BD\u30C3\u30C9''{1}''\u306E\u30D7\u30ED\u30D1\u30C6\u30A3\u30FB\u30D5\u30A1\u30A4\u30EB''{0}''\u3092\u30ED\u30FC\u30C9\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F(CLASSPATH\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_ko.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"\uD568\uC218\uAC00 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4!"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Coroutine\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. ID={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager\uAC00 co_exit() \uC694\uCCAD\uC744 \uC218\uC2E0\uD588\uC2B5\uB2C8\uB2E4."},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"\uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC74C: {0}"},
-
+
{ ER_NODE_NON_NULL,
"\uB178\uB4DC\uB294 getDTMHandleFromNode\uC5D0 \uB300\uD574 \uB110\uC774 \uC544\uB2C8\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"\uCCB4\uACC4\uAC00 \uD544\uC694\uD569\uB2C8\uB2E4!"},
-
+
{ ER_NO_SCHEME_IN_URI,
"URI\uC5D0\uC11C \uCCB4\uACC4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC74C: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"\uAD6C\uBB38 \uBD84\uC11D \uC911 {0} {1}\uC744(\uB97C) \uBCC0\uACBD\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"\uC790\uCCB4 \uC778\uACFC \uAD00\uACC4\uB294 \uD5C8\uC6A9\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"\uD638\uC2A4\uD2B8\uB97C \uC9C0\uC815\uD558\uC9C0 \uC54A\uC740 \uACBD\uC6B0\uC5D0\uB294 \uD3EC\uD2B8\uB97C \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"\uACBD\uB85C \uBC0F \uC9C8\uC758 \uBB38\uC790\uC5F4\uC5D0 \uC9C8\uC758 \uBB38\uC790\uC5F4\uC744 \uC9C0\uC815\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"\uACBD\uB85C\uC640 \uBD80\uBD84\uC5D0 \uBAA8\uB450 \uBD80\uBD84\uC744 \uC9C0\uC815\uD560 \uC218\uB294 \uC5C6\uC2B5\uB2C8\uB2E4."},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"\uBE48 \uB9E4\uAC1C\uBCC0\uC218\uB85C URI\uB97C \uCD08\uAE30\uD654\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
{ ER_METHOD_NOT_SUPPORTED,
"\uBA54\uC18C\uB4DC\uAC00 \uC544\uC9C1 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"\uD604\uC7AC IncrementalSAXSource_Filter\uB97C \uC7AC\uC2DC\uC791\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"'localName' \uC778\uC218\uAC00 \uB110\uC785\uB2C8\uB2E4."},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"QNAME\uC758 \uC811\uB450\uC5B4\uB294 \uC801\uD569\uD55C NCName\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4."},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"\uC774\uB984\uC740 \uCF5C\uB860\uC73C\uB85C \uC2DC\uC791\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},
-
+
{ "BAD_CODE", "createMessage\uC5D0 \uB300\uD55C \uB9E4\uAC1C\uBCC0\uC218\uAC00 \uBC94\uC704\uB97C \uBC97\uC5B4\uB0AC\uC2B5\uB2C8\uB2E4."},
{ "FORMAT_FAILED", "messageFormat \uD638\uCD9C \uC911 \uC608\uC678 \uC0AC\uD56D\uC774 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."},
{ "line", "\uD589 \uBC88\uD638"},
{ "column","\uC5F4 \uBC88\uD638"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"Serializer \uD074\uB798\uC2A4 ''{0}''\uC774(\uAC00) org.xml.sax.ContentHandler\uB97C \uAD6C\uD604\uD558\uC9C0 \uC54A\uC558\uC2B5\uB2C8\uB2E4."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"[{0}] \uB9AC\uC18C\uC2A4\uB97C \uCC3E\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"[{0}] \uB9AC\uC18C\uC2A4\uAC00 \uB2E4\uC74C\uC744 \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC74C: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"\uBC84\uD37C \uD06C\uAE30 <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"\uBD80\uC801\uD569\uD55C UTF-16 \uB300\uB9AC \uC694\uC18C\uAC00 \uAC10\uC9C0\uB428: {0}" },
-
+
{ER_OIERROR,
"IO \uC624\uB958" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"\uD558\uC704 \uB178\uB4DC\uAC00 \uC0DD\uC131\uB41C \uD6C4 \uB610\uB294 \uC694\uC18C\uAC00 \uC0DD\uC131\uB418\uAE30 \uC804\uC5D0 {0} \uC18D\uC131\uC744 \uCD94\uAC00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC18D\uC131\uC774 \uBB34\uC2DC\uB429\uB2C8\uB2E4."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"{1}\uC758 \uC9C0\uC815\uB41C \uCD9C\uB825 \uC778\uCF54\uB529\uC5D0\uC11C \uD45C\uC2DC\uB418\uC9C0 \uC54A\uB294 \uC815\uC218 \uAC12 {0}\uC758 \uBB38\uC790\uB97C \uCD9C\uB825\uD558\uB824\uACE0 \uC2DC\uB3C4\uD588\uC2B5\uB2C8\uB2E4."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"\uCD9C\uB825 \uBA54\uC18C\uB4DC ''{1}''\uC5D0 \uB300\uD55C \uC18D\uC131 \uD30C\uC77C ''{0}''\uC744(\uB97C) \uB85C\uB4DC\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. CLASSPATH\uB97C \uD655\uC778\uD558\uC2ED\uC2DC\uC624." }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_pt_BR.java Wed May 02 13:32:36 2012 +0100
@@ -93,7 +93,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -149,14 +149,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -187,8 +187,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Fun\u00E7\u00E3o n\u00E3o suportada!"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -205,7 +205,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Co-rotina n\u00E3o dispon\u00EDvel, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager recebeu a solicita\u00E7\u00E3o co_exit()"},
@@ -241,7 +241,7 @@
{ ER_NOT_SUPPORTED,
"N\u00E3o suportado: {0}"},
-
+
{ ER_NODE_NON_NULL,
"O n\u00F3 deve ser n\u00E3o-nulo para getDTMHandleFromNode"},
@@ -265,7 +265,7 @@
{ ER_SCHEME_REQUIRED,
"\u00C9 necess\u00E1rio um esquema!"},
-
+
{ ER_NO_SCHEME_IN_URI,
"Nenhum esquema encontrado no URI: {0}"},
@@ -304,7 +304,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"N\u00E3o \u00E9 poss\u00EDvel alterar {0} {1} durante o parse"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Autoaverigua\u00E7\u00E3o n\u00E3o permitida"},
@@ -314,18 +314,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"A porta n\u00E3o pode ser especificada se o host n\u00E3o tiver sido especificado"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"A string de consulta n\u00E3o pode ser especificada no caminho nem na string de consulta"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"O fragmento n\u00E3o pode ser especificado no caminho nem no fragmento"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"N\u00E3o \u00E9 poss\u00EDvel inicializar o URI com par\u00E2metros vazios"},
{ ER_METHOD_NOT_SUPPORTED,
"M\u00E9todo ainda n\u00E3o suportado "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter atualmente n\u00E3o reinicializ\u00E1vel"},
@@ -364,7 +364,7 @@
{ ER_ARG_LOCALNAME_NULL,
"O argumento 'localName' \u00E9 nulo"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -376,33 +376,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"O prefixo em QNAME deve ser um NCName v\u00E1lido"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"O nome n\u00E3o pode come\u00E7ar com dois pontos"},
-
+
{ "BAD_CODE", "O par\u00E2metro para createMessage estava fora dos limites"},
{ "FORMAT_FAILED", "Exce\u00E7\u00E3o gerada durante a chamada messageFormat"},
{ "line", "N\u00B0 da Linha"},
{ "column","N\u00B0 da Coluna"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"A classe ''{0}'' do serializador n\u00E3o implementa org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"N\u00E3o foi poss\u00EDvel encontrar o recurso [ {0} ].\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"O recurso [ {0} ] n\u00E3o foi carregado: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Tamanho do buffer <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Foi detectado um substituto de UTF-16 inv\u00E1lido: {0} ?" },
-
+
{ER_OIERROR,
"Erro de E/S" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"N\u00E3o \u00E9 poss\u00EDvel adicionar o atributo {0} depois dos n\u00F3s filhos ou antes que um elemento seja produzido. O atributo ser\u00E1 ignorado."},
@@ -437,28 +437,28 @@
{ ER_ILLEGAL_CHARACTER,
"Tentativa de exibir um caractere de valor integral {0} que n\u00E3o est\u00E1 representado na codifica\u00E7\u00E3o de sa\u00EDda especificada de {1}."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"N\u00E3o foi poss\u00EDvel carregar o arquivo de propriedade ''{0}'' para o m\u00E9todo de sa\u00EDda ''{1}'' (verificar CLASSPATH)" }
-
-
+
+
};
private static final Object[][] msgCopy = new Object[contents.length][2];
// return a copy of contents; in theory we want a deep clone
// of contents, but since it only contains (immutable) Strings,
// this shallow copy is sufficient
static {
- for (int i = 0; i < contents.length; i++) {
+ for (int i = 0; i < contents.length; i++) {
msgCopy[i][0] = contents[i][0];
msgCopy[i][1] = contents[i][1];
- }
+ }
}
/**
* Get the association list.
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return msgCopy;
}
@@ -525,5 +525,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_sv.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"Funktionen st\u00F6ds inte!"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Sidorutin \u00E4r inte tillg\u00E4nglig, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager har tagit emot co_exit()-beg\u00E4ran"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"Underst\u00F6ds inte: {0}"},
-
+
{ ER_NODE_NON_NULL,
"Nod m\u00E5ste vara icke-null f\u00F6r getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"Schema kr\u00E4vs!"},
-
+
{ ER_NO_SCHEME_IN_URI,
"Schema saknas i URI: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"Kan inte \u00E4ndra {0} {1} medan tolkning sker"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"Sj\u00E4lvorsakande inte till\u00E5ten"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"Port f\u00E5r inte anges om v\u00E4rden inte \u00E4r angiven"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"Fr\u00E5gestr\u00E4ng kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fr\u00E5gestr\u00E4ngen"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"Fragment kan inte anges i b\u00E5de s\u00F6kv\u00E4gen och fragmentet"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"Kan inte initiera URI med tomma parametrar"},
{ ER_METHOD_NOT_SUPPORTED,
"Metoden st\u00F6ds \u00E4nnu inte "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter kan f\u00F6r n\u00E4rvarande inte startas om"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"Argumentet 'localName' \u00E4r null"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"Prefix i QNAME b\u00F6r vara giltigt NCName"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"Namnet kan inte b\u00F6rja med kolon"},
-
+
{ "BAD_CODE", "Parameter f\u00F6r createMessage ligger utanf\u00F6r gr\u00E4nsv\u00E4rdet"},
{ "FORMAT_FAILED", "Undantag utl\u00F6st vid messageFormat-anrop"},
{ "line", "Rad #"},
{ "column","Kolumn #"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"Serializerklassen ''{0}'' implementerar inte org.xml.sax.ContentHandler."},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"Resursen [ {0} ] kunde inte h\u00E4mtas.\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"Resursen [ {0} ] kunde inte laddas: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"Buffertstorlek <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"Ogiltigt UTF-16-surrogat uppt\u00E4ckt: {0} ?" },
-
+
{ER_OIERROR,
"IO-fel" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"Kan inte l\u00E4gga till attributet {0} efter underordnade noder eller innan ett element har skapats. Attributet ignoreras."},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"F\u00F6rs\u00F6k att skriva utdatatecken med integralv\u00E4rdet {0} som inte \u00E4r representerat i angiven utdatakodning av {1}."},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"Kunde inte ladda egenskapsfilen ''{0}'' f\u00F6r utdatametoden ''{1}'' (kontrollera CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_CN.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u4E0D\u652F\u6301\u8BE5\u51FD\u6570!"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"Coroutine \u4E0D\u53EF\u7528, id={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager \u6536\u5230 co_exit() \u8BF7\u6C42"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"\u4E0D\u652F\u6301: {0}"},
-
+
{ ER_NODE_NON_NULL,
"getDTMHandleFromNode \u7684\u8282\u70B9\u5FC5\u987B\u4E3A\u975E\u7A7A\u503C"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"\u65B9\u6848\u662F\u5FC5\u9700\u7684!"},
-
+
{ ER_NO_SCHEME_IN_URI,
"\u5728 URI \u4E2D\u627E\u4E0D\u5230\u65B9\u6848: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"\u65E0\u6CD5\u5728\u8FDB\u884C\u8BED\u6CD5\u5206\u6790\u65F6\u66F4\u6539{0} {1}"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"\u4E0D\u5141\u8BB8\u4F7F\u7528\u81EA\u56E0"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"\u5982\u679C\u6CA1\u6709\u6307\u5B9A\u4E3B\u673A, \u5219\u4E0D\u53EF\u4EE5\u6307\u5B9A\u7AEF\u53E3"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"\u8DEF\u5F84\u548C\u67E5\u8BE2\u5B57\u7B26\u4E32\u4E2D\u4E0D\u80FD\u6307\u5B9A\u67E5\u8BE2\u5B57\u7B26\u4E32"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"\u8DEF\u5F84\u548C\u7247\u6BB5\u4E2D\u90FD\u65E0\u6CD5\u6307\u5B9A\u7247\u6BB5"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"\u65E0\u6CD5\u4EE5\u7A7A\u53C2\u6570\u521D\u59CB\u5316 URI"},
{ ER_METHOD_NOT_SUPPORTED,
"\u5C1A\u4E0D\u652F\u6301\u8BE5\u65B9\u6CD5 "},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"\u5F53\u524D\u65E0\u6CD5\u91CD\u65B0\u542F\u52A8 IncrementalSAXSource_Filter"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"\u53C2\u6570 'localName' \u4E3A\u7A7A\u503C"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"QNAME \u4E2D\u7684\u524D\u7F00\u5E94\u4E3A\u6709\u6548 NCName"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"\u540D\u79F0\u4E0D\u80FD\u4EE5\u5192\u53F7\u5F00\u5934"},
-
+
{ "BAD_CODE", "createMessage \u7684\u53C2\u6570\u8D85\u51FA\u8303\u56F4"},
{ "FORMAT_FAILED", "\u8C03\u7528 messageFormat \u65F6\u629B\u51FA\u5F02\u5E38\u9519\u8BEF"},
{ "line", "\u884C\u53F7"},
{ "column","\u5217\u53F7"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"\u4E32\u884C\u5668\u7C7B ''{0}'' \u4E0D\u5B9E\u73B0 org.xml.sax.ContentHandler\u3002"},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"\u627E\u4E0D\u5230\u8D44\u6E90 [ {0} ]\u3002\n {1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"\u8D44\u6E90 [ {0} ] \u65E0\u6CD5\u52A0\u8F7D: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"\u7F13\u51B2\u533A\u5927\u5C0F <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"\u68C0\u6D4B\u5230\u65E0\u6548\u7684 UTF-16 \u4EE3\u7406: {0}?" },
-
+
{ER_OIERROR,
"IO \u9519\u8BEF" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"\u5728\u751F\u6210\u5B50\u8282\u70B9\u4E4B\u540E\u6216\u5728\u751F\u6210\u5143\u7D20\u4E4B\u524D\u65E0\u6CD5\u6DFB\u52A0\u5C5E\u6027 {0}\u3002\u5C06\u5FFD\u7565\u5C5E\u6027\u3002"},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"\u5C1D\u8BD5\u8F93\u51FA\u672A\u4EE5{1}\u7684\u6307\u5B9A\u8F93\u51FA\u7F16\u7801\u8868\u793A\u7684\u6574\u6570\u503C {0} \u7684\u5B57\u7B26\u3002"},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"\u65E0\u6CD5\u4E3A\u8F93\u51FA\u65B9\u6CD5 ''{1}'' \u52A0\u8F7D\u5C5E\u6027\u6587\u4EF6 ''{0}'' (\u68C0\u67E5 CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/res/XMLErrorResources_zh_TW.java Wed May 02 13:32:36 2012 +0100
@@ -92,7 +92,7 @@
public static final int MAX_MESSAGES = MAX_CODE + MAX_WARNING + 1;
- /*
+ /*
* Message keys
*/
public static final String ER_FUNCTION_NOT_SUPPORTED = "ER_FUNCTION_NOT_SUPPORTED";
@@ -148,14 +148,14 @@
public static final String ER_SYSTEMID_UNKNOWN = "ER_SYSTEMID_UNKNOWN";
public static final String ER_LOCATION_UNKNOWN = "ER_LOCATION_UNKNOWN";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
- public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
+ public static final String ER_CREATEDOCUMENT_NOT_SUPPORTED = "ER_CREATEDOCUMENT_NOT_SUPPORTED";
public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT";
- public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
- public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
- public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
- public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
- public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
- public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
+ public static final String ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT = "ER_CHILD_HAS_NO_OWNER_DOCUMENT_ELEMENT";
+ public static final String ER_CANT_OUTPUT_TEXT_BEFORE_DOC = "ER_CANT_OUTPUT_TEXT_BEFORE_DOC";
+ public static final String ER_CANT_HAVE_MORE_THAN_ONE_ROOT = "ER_CANT_HAVE_MORE_THAN_ONE_ROOT";
+ public static final String ER_ARG_LOCALNAME_NULL = "ER_ARG_LOCALNAME_NULL";
+ public static final String ER_ARG_LOCALNAME_INVALID = "ER_ARG_LOCALNAME_INVALID";
+ public static final String ER_ARG_PREFIX_INVALID = "ER_ARG_PREFIX_INVALID";
public static final String ER_NAME_CANT_START_WITH_COLON = "ER_NAME_CANT_START_WITH_COLON";
// Message keys used by the serializer
@@ -186,8 +186,8 @@
/** Error message ID that has a null message, but takes in a single object. */
{"ER0000" , "{0}" },
-
- { ER_FUNCTION_NOT_SUPPORTED,
+
+ { ER_FUNCTION_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4\u51FD\u6578\uFF01"},
{ ER_CANNOT_OVERWRITE_CAUSE,
@@ -204,7 +204,7 @@
{ ER_COROUTINE_NOT_AVAIL,
"\u6C92\u6709\u53EF\u7528\u7684\u5171\u540C\u5E38\u5F0F\uFF0Cid={0}"},
-
+
{ ER_COROUTINE_CO_EXIT,
"CoroutineManager \u6536\u5230 co_exit() \u8981\u6C42"},
@@ -240,7 +240,7 @@
{ ER_NOT_SUPPORTED,
"\u4E0D\u652F\u63F4: {0}"},
-
+
{ ER_NODE_NON_NULL,
"\u7BC0\u9EDE\u5FC5\u9808\u662F\u975E\u7A7A\u503C\u7684 getDTMHandleFromNode"},
@@ -264,7 +264,7 @@
{ ER_SCHEME_REQUIRED,
"\u914D\u7F6E\u662F\u5FC5\u8981\u7684\uFF01"},
-
+
{ ER_NO_SCHEME_IN_URI,
"\u5728 URI \u4E2D\u627E\u4E0D\u5230\u914D\u7F6E: {0}"},
@@ -303,7 +303,7 @@
{ ER_CANNOT_CHANGE_WHILE_PARSING,
"\u5256\u6790\u6642\u7121\u6CD5\u8B8A\u66F4 {0} {1}"},
-
+
{ ER_SELF_CAUSATION_NOT_PERMITTED,
"\u4E0D\u5141\u8A31\u81EA\u884C\u5F15\u767C"},
@@ -313,18 +313,18 @@
{ ER_NO_PORT_IF_NO_HOST,
"\u5982\u679C\u6C92\u6709\u6307\u5B9A\u4E3B\u6A5F\uFF0C\u4E0D\u53EF\u6307\u5B9A\u9023\u63A5\u57E0"},
- { ER_NO_QUERY_STRING_IN_PATH,
+ { ER_NO_QUERY_STRING_IN_PATH,
"\u5728\u8DEF\u5F91\u53CA\u67E5\u8A62\u5B57\u4E32\u4E2D\u4E0D\u53EF\u6307\u5B9A\u67E5\u8A62\u5B57\u4E32"},
{ ER_NO_FRAGMENT_STRING_IN_PATH,
"\u8DEF\u5F91\u548C\u7247\u6BB5\u4E0D\u80FD\u540C\u6642\u6307\u5B9A\u7247\u6BB5"},
- { ER_CANNOT_INIT_URI_EMPTY_PARMS,
+ { ER_CANNOT_INIT_URI_EMPTY_PARMS,
"\u7121\u6CD5\u4EE5\u7A7A\u767D\u53C3\u6578\u8D77\u59CB\u8A2D\u5B9A URI"},
{ ER_METHOD_NOT_SUPPORTED,
"\u5C1A\u4E0D\u652F\u63F4\u65B9\u6CD5"},
-
+
{ ER_INCRSAXSRCFILTER_NOT_RESTARTABLE,
"IncrementalSAXSource_Filter \u76EE\u524D\u7121\u6CD5\u91CD\u65B0\u555F\u52D5"},
@@ -363,7 +363,7 @@
{ ER_ARG_LOCALNAME_NULL,
"\u5F15\u6578 'localName' \u70BA\u7A7A\u503C"},
-
+
// Note to translators: A QNAME has the syntactic form [NCName:]NCName
// The localname is the portion after the optional colon; the message indicates
// that there is a problem with that part of the QNAME.
@@ -375,33 +375,33 @@
// that there is a problem with that part of the QNAME.
{ ER_ARG_PREFIX_INVALID,
"QNAME \u4E2D\u7684\u524D\u7F6E\u78BC\u61C9\u70BA\u6709\u6548\u7684 NCName"},
-
+
{ ER_NAME_CANT_START_WITH_COLON,
"\u540D\u7A31\u4E0D\u80FD\u4EE5\u5192\u865F\u70BA\u958B\u982D"},
-
+
{ "BAD_CODE", "createMessage \u7684\u53C3\u6578\u8D85\u51FA\u7BC4\u570D"},
{ "FORMAT_FAILED", "messageFormat \u547C\u53EB\u671F\u9593\u767C\u751F\u7570\u5E38\u72C0\u6CC1"},
{ "line", "\u884C\u865F"},
{ "column","\u8CC7\u6599\u6B04\u7DE8\u865F"},
-
+
{ER_SERIALIZER_NOT_CONTENTHANDLER,
"serializer \u985E\u5225 ''{0}'' \u4E0D\u5BE6\u884C org.xml.sax.ContentHandler\u3002"},
-
+
{ER_RESOURCE_COULD_NOT_FIND,
"\u627E\u4E0D\u5230\u8CC7\u6E90 [ {0} ]\u3002\n{1}" },
-
+
{ER_RESOURCE_COULD_NOT_LOAD,
"\u7121\u6CD5\u8F09\u5165\u8CC7\u6E90 [ {0} ]: {1} \n {2} \t {3}" },
-
+
{ER_BUFFER_SIZE_LESSTHAN_ZERO,
"\u7DE9\u885D\u5340\u5927\u5C0F <=0" },
-
+
{ER_INVALID_UTF16_SURROGATE,
"\u5075\u6E2C\u5230\u7121\u6548\u7684 UTF-16 \u4EE3\u7406: {0}\uFF1F" },
-
+
{ER_OIERROR,
"IO \u932F\u8AA4" },
-
+
{ER_ILLEGAL_ATTRIBUTE_POSITION,
"\u5728\u7522\u751F\u5B50\u9805\u7BC0\u9EDE\u4E4B\u5F8C\uFF0C\u6216\u5728\u7522\u751F\u5143\u7D20\u4E4B\u524D\uFF0C\u4E0D\u53EF\u65B0\u589E\u5C6C\u6027 {0}\u3002\u5C6C\u6027\u6703\u88AB\u5FFD\u7565\u3002"},
@@ -436,11 +436,11 @@
{ ER_ILLEGAL_CHARACTER,
"\u5617\u8A66\u8F38\u51FA\u6574\u6578\u503C {0} \u7684\u5B57\u5143\uFF0C\u4F46\u662F\u5B83\u4E0D\u662F\u4EE5\u6307\u5B9A\u7684 {1} \u8F38\u51FA\u7DE8\u78BC\u5448\u73FE\u3002"},
-
+
{ER_COULD_NOT_LOAD_METHOD_PROPERTY,
"\u7121\u6CD5\u8F09\u5165\u8F38\u51FA\u65B9\u6CD5 ''{1}'' \u7684\u5C6C\u6027\u6A94 ''{0}'' (\u6AA2\u67E5 CLASSPATH)" }
-
-
+
+
};
/**
@@ -448,7 +448,7 @@
*
* @return The association list.
*/
-
+
protected Object[][] getContents() {
return _contents;
}
@@ -515,5 +515,5 @@
return suffix;
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Catalog.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Catalog.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Catalog.java Wed May 02 13:32:36 2012 +0100
@@ -23,6 +23,7 @@
package com.sun.org.apache.xml.internal.resolver;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import java.io.IOException;
import java.io.FileNotFoundException;
import java.io.InputStream;
@@ -399,18 +400,19 @@
* Setup readers.
*/
public void setupReaders() {
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(true);
spf.setValidating(false);
SAXCatalogReader saxReader = new SAXCatalogReader(spf);
saxReader.setCatalogParser(null, "XMLCatalog",
- "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");
+ "com.sun.org.apache.xml.internal.resolver.readers.XCatalogReader");
saxReader.setCatalogParser(OASISXMLCatalogReader.namespaceName,
- "catalog",
- "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
+ "catalog",
+ "com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader");
addReader("application/xml", saxReader);
@@ -478,8 +480,8 @@
String mimeType = (String) mapArr.get(count);
Integer pos = (Integer) readerMap.get(mimeType);
newCatalog.addReader(mimeType,
- (CatalogReader)
- readerArr.get(pos.intValue()));
+ (CatalogReader)
+ readerArr.get(pos.intValue()));
}
}
@@ -560,7 +562,7 @@
Vector catalogs = catalogManager.getCatalogFiles();
if (catalogs != null) {
for (int count = 0; count < catalogs.size(); count++) {
- catalogFiles.addElement(catalogs.elementAt(count));
+ catalogFiles.addElement(catalogs.elementAt(count));
}
}
@@ -674,7 +676,7 @@
CatalogReader reader = (CatalogReader) readerArr.get(count);
try {
- inStream = new DataInputStream(aUrl.openStream());
+ inStream = new DataInputStream(aUrl.openStream());
} catch (FileNotFoundException fnfe) {
// No catalog; give up!
break;
@@ -693,9 +695,9 @@
}
try {
- inStream.close();
+ inStream.close();
} catch (IOException e) {
- //nop
+ //nop
}
}
@@ -717,13 +719,13 @@
Vector newQueue = new Vector();
Enumeration q = localCatalogFiles.elements();
while (q.hasMoreElements()) {
- newQueue.addElement(q.nextElement());
+ newQueue.addElement(q.nextElement());
}
// Put the rest of the catalogs on the end of the new list
for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
- String catfile = (String) catalogFiles.elementAt(curCat);
- newQueue.addElement(catfile);
+ String catfile = (String) catalogFiles.elementAt(curCat);
+ newQueue.addElement(catfile);
}
catalogFiles = newQueue;
@@ -736,7 +738,7 @@
if (catalogFiles.isEmpty() && !localDelegate.isEmpty()) {
Enumeration e = localDelegate.elements();
while (e.hasMoreElements()) {
- catalogEntries.addElement(e.nextElement());
+ catalogEntries.addElement(e.nextElement());
}
localDelegate.clear();
}
@@ -747,50 +749,50 @@
while (!catalogFiles.isEmpty()) {
String catfile = (String) catalogFiles.elementAt(0);
try {
- catalogFiles.remove(0);
+ catalogFiles.remove(0);
} catch (ArrayIndexOutOfBoundsException e) {
- // can't happen
+ // can't happen
}
if (catalogEntries.size() == 0 && catalogs.size() == 0) {
- // We haven't parsed any catalogs yet, let this
- // catalog be the first...
- try {
- parseCatalogFile(catfile);
- } catch (CatalogException ce) {
- System.out.println("FIXME: " + ce.toString());
- }
+ // We haven't parsed any catalogs yet, let this
+ // catalog be the first...
+ try {
+ parseCatalogFile(catfile);
+ } catch (CatalogException ce) {
+ System.out.println("FIXME: " + ce.toString());
+ }
} else {
- // This is a subordinate catalog. We save its name,
- // but don't bother to load it unless it's necessary.
- catalogs.addElement(catfile);
+ // This is a subordinate catalog. We save its name,
+ // but don't bother to load it unless it's necessary.
+ catalogs.addElement(catfile);
}
if (!localCatalogFiles.isEmpty()) {
- // Move all the localCatalogFiles into the front of
- // the catalogFiles queue
- Vector newQueue = new Vector();
- Enumeration q = localCatalogFiles.elements();
- while (q.hasMoreElements()) {
- newQueue.addElement(q.nextElement());
- }
+ // Move all the localCatalogFiles into the front of
+ // the catalogFiles queue
+ Vector newQueue = new Vector();
+ Enumeration q = localCatalogFiles.elements();
+ while (q.hasMoreElements()) {
+ newQueue.addElement(q.nextElement());
+ }
- // Put the rest of the catalogs on the end of the new list
- for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
- catfile = (String) catalogFiles.elementAt(curCat);
- newQueue.addElement(catfile);
- }
+ // Put the rest of the catalogs on the end of the new list
+ for (int curCat = 0; curCat < catalogFiles.size(); curCat++) {
+ catfile = (String) catalogFiles.elementAt(curCat);
+ newQueue.addElement(catfile);
+ }
- catalogFiles = newQueue;
- localCatalogFiles.clear();
+ catalogFiles = newQueue;
+ localCatalogFiles.clear();
}
if (!localDelegate.isEmpty()) {
- Enumeration e = localDelegate.elements();
- while (e.hasMoreElements()) {
- catalogEntries.addElement(e.nextElement());
- }
- localDelegate.clear();
+ Enumeration e = localDelegate.elements();
+ while (e.hasMoreElements()) {
+ catalogEntries.addElement(e.nextElement());
+ }
+ localDelegate.clear();
}
}
@@ -830,11 +832,11 @@
base = new URL(catalogCwd, fixSlashes(fileName));
} catch (MalformedURLException e) {
try {
- base = new URL("file:" + fixSlashes(fileName));
+ base = new URL("file:" + fixSlashes(fileName));
} catch (MalformedURLException e2) {
- catalogManager.debug.message(1, "Malformed URL on catalog filename",
- fixSlashes(fileName));
- base = null;
+ catalogManager.debug.message(1, "Malformed URL on catalog filename",
+ fixSlashes(fileName));
+ base = null;
}
}
@@ -851,38 +853,38 @@
CatalogReader reader = (CatalogReader) readerArr.get(count);
try {
- notFound = false;
- inStream = new DataInputStream(base.openStream());
+ notFound = false;
+ inStream = new DataInputStream(base.openStream());
} catch (FileNotFoundException fnfe) {
- // No catalog; give up!
- notFound = true;
- break;
+ // No catalog; give up!
+ notFound = true;
+ break;
}
try {
- reader.readCatalog(this, inStream);
- parsed = true;
+ reader.readCatalog(this, inStream);
+ parsed = true;
} catch (CatalogException ce) {
- if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
- // give up!
- break;
- } else {
- // try again!
- }
+ if (ce.getExceptionType() == CatalogException.PARSE_FAILED) {
+ // give up!
+ break;
+ } else {
+ // try again!
+ }
}
try {
- inStream.close();
+ inStream.close();
} catch (IOException e) {
- //nop
+ //nop
}
}
if (!parsed) {
if (notFound) {
- catalogManager.debug.message(3, "Catalog does not exist", fileName);
+ catalogManager.debug.message(3, "Catalog does not exist", fileName);
} else {
- catalogManager.debug.message(1, "Failed to parse catalog", fileName);
+ catalogManager.debug.message(1, "Failed to parse catalog", fileName);
}
}
}
@@ -905,26 +907,26 @@
URL newbase = null;
if (base == null) {
- catalogManager.debug.message(5, "BASE CUR", "null");
+ catalogManager.debug.message(5, "BASE CUR", "null");
} else {
- catalogManager.debug.message(5, "BASE CUR", base.toString());
+ catalogManager.debug.message(5, "BASE CUR", base.toString());
}
catalogManager.debug.message(4, "BASE STR", value);
try {
- value = fixSlashes(value);
- newbase = new URL(base, value);
+ value = fixSlashes(value);
+ newbase = new URL(base, value);
} catch (MalformedURLException e) {
- try {
- newbase = new URL("file:" + value);
- } catch (MalformedURLException e2) {
- catalogManager.debug.message(1, "Malformed URL on base", value);
- newbase = null;
- }
+ try {
+ newbase = new URL("file:" + value);
+ } catch (MalformedURLException e2) {
+ catalogManager.debug.message(1, "Malformed URL on base", value);
+ newbase = null;
+ }
}
if (newbase != null) {
- base = newbase;
+ base = newbase;
}
catalogManager.debug.message(5, "BASE NEW", base.toString());
@@ -1145,14 +1147,14 @@
Catalog c = null;
try {
- c = (Catalog) catalogs.elementAt(catPos);
+ c = (Catalog) catalogs.elementAt(catPos);
} catch (ClassCastException e) {
- String catfile = (String) catalogs.elementAt(catPos);
- c = newCatalog();
+ String catfile = (String) catalogs.elementAt(catPos);
+ c = newCatalog();
- c.parseCatalog(catfile);
- catalogs.setElementAt(c, catPos);
- c.parseAllCatalogs();
+ c.parseCatalog(catfile);
+ catalogs.setElementAt(c, catPos);
+ c.parseAllCatalogs();
}
}
@@ -1161,10 +1163,10 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_PUBLIC
- || e.getEntryType() == DELEGATE_SYSTEM
- || e.getEntryType() == DELEGATE_URI) {
- Catalog dcat = newCatalog();
- dcat.parseCatalog(e.getEntryArg(1));
+ || e.getEntryType() == DELEGATE_SYSTEM
+ || e.getEntryType() == DELEGATE_URI) {
+ Catalog dcat = newCatalog();
+ dcat.parseCatalog(e.getEntryArg(1));
}
}
}
@@ -1187,13 +1189,13 @@
* @throws IOException Error reading subordinate catalog file.
*/
public String resolveDoctype(String entityName,
- String publicId,
- String systemId)
+ String publicId,
+ String systemId)
throws MalformedURLException, IOException {
String resolved = null;
catalogManager.debug.message(3, "resolveDoctype("
- +entityName+","+publicId+","+systemId+")");
+ +entityName+","+publicId+","+systemId+")");
systemId = normalizeURI(systemId);
@@ -1204,11 +1206,11 @@
if (systemId != null && systemId.startsWith("urn:publicid:")) {
systemId = PublicId.decodeURN(systemId);
if (publicId != null && !publicId.equals(systemId)) {
- catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
- systemId = null;
+ catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
+ systemId = null;
} else {
- publicId = systemId;
- systemId = null;
+ publicId = systemId;
+ systemId = null;
}
}
@@ -1216,18 +1218,18 @@
// If there's a SYSTEM entry in this catalog, use it
resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
if (publicId != null) {
// If there's a PUBLIC entry in this catalog, use it
resolved = resolveLocalPublic(DOCTYPE,
- entityName,
- publicId,
- systemId);
+ entityName,
+ publicId,
+ systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
@@ -1237,23 +1239,23 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) {
- over = e.getEntryArg(0).equalsIgnoreCase("YES");
- continue;
+ over = e.getEntryArg(0).equalsIgnoreCase("YES");
+ continue;
}
if (e.getEntryType() == DOCTYPE
- && e.getEntryArg(0).equals(entityName)) {
- if (over || systemId == null) {
- return e.getEntryArg(1);
- }
+ && e.getEntryArg(0).equals(entityName)) {
+ if (over || systemId == null) {
+ return e.getEntryArg(1);
+ }
}
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(DOCTYPE,
- entityName,
- publicId,
- systemId);
+ entityName,
+ publicId,
+ systemId);
}
/**
@@ -1275,12 +1277,12 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DOCUMENT) {
- return e.getEntryArg(0);
+ return e.getEntryArg(0);
}
}
return resolveSubordinateCatalogs(DOCUMENT,
- null, null, null);
+ null, null, null);
}
/**
@@ -1300,13 +1302,13 @@
* @throws IOException Error reading subordinate catalog file.
*/
public String resolveEntity(String entityName,
- String publicId,
- String systemId)
+ String publicId,
+ String systemId)
throws MalformedURLException, IOException {
String resolved = null;
catalogManager.debug.message(3, "resolveEntity("
- +entityName+","+publicId+","+systemId+")");
+ +entityName+","+publicId+","+systemId+")");
systemId = normalizeURI(systemId);
@@ -1317,11 +1319,11 @@
if (systemId != null && systemId.startsWith("urn:publicid:")) {
systemId = PublicId.decodeURN(systemId);
if (publicId != null && !publicId.equals(systemId)) {
- catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
- systemId = null;
+ catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
+ systemId = null;
} else {
- publicId = systemId;
- systemId = null;
+ publicId = systemId;
+ systemId = null;
}
}
@@ -1329,18 +1331,18 @@
// If there's a SYSTEM entry in this catalog, use it
resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
if (publicId != null) {
// If there's a PUBLIC entry in this catalog, use it
resolved = resolveLocalPublic(ENTITY,
- entityName,
- publicId,
- systemId);
+ entityName,
+ publicId,
+ systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
@@ -1350,23 +1352,23 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) {
- over = e.getEntryArg(0).equalsIgnoreCase("YES");
- continue;
+ over = e.getEntryArg(0).equalsIgnoreCase("YES");
+ continue;
}
if (e.getEntryType() == ENTITY
- && e.getEntryArg(0).equals(entityName)) {
- if (over || systemId == null) {
- return e.getEntryArg(1);
- }
+ && e.getEntryArg(0).equals(entityName)) {
+ if (over || systemId == null) {
+ return e.getEntryArg(1);
+ }
}
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(ENTITY,
- entityName,
- publicId,
- systemId);
+ entityName,
+ publicId,
+ systemId);
}
/**
@@ -1386,13 +1388,13 @@
* @throws IOException Error reading subordinate catalog file.
*/
public String resolveNotation(String notationName,
- String publicId,
- String systemId)
+ String publicId,
+ String systemId)
throws MalformedURLException, IOException {
String resolved = null;
catalogManager.debug.message(3, "resolveNotation("
- +notationName+","+publicId+","+systemId+")");
+ +notationName+","+publicId+","+systemId+")");
systemId = normalizeURI(systemId);
@@ -1403,11 +1405,11 @@
if (systemId != null && systemId.startsWith("urn:publicid:")) {
systemId = PublicId.decodeURN(systemId);
if (publicId != null && !publicId.equals(systemId)) {
- catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
- systemId = null;
+ catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
+ systemId = null;
} else {
- publicId = systemId;
- systemId = null;
+ publicId = systemId;
+ systemId = null;
}
}
@@ -1415,18 +1417,18 @@
// If there's a SYSTEM entry in this catalog, use it
resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
if (publicId != null) {
// If there's a PUBLIC entry in this catalog, use it
resolved = resolveLocalPublic(NOTATION,
- notationName,
- publicId,
- systemId);
+ notationName,
+ publicId,
+ systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
@@ -1436,23 +1438,23 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) {
- over = e.getEntryArg(0).equalsIgnoreCase("YES");
- continue;
+ over = e.getEntryArg(0).equalsIgnoreCase("YES");
+ continue;
}
if (e.getEntryType() == NOTATION
- && e.getEntryArg(0).equals(notationName)) {
- if (over || systemId == null) {
- return e.getEntryArg(1);
- }
+ && e.getEntryArg(0).equals(notationName)) {
+ if (over || systemId == null) {
+ return e.getEntryArg(1);
+ }
}
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(NOTATION,
- notationName,
- publicId,
- systemId);
+ notationName,
+ publicId,
+ systemId);
}
/**
@@ -1478,7 +1480,7 @@
* match is not found in the catalog, instead null is returned
* to indicate that no match was found.
*/
- public String resolvePublic(String publicId, String systemId)
+ public String resolvePublic(String publicId, String systemId)
throws MalformedURLException, IOException {
catalogManager.debug.message(3, "resolvePublic("+publicId+","+systemId+")");
@@ -1492,11 +1494,11 @@
if (systemId != null && systemId.startsWith("urn:publicid:")) {
systemId = PublicId.decodeURN(systemId);
if (publicId != null && !publicId.equals(systemId)) {
- catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
- systemId = null;
+ catalogManager.debug.message(1, "urn:publicid: system identifier differs from public identifier; using public identifier");
+ systemId = null;
} else {
- publicId = systemId;
- systemId = null;
+ publicId = systemId;
+ systemId = null;
}
}
@@ -1504,24 +1506,24 @@
if (systemId != null) {
String resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
// If there's a PUBLIC entry in this catalog, use it
String resolved = resolveLocalPublic(PUBLIC,
- null,
- publicId,
- systemId);
+ null,
+ publicId,
+ systemId);
if (resolved != null) {
return resolved;
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(PUBLIC,
- null,
- publicId,
- systemId);
+ null,
+ publicId,
+ systemId);
}
/**
@@ -1573,9 +1575,9 @@
* to indicate that no match was found.
*/
protected synchronized String resolveLocalPublic(int entityType,
- String entityName,
- String publicId,
- String systemId)
+ String entityName,
+ String publicId,
+ String systemId)
throws MalformedURLException, IOException {
// Always normalize the public identifier before attempting a match
@@ -1585,7 +1587,7 @@
if (systemId != null) {
String resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
@@ -1595,15 +1597,15 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) {
- over = e.getEntryArg(0).equalsIgnoreCase("YES");
- continue;
+ over = e.getEntryArg(0).equalsIgnoreCase("YES");
+ continue;
}
if (e.getEntryType() == PUBLIC
- && e.getEntryArg(0).equals(publicId)) {
- if (over || systemId == null) {
- return e.getEntryArg(1);
- }
+ && e.getEntryArg(0).equals(publicId)) {
+ if (over || systemId == null) {
+ return e.getEntryArg(1);
+ }
}
}
@@ -1614,19 +1616,19 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == OVERRIDE) {
- over = e.getEntryArg(0).equalsIgnoreCase("YES");
- continue;
+ over = e.getEntryArg(0).equalsIgnoreCase("YES");
+ continue;
}
if (e.getEntryType() == DELEGATE_PUBLIC
- && (over || systemId == null)) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= publicId.length()
- && p.equals(publicId.substring(0, p.length()))) {
- // delegate this match to the other catalog
+ && (over || systemId == null)) {
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= publicId.length()
+ && p.equals(publicId.substring(0, p.length()))) {
+ // delegate this match to the other catalog
- delCats.addElement(e.getEntryArg(1));
- }
+ delCats.addElement(e.getEntryArg(1));
+ }
}
}
@@ -1634,19 +1636,19 @@
Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) {
- catalogManager.debug.message(2, "Switching to delegated catalog(s):");
- while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- catalogManager.debug.message(2, "\t" + delegatedCatalog);
- }
+ catalogManager.debug.message(2, "Switching to delegated catalog(s):");
+ while (enCats.hasMoreElements()) {
+ String delegatedCatalog = (String) enCats.nextElement();
+ catalogManager.debug.message(2, "\t" + delegatedCatalog);
+ }
}
Catalog dcat = newCatalog();
enCats = delCats.elements();
while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- dcat.parseCatalog(delegatedCatalog);
+ String delegatedCatalog = (String) enCats.nextElement();
+ dcat.parseCatalog(delegatedCatalog);
}
return dcat.resolvePublic(publicId, null);
@@ -1690,15 +1692,15 @@
if (systemId != null) {
String resolved = resolveLocalSystem(systemId);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(SYSTEM,
- null,
- null,
- systemId);
+ null,
+ null,
+ systemId);
}
/**
@@ -1721,10 +1723,10 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == SYSTEM
- && (e.getEntryArg(0).equals(systemId)
- || (windows
- && e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
- return e.getEntryArg(1);
+ && (e.getEntryArg(0).equals(systemId)
+ || (windows
+ && e.getEntryArg(0).equalsIgnoreCase(systemId)))) {
+ return e.getEntryArg(1);
}
}
@@ -1736,16 +1738,16 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == REWRITE_SYSTEM) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= systemId.length()
- && p.equals(systemId.substring(0, p.length()))) {
- // Is this the longest prefix?
- if (startString == null
- || p.length() > startString.length()) {
- startString = p;
- prefix = e.getEntryArg(1);
- }
- }
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= systemId.length()
+ && p.equals(systemId.substring(0, p.length()))) {
+ // Is this the longest prefix?
+ if (startString == null
+ || p.length() > startString.length()) {
+ startString = p;
+ prefix = e.getEntryArg(1);
+ }
+ }
}
}
@@ -1762,16 +1764,16 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == SYSTEM_SUFFIX) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= systemId.length()
- && systemId.endsWith(p)) {
- // Is this the longest prefix?
- if (suffixString == null
- || p.length() > suffixString.length()) {
- suffixString = p;
- suffixURI = e.getEntryArg(1);
- }
- }
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= systemId.length()
+ && systemId.endsWith(p)) {
+ // Is this the longest prefix?
+ if (suffixString == null
+ || p.length() > suffixString.length()) {
+ suffixString = p;
+ suffixURI = e.getEntryArg(1);
+ }
+ }
}
}
@@ -1787,13 +1789,13 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_SYSTEM) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= systemId.length()
- && p.equals(systemId.substring(0, p.length()))) {
- // delegate this match to the other catalog
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= systemId.length()
+ && p.equals(systemId.substring(0, p.length()))) {
+ // delegate this match to the other catalog
- delCats.addElement(e.getEntryArg(1));
- }
+ delCats.addElement(e.getEntryArg(1));
+ }
}
}
@@ -1801,19 +1803,19 @@
Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) {
- catalogManager.debug.message(2, "Switching to delegated catalog(s):");
- while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- catalogManager.debug.message(2, "\t" + delegatedCatalog);
- }
+ catalogManager.debug.message(2, "Switching to delegated catalog(s):");
+ while (enCats.hasMoreElements()) {
+ String delegatedCatalog = (String) enCats.nextElement();
+ catalogManager.debug.message(2, "\t" + delegatedCatalog);
+ }
}
Catalog dcat = newCatalog();
enCats = delCats.elements();
while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- dcat.parseCatalog(delegatedCatalog);
+ String delegatedCatalog = (String) enCats.nextElement();
+ dcat.parseCatalog(delegatedCatalog);
}
return dcat.resolveSystem(systemId);
@@ -1854,15 +1856,15 @@
if (uri != null) {
String resolved = resolveLocalURI(uri);
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
// Otherwise, look in the subordinate catalogs
return resolveSubordinateCatalogs(URI,
- null,
- null,
- uri);
+ null,
+ null,
+ uri);
}
/**
@@ -1881,8 +1883,8 @@
while (en.hasMoreElements()) {
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == URI
- && (e.getEntryArg(0).equals(uri))) {
- return e.getEntryArg(1);
+ && (e.getEntryArg(0).equals(uri))) {
+ return e.getEntryArg(1);
}
}
@@ -1894,16 +1896,16 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == REWRITE_URI) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= uri.length()
- && p.equals(uri.substring(0, p.length()))) {
- // Is this the longest prefix?
- if (startString == null
- || p.length() > startString.length()) {
- startString = p;
- prefix = e.getEntryArg(1);
- }
- }
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= uri.length()
+ && p.equals(uri.substring(0, p.length()))) {
+ // Is this the longest prefix?
+ if (startString == null
+ || p.length() > startString.length()) {
+ startString = p;
+ prefix = e.getEntryArg(1);
+ }
+ }
}
}
@@ -1920,16 +1922,16 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == URI_SUFFIX) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= uri.length()
- && uri.endsWith(p)) {
- // Is this the longest prefix?
- if (suffixString == null
- || p.length() > suffixString.length()) {
- suffixString = p;
- suffixURI = e.getEntryArg(1);
- }
- }
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= uri.length()
+ && uri.endsWith(p)) {
+ // Is this the longest prefix?
+ if (suffixString == null
+ || p.length() > suffixString.length()) {
+ suffixString = p;
+ suffixURI = e.getEntryArg(1);
+ }
+ }
}
}
@@ -1945,13 +1947,13 @@
CatalogEntry e = (CatalogEntry) en.nextElement();
if (e.getEntryType() == DELEGATE_URI) {
- String p = (String) e.getEntryArg(0);
- if (p.length() <= uri.length()
- && p.equals(uri.substring(0, p.length()))) {
- // delegate this match to the other catalog
+ String p = (String) e.getEntryArg(0);
+ if (p.length() <= uri.length()
+ && p.equals(uri.substring(0, p.length()))) {
+ // delegate this match to the other catalog
- delCats.addElement(e.getEntryArg(1));
- }
+ delCats.addElement(e.getEntryArg(1));
+ }
}
}
@@ -1959,19 +1961,19 @@
Enumeration enCats = delCats.elements();
if (catalogManager.debug.getDebug() > 1) {
- catalogManager.debug.message(2, "Switching to delegated catalog(s):");
- while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- catalogManager.debug.message(2, "\t" + delegatedCatalog);
- }
+ catalogManager.debug.message(2, "Switching to delegated catalog(s):");
+ while (enCats.hasMoreElements()) {
+ String delegatedCatalog = (String) enCats.nextElement();
+ catalogManager.debug.message(2, "\t" + delegatedCatalog);
+ }
}
Catalog dcat = newCatalog();
enCats = delCats.elements();
while (enCats.hasMoreElements()) {
- String delegatedCatalog = (String) enCats.nextElement();
- dcat.parseCatalog(delegatedCatalog);
+ String delegatedCatalog = (String) enCats.nextElement();
+ dcat.parseCatalog(delegatedCatalog);
}
return dcat.resolveURI(uri);
@@ -2009,61 +2011,61 @@
* to indicate that no match was found.
*/
protected synchronized String resolveSubordinateCatalogs(int entityType,
- String entityName,
- String publicId,
- String systemId)
+ String entityName,
+ String publicId,
+ String systemId)
throws MalformedURLException, IOException {
for (int catPos = 0; catPos < catalogs.size(); catPos++) {
Catalog c = null;
try {
- c = (Catalog) catalogs.elementAt(catPos);
+ c = (Catalog) catalogs.elementAt(catPos);
} catch (ClassCastException e) {
- String catfile = (String) catalogs.elementAt(catPos);
- c = newCatalog();
+ String catfile = (String) catalogs.elementAt(catPos);
+ c = newCatalog();
- try {
- c.parseCatalog(catfile);
- } catch (MalformedURLException mue) {
- catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
- } catch (FileNotFoundException fnfe) {
- catalogManager.debug.message(1, "Failed to load catalog, file not found",
- catfile);
- } catch (IOException ioe) {
- catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
- }
+ try {
+ c.parseCatalog(catfile);
+ } catch (MalformedURLException mue) {
+ catalogManager.debug.message(1, "Malformed Catalog URL", catfile);
+ } catch (FileNotFoundException fnfe) {
+ catalogManager.debug.message(1, "Failed to load catalog, file not found",
+ catfile);
+ } catch (IOException ioe) {
+ catalogManager.debug.message(1, "Failed to load catalog, I/O error", catfile);
+ }
- catalogs.setElementAt(c, catPos);
+ catalogs.setElementAt(c, catPos);
}
String resolved = null;
// Ok, now what are we supposed to call here?
if (entityType == DOCTYPE) {
- resolved = c.resolveDoctype(entityName,
- publicId,
- systemId);
+ resolved = c.resolveDoctype(entityName,
+ publicId,
+ systemId);
} else if (entityType == DOCUMENT) {
- resolved = c.resolveDocument();
+ resolved = c.resolveDocument();
} else if (entityType == ENTITY) {
- resolved = c.resolveEntity(entityName,
- publicId,
- systemId);
+ resolved = c.resolveEntity(entityName,
+ publicId,
+ systemId);
} else if (entityType == NOTATION) {
- resolved = c.resolveNotation(entityName,
- publicId,
- systemId);
+ resolved = c.resolveNotation(entityName,
+ publicId,
+ systemId);
} else if (entityType == PUBLIC) {
- resolved = c.resolvePublic(publicId, systemId);
+ resolved = c.resolvePublic(publicId, systemId);
} else if (entityType == SYSTEM) {
- resolved = c.resolveSystem(systemId);
+ resolved = c.resolveSystem(systemId);
} else if (entityType == URI) {
- resolved = c.resolveURI(systemId);
+ resolved = c.resolveURI(systemId);
}
if (resolved != null) {
- return resolved;
+ return resolved;
}
}
@@ -2135,18 +2137,18 @@
int ch = bytes[count] & 0xFF;
if ((ch <= 0x20) // ctrl
- || (ch > 0x7F) // high ascii
- || (ch == 0x22) // "
- || (ch == 0x3C) // <
- || (ch == 0x3E) // >
- || (ch == 0x5C) // \
- || (ch == 0x5E) // ^
- || (ch == 0x60) // `
- || (ch == 0x7B) // {
- || (ch == 0x7C) // |
- || (ch == 0x7D) // }
- || (ch == 0x7F)) {
- newRef.append(encodedByte(ch));
+ || (ch > 0x7F) // high ascii
+ || (ch == 0x22) // "
+ || (ch == 0x3C) // <
+ || (ch == 0x3E) // >
+ || (ch == 0x5C) // \
+ || (ch == 0x5E) // ^
+ || (ch == 0x60) // `
+ || (ch == 0x7B) // {
+ || (ch == 0x7C) // |
+ || (ch == 0x7D) // }
+ || (ch == 0x7F)) {
+ newRef.append(encodedByte(ch));
} else {
newRef.append((char) bytes[count]);
}
@@ -2191,14 +2193,14 @@
CatalogEntry dpe = (CatalogEntry) local.nextElement();
String dp = dpe.getEntryArg(0);
if (dp.equals(partial)) {
- // we already have this prefix
- return;
+ // we already have this prefix
+ return;
}
if (dp.length() > partial.length()) {
- pos++;
+ pos++;
}
if (dp.length() < partial.length()) {
- break;
+ break;
}
}
@@ -2210,4 +2212,3 @@
}
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/CatalogManager.java Wed May 02 13:32:36 2012 +0100
@@ -122,6 +122,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class CatalogManager {
@@ -197,6 +198,12 @@
/** Current catalog class name. */
private String catalogClassName = null;
+ /**
+ * Indicates whether implementation parts should use
+ * service loader (or similar).
+ * Note the default value (false) is the safe option..
+ */
+ private boolean useServicesMechanism;
/** The manager's debug object. Used for printing debugging messages.
*
@@ -207,26 +214,26 @@
/** Constructor. */
public CatalogManager() {
+ init();
+ }
+
+ /** Constructor that specifies an explicit property file. */
+ public CatalogManager(String propertyFile) {
+ this.propertyFile = propertyFile;
+ init();
+ }
+
+ private void init() {
debug = new Debug();
// Note that we don't setDebug() here; we do that lazily. Either the
// user will set it explicitly, or we'll do it automagically if they
// read from the propertyFile for some other reason. That way, there's
// no attempt to read from the file before the caller has had a chance
// to avoid it.
+ if (System.getSecurityManager() == null) {
+ useServicesMechanism = true;
+ }
}
-
- /** Constructor that specifies an explicit property file. */
- public CatalogManager(String propertyFile) {
- this.propertyFile = propertyFile;
-
- debug = new Debug();
- // Note that we don't setDebug() here; we do that lazily. Either the
- // user will set it explicitly, or we'll do it automagically if they
- // read from the propertyFile for some other reason. That way, there's
- // no attempt to read from the file before the caller has had a chance
- // to avoid it.
- }
-
/** Set the bootstrap resolver.*/
public void setBootstrapResolver(BootstrapResolver resolver) {
bResolver = resolver;
@@ -773,6 +780,9 @@
return oasisXMLCatalogPI.booleanValue();
}
+ public boolean useServicesMechanism() {
+ return useServicesMechanism;
+ }
/**
* Set the XML Catalog PI setting
*/
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Resolver.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Resolver.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/Resolver.java Wed May 02 13:32:36 2012 +0100
@@ -31,10 +31,11 @@
import java.net.URL;
import java.net.URLConnection;
import java.net.MalformedURLException;
+import javax.xml.parsers.SAXParserFactory;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import com.sun.org.apache.xml.internal.resolver.readers.SAXCatalogReader;
import com.sun.org.apache.xml.internal.resolver.readers.OASISXMLCatalogReader;
import com.sun.org.apache.xml.internal.resolver.readers.TR9401CatalogReader;
-import javax.xml.parsers.SAXParserFactory;
/**
* An extension to OASIS Open Catalog files, this class supports
@@ -45,6 +46,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class Resolver extends Catalog {
/**
@@ -84,7 +86,8 @@
* Setup readers.
*/
public void setupReaders() {
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(true);
spf.setValidating(false);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/helpers/FileURL.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/helpers/FileURL.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/helpers/FileURL.java Wed May 02 13:32:36 2012 +0100
@@ -77,10 +77,10 @@
/*if (pathname.startsWith("/")) {
return new URL("file://" + pathname);
}
-
+
String userdir = System.getProperty("user.dir");
userdir.replace('\\', '/');
-
+
if (userdir.endsWith("/")) {
return new URL("file:///" + userdir + pathname);
} else {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/CatalogResolver.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/CatalogResolver.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/CatalogResolver.java Wed May 02 13:32:36 2012 +0100
@@ -23,6 +23,7 @@
package com.sun.org.apache.xml.internal.resolver.tools;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
@@ -61,6 +62,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class CatalogResolver implements EntityResolver, URIResolver {
/** Make the parser Namespace aware? */
@@ -302,7 +304,8 @@
private void setEntityResolver(SAXSource source) throws TransformerException {
XMLReader reader = source.getXMLReader();
if (reader == null) {
- SAXParserFactory spFactory = SAXParserFactory.newInstance();
+ SAXParserFactory spFactory = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spFactory.setNamespaceAware(true);
try {
reader = spFactory.newSAXParser().getXMLReader();
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingParser.java Wed May 02 13:32:36 2012 +0100
@@ -42,6 +42,7 @@
import javax.xml.parsers.SAXParserFactory;
import javax.xml.parsers.SAXParser;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import com.sun.org.apache.xml.internal.resolver.Catalog;
import com.sun.org.apache.xml.internal.resolver.CatalogManager;
import com.sun.org.apache.xml.internal.resolver.helpers.FileURL;
@@ -62,6 +63,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class ResolvingParser
implements Parser, DTDHandler, DocumentHandler, EntityResolver {
@@ -121,8 +123,8 @@
/** Initialize the parser. */
private void initParser() {
catalogResolver = new CatalogResolver(catalogManager);
-
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLFilter.java Wed May 02 13:32:36 2012 +0100
@@ -53,6 +53,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class ResolvingXMLFilter extends XMLFilterImpl {
/**
@@ -63,7 +64,7 @@
public static boolean suppressExplanation = false;
/** The manager for the underlying resolver. */
- private CatalogManager catalogManager = CatalogManager.getStaticManager();
+ CatalogManager catalogManager = CatalogManager.getStaticManager();
/** The underlying catalog resolver. */
private CatalogResolver catalogResolver = null;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLReader.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLReader.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/resolver/tools/ResolvingXMLReader.java Wed May 02 13:32:36 2012 +0100
@@ -27,6 +27,7 @@
import javax.xml.parsers.*;
+import com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl;
import com.sun.org.apache.xml.internal.resolver.*;
/**
@@ -43,6 +44,7 @@
* @author Norman Walsh
* Norman.Walsh@Sun.COM
*
+ * @version 1.0
*/
public class ResolvingXMLReader extends ResolvingXMLFilter {
/** Make the parser Namespace aware? */
@@ -60,7 +62,8 @@
*/
public ResolvingXMLReader() {
super();
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
@@ -80,7 +83,8 @@
*/
public ResolvingXMLReader(CatalogManager manager) {
super(manager);
- SAXParserFactory spf = SAXParserFactory.newInstance();
+ SAXParserFactory spf = catalogManager.useServicesMechanism() ?
+ SAXParserFactory.newInstance() : new SAXParserFactoryImpl();
spf.setNamespaceAware(namespaceAware);
spf.setValidating(validating);
try {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/DOMSerializerImpl.java Wed May 02 13:32:36 2012 +0100
@@ -84,19 +84,19 @@
// TODO: When DOM Level 3 goes to REC replace method calls using
// reflection for: getXmlEncoding, getInputEncoding and getXmlEncoding
// with regular static calls on the Document object.
-
+
// data
// serializer
private XMLSerializer serializer;
// XML 1.1 serializer
private XML11Serializer xml11Serializer;
-
+
//Recognized parameters
private DOMStringList fRecognizedParameters;
-
+
/** REVISIT: Currently we handle 3 different configurations, would be nice just have one configuration
- * that has different recognized parameters depending if it is used in Core/LS.
+ * that has different recognized parameters depending if it is used in Core/LS.
*/
protected short features = 0;
@@ -114,7 +114,7 @@
protected final static short FORMAT_PRETTY_PRINT = 0x1<<11;
// well-formness checking
- private DOMErrorHandler fErrorHandler = null;
+ private DOMErrorHandler fErrorHandler = null;
private final DOMErrorImpl fError = new DOMErrorImpl();
private final DOMLocatorImpl fLocator = new DOMLocatorImpl();
private static final RuntimeException abort = new RuntimeException();
@@ -137,7 +137,7 @@
features |= DOM_ELEMENT_CONTENT_WHITESPACE;
features |= DISCARDDEFAULT;
features |= XMLDECL;
-
+
serializer = new XMLSerializer();
initSerializer(serializer);
}
@@ -165,12 +165,12 @@
features |= NAMESPACES;
features |= NSDECL;
features |= WELLFORMED;
- features |= COMMENTS;
+ features |= COMMENTS;
}
// false does not have any effect
} else if (name.equalsIgnoreCase(Constants.DOM_XMLDECL)) {
features =
- (short) (state ? features | XMLDECL : features & ~XMLDECL);
+ (short) (state ? features | XMLDECL : features & ~XMLDECL);
} else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACES)) {
features =
(short) (state
@@ -232,13 +232,13 @@
throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg);
}
}else if (
- name.equalsIgnoreCase(Constants.DOM_NAMESPACE_DECLARATIONS)) {
- //namespace-declaration has effect only if namespaces is true
- features =
- (short) (state
- ? features | NSDECL
- : features & ~NSDECL);
- serializer.fNamespacePrefixes = state;
+ name.equalsIgnoreCase(Constants.DOM_NAMESPACE_DECLARATIONS)) {
+ //namespace-declaration has effect only if namespaces is true
+ features =
+ (short) (state
+ ? features | NSDECL
+ : features & ~NSDECL);
+ serializer.fNamespacePrefixes = state;
} else if (name.equalsIgnoreCase(Constants.DOM_ELEMENT_CONTENT_WHITESPACE)
|| name.equalsIgnoreCase(Constants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
// false is not supported
@@ -273,7 +273,7 @@
name.equalsIgnoreCase(Constants.DOM_RESOURCE_RESOLVER)
|| name.equalsIgnoreCase(Constants.DOM_SCHEMA_LOCATION)
|| name.equalsIgnoreCase(Constants.DOM_SCHEMA_TYPE)
- || name.equalsIgnoreCase(Constants.DOM_NORMALIZE_CHARACTERS)
+ || name.equalsIgnoreCase(Constants.DOM_NORMALIZE_CHARACTERS)
&& value != null) {
String msg =
DOMMessageFormatter.formatMessage(
@@ -295,14 +295,14 @@
* Check if parameter can be set
*/
public boolean canSetParameter(String name, Object state) {
-
+
if (state == null) {
return true;
}
-
+
if (state instanceof Boolean) {
boolean value = ((Boolean) state).booleanValue();
-
+
if (name.equalsIgnoreCase(Constants.DOM_NAMESPACES)
|| name.equalsIgnoreCase(Constants.DOM_SPLIT_CDATA)
|| name.equalsIgnoreCase(Constants.DOM_DISCARD_DEFAULT_CONTENT)
@@ -333,63 +333,63 @@
state == null || state instanceof DOMErrorHandler) {
return true;
}
-
+
return false;
}
/**
* DOM Level 3 Core CR - Experimental.
- *
- * The list of the parameters supported by this
- * DOMConfiguration
object and for which at least one value
- * can be set by the application. Note that this list can also contain
- * parameter names defined outside this specification.
+ *
+ * The list of the parameters supported by this
+ * DOMConfiguration
object and for which at least one value
+ * can be set by the application. Note that this list can also contain
+ * parameter names defined outside this specification.
*/
public DOMStringList getParameterNames() {
-
- if (fRecognizedParameters == null){
- Vector parameters = new Vector();
+
+ if (fRecognizedParameters == null){
+ Vector parameters = new Vector();
- //Add DOM recognized parameters
- //REVISIT: Would have been nice to have a list of
- //recognized parameters.
- parameters.add(Constants.DOM_NAMESPACES);
- parameters.add(Constants.DOM_SPLIT_CDATA);
- parameters.add(Constants.DOM_DISCARD_DEFAULT_CONTENT);
- parameters.add(Constants.DOM_XMLDECL);
- parameters.add(Constants.DOM_CANONICAL_FORM);
- parameters.add(Constants.DOM_VALIDATE_IF_SCHEMA);
- parameters.add(Constants.DOM_VALIDATE);
- parameters.add(Constants.DOM_CHECK_CHAR_NORMALIZATION);
- parameters.add(Constants.DOM_DATATYPE_NORMALIZATION);
- parameters.add(Constants.DOM_FORMAT_PRETTY_PRINT);
- //parameters.add(Constants.DOM_NORMALIZE_CHARACTERS);
- parameters.add(Constants.DOM_WELLFORMED);
- parameters.add(Constants.DOM_INFOSET);
- parameters.add(Constants.DOM_NAMESPACE_DECLARATIONS);
- parameters.add(Constants.DOM_ELEMENT_CONTENT_WHITESPACE);
- parameters.add(Constants.DOM_ENTITIES);
- parameters.add(Constants.DOM_CDATA_SECTIONS);
- parameters.add(Constants.DOM_COMMENTS);
- parameters.add(Constants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS);
- parameters.add(Constants.DOM_ERROR_HANDLER);
- //parameters.add(Constants.DOM_SCHEMA_LOCATION);
- //parameters.add(Constants.DOM_SCHEMA_TYPE);
-
- //Add recognized xerces features and properties
-
- fRecognizedParameters = new DOMStringListImpl(parameters);
-
- }
+ //Add DOM recognized parameters
+ //REVISIT: Would have been nice to have a list of
+ //recognized parameters.
+ parameters.add(Constants.DOM_NAMESPACES);
+ parameters.add(Constants.DOM_SPLIT_CDATA);
+ parameters.add(Constants.DOM_DISCARD_DEFAULT_CONTENT);
+ parameters.add(Constants.DOM_XMLDECL);
+ parameters.add(Constants.DOM_CANONICAL_FORM);
+ parameters.add(Constants.DOM_VALIDATE_IF_SCHEMA);
+ parameters.add(Constants.DOM_VALIDATE);
+ parameters.add(Constants.DOM_CHECK_CHAR_NORMALIZATION);
+ parameters.add(Constants.DOM_DATATYPE_NORMALIZATION);
+ parameters.add(Constants.DOM_FORMAT_PRETTY_PRINT);
+ //parameters.add(Constants.DOM_NORMALIZE_CHARACTERS);
+ parameters.add(Constants.DOM_WELLFORMED);
+ parameters.add(Constants.DOM_INFOSET);
+ parameters.add(Constants.DOM_NAMESPACE_DECLARATIONS);
+ parameters.add(Constants.DOM_ELEMENT_CONTENT_WHITESPACE);
+ parameters.add(Constants.DOM_ENTITIES);
+ parameters.add(Constants.DOM_CDATA_SECTIONS);
+ parameters.add(Constants.DOM_COMMENTS);
+ parameters.add(Constants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS);
+ parameters.add(Constants.DOM_ERROR_HANDLER);
+ //parameters.add(Constants.DOM_SCHEMA_LOCATION);
+ //parameters.add(Constants.DOM_SCHEMA_TYPE);
- return fRecognizedParameters;
- }
-
+ //Add recognized xerces features and properties
+
+ fRecognizedParameters = new DOMStringListImpl(parameters);
+
+ }
+
+ return fRecognizedParameters;
+ }
+
/** DOM L3-EXPERIMENTAL:
* Getter for boolean and object parameters
*/
public Object getParameter(String name) throws DOMException {
-
+
if(name.equalsIgnoreCase(Constants.DOM_NORMALIZE_CHARACTERS)){
return null;
} else if (name.equalsIgnoreCase(Constants.DOM_COMMENTS)) {
@@ -407,9 +407,9 @@
} else if (name.equalsIgnoreCase(Constants.DOM_WELLFORMED)) {
return (features & WELLFORMED) != 0 ? Boolean.TRUE : Boolean.FALSE;
} else if (name.equalsIgnoreCase(Constants.DOM_NAMESPACE_DECLARATIONS)) {
- return (features & NSDECL) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ return (features & NSDECL) != 0 ? Boolean.TRUE : Boolean.FALSE;
} else if (name.equalsIgnoreCase(Constants.DOM_FORMAT_PRETTY_PRINT)) {
- return (features & FORMAT_PRETTY_PRINT) != 0 ? Boolean.TRUE : Boolean.FALSE;
+ return (features & FORMAT_PRETTY_PRINT) != 0 ? Boolean.TRUE : Boolean.FALSE;
} else if (name.equalsIgnoreCase(Constants.DOM_ELEMENT_CONTENT_WHITESPACE) ||
name.equalsIgnoreCase(Constants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) {
return Boolean.TRUE;
@@ -423,8 +423,8 @@
(features & WELLFORMED) != 0 &&
(features & COMMENTS) != 0) {
return Boolean.TRUE;
- }
- return Boolean.FALSE;
+ }
+ return Boolean.FALSE;
} else if (name.equalsIgnoreCase(Constants.DOM_CANONICAL_FORM)
|| name.equalsIgnoreCase(Constants.DOM_VALIDATE_IF_SCHEMA)
|| name.equalsIgnoreCase(Constants.DOM_CHECK_CHAR_NORMALIZATION)
@@ -471,7 +471,7 @@
* DOMString
.
* @exception LSException
* SERIALIZE_ERR: Unable to serialize the node. DOM applications should
- * attach a DOMErrorHandler
using the parameter
+ * attach a DOMErrorHandler
using the parameter
* "error-handler" to get details on error.
*/
public String writeToString(Node wnode) throws DOMException, LSException {
@@ -516,7 +516,7 @@
else if (wnode.getNodeType() == Node.ELEMENT_NODE) {
ser.serialize((Element)wnode);
}
- else if (wnode.getNodeType() == Node.TEXT_NODE ||
+ else if (wnode.getNodeType() == Node.TEXT_NODE ||
wnode.getNodeType() == Node.COMMENT_NODE ||
wnode.getNodeType() == Node.ENTITY_REFERENCE_NODE ||
wnode.getNodeType() == Node.CDATA_SECTION_NODE ||
@@ -525,7 +525,7 @@
}
else {
String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.SERIALIZER_DOMAIN,
+ DOMMessageFormatter.SERIALIZER_DOMAIN,
"unable-to-serialize-node", null);
if (ser.fDOMErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl();
@@ -555,7 +555,7 @@
new Object[] { ioe.getMessage()});
throw (DOMException) new DOMException(DOMException.DOMSTRING_SIZE_ERR, msg).initCause(ioe);
}
-
+
return destination.toString();
}
@@ -638,7 +638,7 @@
private void initSerializer(XMLSerializer ser) {
ser.fNSBinder = new NamespaceSupport();
ser.fLocalNSBinder = new NamespaceSupport();
- ser.fSymbolTable = new SymbolTable();
+ ser.fSymbolTable = new SymbolTable();
}
// copies all settings that could have been modified
@@ -687,7 +687,7 @@
if (node == null)
return false;
-
+
Method getVersion = null;
XMLSerializer ser = null;
String ver = null;
@@ -753,7 +753,7 @@
if (outputStream == null) {
if (uri == null) {
String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.SERIALIZER_DOMAIN,
+ DOMMessageFormatter.SERIALIZER_DOMAIN,
"no-output-specified", null);
if (ser.fDOMErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl();
@@ -772,7 +772,7 @@
String protocol = url.getProtocol();
String host = url.getHost();
// Use FileOutputStream if this URI is for a local file.
- if (protocol.equals("file")
+ if (protocol.equals("file")
&& (host == null || host.length() == 0 || host.equals("localhost"))) {
out = new FileOutputStream(getPathWithoutEscapes(url.getFile()));
}
@@ -785,7 +785,7 @@
urlCon.setUseCaches(false); // Enable tunneling.
if (urlCon instanceof HttpURLConnection) {
// The DOM L3 LS CR says if we are writing to an HTTP URI
- // it is to be done with an HTTP PUT.
+ // it is to be done with an HTTP PUT.
HttpURLConnection httpCon = (HttpURLConnection) urlCon;
httpCon.setRequestMethod("PUT");
}
@@ -801,7 +801,7 @@
}
else {
// character stream is specified
- ser.setOutputCharStream(writer);
+ ser.setOutputCharStream(writer);
}
if (node.getNodeType() == Node.DOCUMENT_NODE)
@@ -810,7 +810,7 @@
ser.serialize((DocumentFragment) node);
else if (node.getNodeType() == Node.ELEMENT_NODE)
ser.serialize((Element) node);
- else if (node.getNodeType() == Node.TEXT_NODE ||
+ else if (node.getNodeType() == Node.TEXT_NODE ||
node.getNodeType() == Node.COMMENT_NODE ||
node.getNodeType() == Node.ENTITY_REFERENCE_NODE ||
node.getNodeType() == Node.CDATA_SECTION_NODE ||
@@ -823,16 +823,16 @@
if (ser.fDOMErrorHandler != null) {
DOMErrorImpl error = new DOMErrorImpl();
error.fException = ue;
- error.fType = "unsupported-encoding";
+ error.fType = "unsupported-encoding";
error.fMessage = ue.getMessage();
- error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
+ error.fSeverity = DOMError.SEVERITY_FATAL_ERROR;
ser.fDOMErrorHandler.handleError(error);
- }
- throw new LSException(LSException.SERIALIZE_ERR,
+ }
+ throw new LSException(LSException.SERIALIZE_ERR,
DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.SERIALIZER_DOMAIN,
- "unsupported-encoding", null));
- //return false;
+ DOMMessageFormatter.SERIALIZER_DOMAIN,
+ "unsupported-encoding", null));
+ //return false;
} catch (LSException lse) {
// Rethrow LSException.
throw lse;
@@ -850,8 +850,8 @@
error.fSeverity = DOMError.SEVERITY_ERROR;
ser.fDOMErrorHandler.handleError(error);
- }
- e.printStackTrace();
+ }
+ e.printStackTrace();
throw (LSException) DOMUtil.createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace();
}
return true;
@@ -917,7 +917,7 @@
ser = xml11Serializer;
} else {
ser = serializer;
- }
+ }
try {
Method getEncoding =
@@ -946,7 +946,7 @@
try {
prepareForSerialization(ser, node);
ser._format.setEncoding(encoding);
-
+
// URI was specified. Handle relative URIs.
String expanded = XMLEntityManager.expandSystemId(URI, null, true);
URL url = new URL(expanded != null ? expanded : URI);
@@ -954,9 +954,9 @@
String protocol = url.getProtocol();
String host = url.getHost();
// Use FileOutputStream if this URI is for a local file.
- if (protocol.equals("file")
+ if (protocol.equals("file")
&& (host == null || host.length() == 0 || host.equals("localhost"))) {
- out = new FileOutputStream(getPathWithoutEscapes(url.getFile()));
+ out = new FileOutputStream(getPathWithoutEscapes(url.getFile()));
}
// Try to write to some other kind of URI. Some protocols
// won't support this, though HTTP should work.
@@ -967,7 +967,7 @@
urlCon.setUseCaches(false); // Enable tunneling.
if (urlCon instanceof HttpURLConnection) {
// The DOM L3 LS CR says if we are writing to an HTTP URI
- // it is to be done with an HTTP PUT.
+ // it is to be done with an HTTP PUT.
HttpURLConnection httpCon = (HttpURLConnection) urlCon;
httpCon.setRequestMethod("PUT");
}
@@ -981,7 +981,7 @@
ser.serialize((DocumentFragment) node);
else if (node.getNodeType() == Node.ELEMENT_NODE)
ser.serialize((Element) node);
- else if (node.getNodeType() == Node.TEXT_NODE ||
+ else if (node.getNodeType() == Node.TEXT_NODE ||
node.getNodeType() == Node.COMMENT_NODE ||
node.getNodeType() == Node.ENTITY_REFERENCE_NODE ||
node.getNodeType() == Node.CDATA_SECTION_NODE ||
@@ -1011,8 +1011,8 @@
}
return true;
} //writeURI
-
-
+
+
//
// Private methods
//
@@ -1024,7 +1024,7 @@
ser.fNamespaces = (features & NAMESPACES) != 0;
ser.fNamespacePrefixes = (features & NSDECL) != 0;
ser._format.setOmitComments((features & COMMENTS)==0);
- ser._format.setOmitXMLDeclaration((features & XMLDECL) == 0);
+ ser._format.setOmitXMLDeclaration((features & XMLDECL) == 0);
ser._format.setIndenting((features & FORMAT_PRETTY_PRINT) != 0);
if ((features & WELLFORMED) != 0) {
@@ -1059,7 +1059,7 @@
node = node.getParentNode();
if (root == node){
next = null;
- break;
+ break;
}
next = node.getNextSibling();
}
@@ -1072,21 +1072,21 @@
}
}
}
-
-
+
+
private void verify (Node node, boolean verifyNames, boolean xml11Version){
int type = node.getNodeType();
fLocator.fRelatedNode = node;
boolean wellformed;
- switch (type) {
+ switch (type) {
case Node.DOCUMENT_NODE:{
break;
}
case Node.DOCUMENT_TYPE_NODE:{
break;
}
- case Node.ELEMENT_NODE:{
+ case Node.ELEMENT_NODE:{
if (verifyNames){
if((features & NAMESPACES) != 0){
wellformed = CoreDocumentImpl.isValidQName(node.getPrefix() , node.getLocalName(), xml11Version) ;
@@ -1098,23 +1098,23 @@
if (!wellformed){
if (fErrorHandler != null) {
String msg = DOMMessageFormatter.formatMessage(
- DOMMessageFormatter.DOM_DOMAIN,
- "wf-invalid-character-in-node-name",
+ DOMMessageFormatter.DOM_DOMAIN,
+ "wf-invalid-character-in-node-name",
new Object[]{"Element", node.getNodeName()});
- DOMNormalizer.reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_FATAL_ERROR,
+ DOMNormalizer.reportDOMError(fErrorHandler, fError, fLocator, msg, DOMError.SEVERITY_FATAL_ERROR,
"wf-invalid-character-in-node-name");
}
-
- }
+
+ }
}
}
-
- NamedNodeMap attributes = (node.hasAttributes()) ? node.getAttributes() : null;
+
+ NamedNodeMap attributes = (node.hasAttributes()) ? node.getAttributes() : null;
if (attributes != null) {
for (int i = 0; i < attributes.getLength(); ++i) {
Attr attr = (Attr) attributes.item(i);
fLocator.fRelatedNode = attr;
- DOMNormalizer.isAttrValueWF( fErrorHandler, fError, fLocator,
+ DOMNormalizer.isAttrValueWF( fErrorHandler, fError, fLocator,
attributes, attr, attr.getValue(), xml11Version);
if (verifyNames) {
wellformed = CoreDocumentImpl.isXMLName( attr.getNodeName(), xml11Version);
@@ -1131,10 +1131,10 @@
}
}
-
+
break;
}
-
+
case Node.COMMENT_NODE: {
// only verify well-formness if comments included in the tree
if ((features & COMMENTS) != 0)
@@ -1147,7 +1147,7 @@
CoreDocumentImpl.isXMLName(node.getNodeName() , xml11Version);
}
break;
-
+
}
case Node.CDATA_SECTION_NODE: {
// verify content
@@ -1183,14 +1183,14 @@
DOMError.SEVERITY_FATAL_ERROR,
"wf-invalid-character-in-node-name");
}
- }
+ }
DOMNormalizer.isXMLCharWF(fErrorHandler, fError, fLocator, pinode.getData(), xml11Version);
break;
- }
+ }
}
-
+
}
-
+
private String getPathWithoutEscapes(String origPath) {
if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) {
// Locate the escape characters
@@ -1210,7 +1210,3 @@
}
}//DOMSerializerImpl
-
-
-
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/EncodingInfo.java Wed May 02 13:32:36 2012 +0100
@@ -32,27 +32,27 @@
* @version $Id: EncodingInfo.java,v 1.6 2007/10/18 03:39:08 joehw Exp $
*/
public class EncodingInfo {
-
+
// An array to hold the argument for a method of Charset, CharsetEncoder or CharToByteConverter.
private Object [] fArgsForMethod = null;
-
+
// name of encoding as registered with IANA;
// preferably a MIME name, but aliases are fine too.
String ianaName;
String javaName;
int lastPrintable;
-
+
// The CharsetEncoder with which we test unusual characters.
Object fCharsetEncoder = null;
-
+
// The CharToByteConverter with which we test unusual characters.
Object fCharToByteConverter = null;
-
+
// Is the converter null because it can't be instantiated
- // for some reason (perhaps we're running with insufficient authority as
+ // for some reason (perhaps we're running with insufficient authority as
// an applet?
boolean fHaveTriedCToB = false;
-
+
// Is the charset encoder usable or available.
boolean fHaveTriedCharsetEncoder = false;
@@ -83,15 +83,15 @@
public Writer getWriter(OutputStream output)
throws UnsupportedEncodingException {
// this should always be true!
- if (javaName != null)
+ if (javaName != null)
return new OutputStreamWriter(output, javaName);
javaName = EncodingMap.getIANA2JavaMapping(ianaName);
- if(javaName == null)
+ if(javaName == null)
// use UTF-8 as preferred encoding
return new OutputStreamWriter(output, "UTF8");
return new OutputStreamWriter(output, javaName);
}
-
+
/**
* Checks whether the specified character is printable or not in this encoding.
*
@@ -103,7 +103,7 @@
}
return isPrintable0(ch);
}
-
+
/**
* Checks whether the specified character is printable or not in this encoding.
* This method accomplishes this using a java.nio.CharsetEncoder. If NIO isn't
@@ -112,7 +112,7 @@
* @param ch a code point (0-0x10ffff)
*/
private boolean isPrintable0(char ch) {
-
+
// Attempt to get a CharsetEncoder for this encoding.
if (fCharsetEncoder == null && CharsetMethods.fgNIOCharsetAvailable && !fHaveTriedCharsetEncoder) {
if (fArgsForMethod == null) {
@@ -128,9 +128,9 @@
// This charset cannot be used for encoding, don't try it again...
else {
fHaveTriedCharsetEncoder = true;
- }
- }
- catch (Exception e) {
+ }
+ }
+ catch (Exception e) {
// don't try it again...
fHaveTriedCharsetEncoder = true;
}
@@ -140,14 +140,14 @@
try {
fArgsForMethod[0] = new Character(ch);
return ((Boolean) CharsetMethods.fgCharsetEncoderCanEncodeMethod.invoke(fCharsetEncoder, fArgsForMethod)).booleanValue();
- }
+ }
catch (Exception e) {
// obviously can't use this charset encoder; possibly a JDK bug
fCharsetEncoder = null;
fHaveTriedCharsetEncoder = false;
}
}
-
+
// As a last resort try to use a sun.io.CharToByteConverter to
// determine whether this character is printable. We will always
// reach here on JDK 1.3 or below.
@@ -163,8 +163,8 @@
try {
fArgsForMethod[0] = javaName;
fCharToByteConverter = CharToByteConverterMethods.fgGetConverterMethod.invoke(null, fArgsForMethod);
- }
- catch (Exception e) {
+ }
+ catch (Exception e) {
// don't try it again...
fHaveTriedCToB = true;
return false;
@@ -173,7 +173,7 @@
try {
fArgsForMethod[0] = new Character(ch);
return ((Boolean) CharToByteConverterMethods.fgCanConvertMethod.invoke(fCharToByteConverter, fArgsForMethod)).booleanValue();
- }
+ }
catch (Exception e) {
// obviously can't use this converter; probably some kind of
// security restriction
@@ -189,29 +189,29 @@
final byte [] bTest = {(byte)'v', (byte)'a', (byte)'l', (byte)'i', (byte)'d'};
String s = new String(bTest, name);
}
-
+
/**
* Holder of methods from java.nio.charset.Charset and java.nio.charset.CharsetEncoder.
*/
static class CharsetMethods {
-
+
// Method: java.nio.charset.Charset.forName(java.lang.String)
- private static java.lang.reflect.Method fgCharsetForNameMethod = null;
-
+ private static java.lang.reflect.Method fgCharsetForNameMethod = null;
+
// Method: java.nio.charset.Charset.canEncode()
private static java.lang.reflect.Method fgCharsetCanEncodeMethod = null;
-
+
// Method: java.nio.charset.Charset.newEncoder()
private static java.lang.reflect.Method fgCharsetNewEncoderMethod = null;
-
+
// Method: java.nio.charset.CharsetEncoder.canEncode(char)
private static java.lang.reflect.Method fgCharsetEncoderCanEncodeMethod = null;
-
+
// Flag indicating whether or not java.nio.charset.* is available.
private static boolean fgNIOCharsetAvailable = false;
-
+
private CharsetMethods() {}
-
+
// Attempt to get methods for Charset and CharsetEncoder on class initialization.
static {
try {
@@ -234,23 +234,23 @@
}
}
}
-
+
/**
* Holder of methods from sun.io.CharToByteConverter.
*/
static class CharToByteConverterMethods {
-
+
// Method: sun.io.CharToByteConverter.getConverter(java.lang.String)
- private static java.lang.reflect.Method fgGetConverterMethod = null;
-
+ private static java.lang.reflect.Method fgGetConverterMethod = null;
+
// Method: sun.io.CharToByteConverter.canConvert(char)
private static java.lang.reflect.Method fgCanConvertMethod = null;
-
+
// Flag indicating whether or not sun.io.CharToByteConverter is available.
private static boolean fgConvertersAvailable = false;
-
+
private CharToByteConverterMethods() {}
-
+
// Attempt to get methods for char to byte converter on class initialization.
static {
try {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serialize/SerializerFactory.java Wed May 02 13:32:36 2012 +0100
@@ -21,7 +21,7 @@
package com.sun.org.apache.xml.internal.serialize;
-
+import com.sun.org.apache.xerces.internal.utils.ObjectFactory;
import java.io.OutputStream;
import java.io.Writer;
import java.io.UnsupportedEncodingException;
@@ -31,6 +31,7 @@
/**
*
*
+ * @version $Revision: 1.6 $ $Date: 2010-11-01 04:40:36 $
* @author Scott Boag
* @author Assaf Arkin
*/
@@ -69,8 +70,7 @@
while ( token.hasMoreTokens() ) {
className = token.nextToken();
try {
- factory = (SerializerFactory) ObjectFactory.newInstance( className,
- SerializerFactory.class.getClassLoader(), true);
+ factory = (SerializerFactory) ObjectFactory.newInstance( className, true);
if ( _factories.containsKey( factory.getSupportedMethod() ) )
_factories.put( factory.getSupportedMethod(), factory );
} catch ( Exception except ) { }
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/CharInfo.java Wed May 02 13:32:36 2012 +0100
@@ -40,6 +40,7 @@
import com.sun.org.apache.xml.internal.serializer.utils.SystemIDResolver;
import com.sun.org.apache.xml.internal.serializer.utils.Utils;
import com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
* This class provides services that tell if a character should have
@@ -48,67 +49,75 @@
* lookup.
*
* DEVELOPERS: See Known Issue in the constructor.
- *
+ *
* @xsl.usage internal
*/
final class CharInfo
{
/** Given a character, lookup a String to output (e.g. a decorated entity reference). */
- private HashMap m_charToString = new HashMap();
+ private HashMap m_charToString;
/**
* The name of the HTML entities file.
* If specified, the file will be resource loaded with the default class loader.
*/
- public static final String HTML_ENTITIES_RESOURCE =
+ public static final String HTML_ENTITIES_RESOURCE =
"com.sun.org.apache.xml.internal.serializer.HTMLEntities";
/**
* The name of the XML entities file.
* If specified, the file will be resource loaded with the default class loader.
*/
- public static final String XML_ENTITIES_RESOURCE =
+ public static final String XML_ENTITIES_RESOURCE =
"com.sun.org.apache.xml.internal.serializer.XMLEntities";
/** The horizontal tab character, which the parser should always normalize. */
- public static final char S_HORIZONAL_TAB = 0x09;
+ static final char S_HORIZONAL_TAB = 0x09;
/** The linefeed character, which the parser should always normalize. */
- public static final char S_LINEFEED = 0x0A;
+ static final char S_LINEFEED = 0x0A;
/** The carriage return character, which the parser should always normalize. */
- public static final char S_CARRIAGERETURN = 0x0D;
-
- /** This flag is an optimization for HTML entities. It false if entities
+ static final char S_CARRIAGERETURN = 0x0D;
+ static final char S_SPACE = 0x20;
+ static final char S_QUOTE = 0x22;
+ static final char S_LT = 0x3C;
+ static final char S_GT = 0x3E;
+ static final char S_NEL = 0x85;
+ static final char S_LINE_SEPARATOR = 0x2028;
+
+ /** This flag is an optimization for HTML entities. It false if entities
* other than quot (34), amp (38), lt (60) and gt (62) are defined
* in the range 0 to 127.
* @xsl.usage internal
- */
- final boolean onlyQuotAmpLtGt;
-
- /** Copy the first 0,1 ... ASCII_MAX values into an array */
- private static final int ASCII_MAX = 128;
-
- /** Array of values is faster access than a set of bits
- * to quickly check ASCII characters in attribute values.
*/
- private boolean[] isSpecialAttrASCII = new boolean[ASCII_MAX];
-
- /** Array of values is faster access than a set of bits
- * to quickly check ASCII characters in text nodes.
+ boolean onlyQuotAmpLtGt;
+
+ /** Copy the first 0,1 ... ASCII_MAX values into an array */
+ static final int ASCII_MAX = 128;
+
+ /** Array of values is faster access than a set of bits
+ * to quickly check ASCII characters in attribute values,
+ * the value is true if the character in an attribute value
+ * should be mapped to a String.
*/
- private boolean[] isSpecialTextASCII = new boolean[ASCII_MAX];
+ private final boolean[] shouldMapAttrChar_ASCII;
- private boolean[] isCleanTextASCII = new boolean[ASCII_MAX];
+ /** Array of values is faster access than a set of bits
+ * to quickly check ASCII characters in text nodes,
+ * the value is true if the character in a text node
+ * should be mapped to a String.
+ */
+ private final boolean[] shouldMapTextChar_ASCII;
/** An array of bits to record if the character is in the set.
* Although information in this array is complete, the
* isSpecialAttrASCII array is used first because access to its values
* is common and faster.
- */
- private int array_of_bits[] = createEmptySetOfIntegers(65535);
-
-
+ */
+ private final int array_of_bits[];
+
+
// 5 for 32 bit words, 6 for 64 bit words ...
/*
* This constant is used to shift an integer to quickly
@@ -116,18 +125,18 @@
* 5 for 32 bit words (int) , 6 for 64 bit words (long)
*/
private static final int SHIFT_PER_WORD = 5;
-
+
/*
* A mask to get the low order bits which are used to
* calculate the value of the bit within a given word,
- * that will represent the presence of the integer in the
+ * that will represent the presence of the integer in the
* set.
- *
+ *
* 0x1F for 32 bit words (int),
- * or 0x3F for 64 bit words (long)
+ * or 0x3F for 64 bit words (long)
*/
private static final int LOW_ORDER_BITMASK = 0x1f;
-
+
/*
* This is used for optimizing the lookup of bits representing
* the integers in the set. It is the index of the first element
@@ -137,33 +146,38 @@
/**
- * Constructor that reads in a resource file that describes the mapping of
- * characters to entity references.
- * This constructor is private, just to force the use
- * of the getCharInfo(entitiesResource) factory
- *
- * Resource files must be encoded in UTF-8 and can either be properties
- * files with a .properties extension assumed. Alternatively, they can
- * have the following form, with no particular extension assumed:
+ * A base constructor just to explicitly create the fields,
+ * with the exception of m_charToString which is handled
+ * by the constructor that delegates base construction to this one.
+ *
+ * m_charToString is not created here only for performance reasons,
+ * to avoid creating a Hashtable that will be replaced when
+ * making a mutable copy, {@link #mutableCopyOf(CharInfo)}.
*
- *
- * # First char # is a comment
- * Entity numericValue
- * quot 34
- * amp 38
- *
- *
- * @param entitiesResource Name of properties or resource file that should
- * be loaded, which describes that mapping of characters to entity
- * references.
*/
- private CharInfo(String entitiesResource, String method)
+ private CharInfo()
{
- this(entitiesResource, method, false);
+ this.array_of_bits = createEmptySetOfIntegers(65535);
+ this.firstWordNotUsed = 0;
+ this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX];
+ this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX];
+ this.m_charKey = new CharKey();
+
+ // Not set here, but in a constructor that uses this one
+ // this.m_charToString = new Hashtable();
+
+ this.onlyQuotAmpLtGt = true;
+
+
+ return;
}
private CharInfo(String entitiesResource, String method, boolean internal)
{
+ // call the default constructor to create the fields
+ this();
+ m_charToString = new HashMap();
+
ResourceBundle entities = null;
boolean noExtraEntities = true;
@@ -175,7 +189,7 @@
// file
// 3) try treating the resource a URI
- if (internal) {
+ if (internal) {
try {
// Load entity property files by using PropertyResourceBundle,
// cause of security issure for applets
@@ -189,12 +203,10 @@
String name = (String) keys.nextElement();
String value = entities.getString(name);
int code = Integer.parseInt(value);
- defineEntity(name, (char) code);
- if (extraEntity(code))
+ boolean extra = defineEntity(name, (char) code);
+ if (extra)
noExtraEntities = false;
}
- set(S_LINEFEED);
- set(S_CARRIAGERETURN);
} else {
InputStream is = null;
@@ -227,7 +239,7 @@
}
// Fix Bugzilla#4000: force reading in UTF-8
- // This creates the de facto standard that Xalan's resource
+ // This creates the de facto standard that Xalan's resource
// files must be encoded in UTF-8. This should work in all
// JVMs.
//
@@ -278,8 +290,8 @@
int code = Integer.parseInt(value);
- defineEntity(name, (char) code);
- if (extraEntity(code))
+ boolean extra = defineEntity(name, (char) code);
+ if (extra)
noExtraEntities = false;
}
}
@@ -288,8 +300,6 @@
}
is.close();
- set(S_LINEFEED);
- set(S_CARRIAGERETURN);
} catch (Exception e) {
throw new RuntimeException(
Utils.messages.createMessage(
@@ -306,45 +316,33 @@
}
}
}
-
- /* initialize the array isCleanTextASCII[] with a cache of values
- * for use by ToStream.character(char[], int , int)
- * and the array isSpecialTextASCII[] with the opposite values
- * (all in the name of performance!)
- */
- for (int ch = 0; ch Unlike internal entities, character references are a string to single
* character mapping. They are used to map non-ASCII characters both on
- * parsing and printing, primarily for HTML documents. '<amp;' is an
+ * parsing and printing, primarily for HTML documents. '<' is an
* example of a character reference.
*
* @param name The entity's name
* @param value The entity's value
+ * @return true if the mapping is not one of:
+ *
+ * - '<' to "<"
+ *
- '>' to ">"
+ *
- '&' to "&"
+ *
- '"' to """
+ *
*/
- private void defineEntity(String name, char value)
+ private boolean defineEntity(String name, char value)
{
StringBuilder sb = new StringBuilder("&");
sb.append(name);
sb.append(';');
String entityString = sb.toString();
-
- defineChar2StringMapping(entityString, value);
+
+ boolean extra = defineChar2StringMapping(entityString, value);
+ return extra;
}
/**
+ * A utility object, just used to map characters to output Strings,
+ * needed because a HashMap needs to map an object as a key, not a
+ * Java primitive type, like a char, so this object gets around that
+ * and it is reusable.
+ */
+ private final CharKey m_charKey;
+
+ /**
* Map a character to a String. For example given
* the character '>' this method would return the fully decorated
* entity name "<".
@@ -392,89 +406,68 @@
*/
String getOutputStringForChar(char value)
{
- CharKey charKey = new CharKey();
+ CharKey charKey = new CharKey();
charKey.setChar(value);
return (String) m_charToString.get(charKey);
}
-
+
/**
* Tell if the character argument that is from
- * an attribute value should have special treatment.
- *
+ * an attribute value has a mapping to a String.
+ *
* @param value the value of a character that is in an attribute value
- * @return true if the character should have any special treatment,
- * such as when writing out attribute values,
- * or entity references.
+ * @return true if the character should have any special treatment,
+ * such as when writing out attribute values,
+ * such as when writing out entity references.
* @xsl.usage internal
*/
- final boolean isSpecialAttrChar(int value)
+ final boolean shouldMapAttrChar(int value)
{
// for performance try the values in the boolean array first,
// this is faster access than the BitSet for common ASCII values
if (value < ASCII_MAX)
- return isSpecialAttrASCII[value];
-
- // rather than java.util.BitSet, our private
- // implementation is faster (and less general).
- return get(value);
- }
-
- /**
- * Tell if the character argument that is from a
- * text node should have special treatment.
- *
- * @param value the value of a character that is in a text node
- * @return true if the character should have any special treatment,
- * such as when writing out attribute values,
- * or entity references.
- * @xsl.usage internal
- */
- final boolean isSpecialTextChar(int value)
- {
- // for performance try the values in the boolean array first,
- // this is faster access than the BitSet for common ASCII values
-
- if (value < ASCII_MAX)
- return isSpecialTextASCII[value];
+ return shouldMapAttrChar_ASCII[value];
// rather than java.util.BitSet, our private
// implementation is faster (and less general).
return get(value);
}
-
+
/**
- * This method is used to determine if an ASCII character in
- * a text node (not an attribute value) is "clean".
- * @param value the character to check (0 to 127).
- * @return true if the character can go to the writer as-is
+ * Tell if the character argument that is from a
+ * text node has a mapping to a String, for example
+ * to map '<' to "<".
+ *
+ * @param value the value of a character that is in a text node
+ * @return true if the character has a mapping to a String,
+ * such as when writing out entity references.
* @xsl.usage internal
*/
- final boolean isTextASCIIClean(int value)
+ final boolean shouldMapTextChar(int value)
{
- return isCleanTextASCII[value];
+ // for performance try the values in the boolean array first,
+ // this is faster access than the BitSet for common ASCII values
+
+ if (value < ASCII_MAX)
+ return shouldMapTextChar_ASCII[value];
+
+ // rather than java.util.BitSet, our private
+ // implementation is faster (and less general).
+ return get(value);
}
-
-// In the future one might want to use the array directly and avoid
-// the method call, but I think the JIT alreay inlines this well enough
-// so don't do it (for now) - bjm
-// public final boolean[] getASCIIClean()
-// {
-// return isCleanTextASCII;
-// }
-
private static CharInfo getCharInfoBasedOnPrivilege(
- final String entitiesFileName, final String method,
+ final String entitiesFileName, final String method,
final boolean internal){
return (CharInfo) AccessController.doPrivileged(
new PrivilegedAction() {
public Object run() {
- return new CharInfo(entitiesFileName,
+ return new CharInfo(entitiesFileName,
method, internal);}
- });
+ });
}
-
+
/**
* Factory that reads in a resource file that describes the mapping of
* characters to entity references.
@@ -491,27 +484,29 @@
* @param entitiesResource Name of entities resource file that should
* be loaded, which describes that mapping of characters to entity references.
* @param method the output method type, which should be one of "xml", "html", "text"...
- *
+ *
* @xsl.usage internal
*/
static CharInfo getCharInfo(String entitiesFileName, String method)
{
CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName);
if (charInfo != null) {
- return charInfo;
+ return mutableCopyOf(charInfo);
}
// try to load it internally - cache
try {
- charInfo = getCharInfoBasedOnPrivilege(entitiesFileName,
+ charInfo = getCharInfoBasedOnPrivilege(entitiesFileName,
method, true);
+ // Put the common copy of charInfo in the cache, but return
+ // a copy of it.
m_getCharInfoCache.put(entitiesFileName, charInfo);
- return charInfo;
+ return mutableCopyOf(charInfo);
} catch (Exception e) {}
// try to load it externally - do not cache
try {
- return getCharInfoBasedOnPrivilege(entitiesFileName,
+ return getCharInfoBasedOnPrivilege(entitiesFileName,
method, false);
} catch (Exception e) {}
@@ -529,18 +524,52 @@
}
}
- return getCharInfoBasedOnPrivilege(entitiesFileName,
+ return getCharInfoBasedOnPrivilege(entitiesFileName,
method, false);
}
- /** Table of user-specified char infos. */
+ /**
+ * Create a mutable copy of the cached one.
+ * @param charInfo The cached one.
+ * @return
+ */
+ private static CharInfo mutableCopyOf(CharInfo charInfo) {
+ CharInfo copy = new CharInfo();
+
+ int max = charInfo.array_of_bits.length;
+ System.arraycopy(charInfo.array_of_bits,0,copy.array_of_bits,0,max);
+
+ copy.firstWordNotUsed = charInfo.firstWordNotUsed;
+
+ max = charInfo.shouldMapAttrChar_ASCII.length;
+ System.arraycopy(charInfo.shouldMapAttrChar_ASCII,0,copy.shouldMapAttrChar_ASCII,0,max);
+
+ max = charInfo.shouldMapTextChar_ASCII.length;
+ System.arraycopy(charInfo.shouldMapTextChar_ASCII,0,copy.shouldMapTextChar_ASCII,0,max);
+
+ // utility field copy.m_charKey is already created in the default constructor
+
+ copy.m_charToString = (HashMap) charInfo.m_charToString.clone();
+
+ copy.onlyQuotAmpLtGt = charInfo.onlyQuotAmpLtGt;
+
+ return copy;
+ }
+
+ /**
+ * Table of user-specified char infos.
+ * The table maps entify file names (the name of the
+ * property file without the .properties extension)
+ * to CharInfo objects populated with entities defined in
+ * corresponding property file.
+ */
private static HashMap m_getCharInfoCache = new HashMap();
/**
* Returns the array element holding the bit value for the
* given integer
* @param i the integer that might be in the set of integers
- *
+ *
*/
private static int arrayIndex(int i) {
return (i >> SHIFT_PER_WORD);
@@ -561,39 +590,40 @@
* @param max the maximum integer to be in the set.
*/
private int[] createEmptySetOfIntegers(int max) {
- firstWordNotUsed = 0; // an optimization
+ firstWordNotUsed = 0; // an optimization
int[] arr = new int[arrayIndex(max - 1) + 1];
return arr;
-
+
}
/**
* Adds the integer (character) to the set of integers.
- * @param i the integer to add to the set, valid values are
+ * @param i the integer to add to the set, valid values are
* 0, 1, 2 ... up to the maximum that was specified at
* the creation of the set.
*/
- private final void set(int i) {
- setASCIIdirty(i);
-
+ private final void set(int i) {
+ setASCIItextDirty(i);
+ setASCIIattrDirty(i);
+
int j = (i >> SHIFT_PER_WORD); // this word is used
- int k = j + 1;
-
+ int k = j + 1;
+
if(firstWordNotUsed < k) // for optimization purposes.
firstWordNotUsed = k;
-
+
array_of_bits[j] |= (1 << (i & LOW_ORDER_BITMASK));
}
/**
* Return true if the integer (character)is in the set of integers.
- *
+ *
* This implementation uses an array of integers with 32 bits per
- * integer. If a bit is set to 1 the corresponding integer is
+ * integer. If a bit is set to 1 the corresponding integer is
* in the set of integers.
- *
+ *
* @param i an integer that is tested to see if it is the
* set of integers, or not.
*/
@@ -604,82 +634,113 @@
// an optimization here, ... a quick test to see
// if this integer is beyond any of the words in use
if(j < firstWordNotUsed)
- in_the_set = (array_of_bits[j] &
+ in_the_set = (array_of_bits[j] &
(1 << (i & LOW_ORDER_BITMASK))
) != 0; // 0L for 64 bit words
return in_the_set;
}
-
- // record if there are any entities other than
- // quot, amp, lt, gt (probably user defined)
+
/**
- * @return true if the entity
- * @param code The value of the character that has an entity defined
- * for it.
+ * This method returns true if there are some non-standard mappings to
+ * entities other than quot, amp, lt, gt, and its only purpose is for
+ * performance.
+ * @param charToMap The value of the character that is mapped to a String
+ * @param outputString The String to which the character is mapped, usually
+ * an entity reference such as "<".
+ * @return true if the mapping is not one of:
+ *
+ * - '<' to "<"
+ *
- '>' to ">"
+ *
- '&' to "&"
+ *
- '"' to """
+ *
*/
- private boolean extraEntity(int entityValue)
+ private boolean extraEntity(String outputString, int charToMap)
{
boolean extra = false;
- if (entityValue < 128)
+ if (charToMap < ASCII_MAX)
{
- switch (entityValue)
+ switch (charToMap)
{
- case 34 : // quot
- case 38 : // amp
- case 60 : // lt
- case 62 : // gt
+ case '"' : // quot
+ if (!outputString.equals("""))
+ extra = true;
break;
- default : // other entity in range 0 to 127
+ case '&' : // amp
+ if (!outputString.equals("&"))
+ extra = true;
+ break;
+ case '<' : // lt
+ if (!outputString.equals("<"))
+ extra = true;
+ break;
+ case '>' : // gt
+ if (!outputString.equals(">"))
+ extra = true;
+ break;
+ default : // other entity in range 0 to 127
extra = true;
}
}
return extra;
- }
-
+ }
+
/**
- * If the character is a printable ASCII character then
- * mark it as not clean and needing replacement with
- * a String on output.
+ * If the character is in the ASCII range then
+ * mark it as needing replacement with
+ * a String on output if it occurs in a text node.
* @param ch
*/
- private void setASCIIdirty(int j)
+ private void setASCIItextDirty(int j)
{
- if (0 <= j && j < ASCII_MAX)
+ if (0 <= j && j < ASCII_MAX)
{
- isCleanTextASCII[j] = false;
- isSpecialTextASCII[j] = true;
- }
+ shouldMapTextChar_ASCII[j] = true;
+ }
}
/**
- * If the character is a printable ASCII character then
- * mark it as and not needing replacement with
- * a String on output.
+ * If the character is in the ASCII range then
+ * mark it as needing replacement with
+ * a String on output if it occurs in a attribute value.
* @param ch
- */
- private void setASCIIclean(int j)
+ */
+ private void setASCIIattrDirty(int j)
{
- if (0 <= j && j < ASCII_MAX)
- {
- isCleanTextASCII[j] = true;
- isSpecialTextASCII[j] = false;
+ if (0 <= j && j < ASCII_MAX)
+ {
+ shouldMapAttrChar_ASCII[j] = true;
}
}
-
- private void defineChar2StringMapping(String outputString, char inputChar)
+
+ /**
+ * Call this method to register a char to String mapping, for example
+ * to map '<' to "<".
+ * @param outputString The String to map to.
+ * @param inputChar The char to map from.
+ * @return true if the mapping is not one of:
+ *
+ * - '<' to "<"
+ *
- '>' to ">"
+ *
- '&' to "&"
+ *
- '"' to """
+ *
+ */
+ boolean defineChar2StringMapping(String outputString, char inputChar)
{
CharKey character = new CharKey(inputChar);
m_charToString.put(character, outputString);
- set(inputChar);
+ set(inputChar); // mark the character has having a mapping to a String
+
+ boolean extraMapping = extraEntity(outputString, inputChar);
+ return extraMapping;
+
}
/**
* Simple class for fast lookup of char values, when used with
* hashtables. You can set the char, then use it as a key.
- *
- * This class is a copy of the one in com.sun.org.apache.xml.internal.utils.
- * It exists to cut the serializers dependancy on that package.
- *
+ *
* @xsl.usage internal
*/
private static class CharKey extends Object
@@ -697,7 +758,7 @@
{
m_char = key;
}
-
+
/**
* Default constructor for a CharKey.
*
@@ -706,9 +767,9 @@
public CharKey()
{
}
-
+
/**
- * Get the hash value of the character.
+ * Get the hash value of the character.
*
* @return hash value of the character.
*/
@@ -720,7 +781,7 @@
/**
- * Get the hash value of the character.
+ * Get the hash value of the character.
*
* @return hash value of the character.
*/
@@ -730,17 +791,17 @@
}
/**
- * Override of equals() for this object
+ * Override of equals() for this object
*
* @param obj to compare to
*
- * @return True if this object equals this string value
+ * @return True if this object equals this string value
*/
public final boolean equals(Object obj)
{
return ((CharKey)obj).m_char == m_char;
}
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/EncodingInfo.java Wed May 02 13:32:36 2012 +0100
@@ -46,17 +46,17 @@
* explicitly (m_explFirst
to m_explLast
).
* If the unicode point is before that explicit range, that is it
* is in the range m_first <= value < m_explFirst
, then it will delegate to another EncodingInfo object for The root
- * of such a tree, m_before. Likewise for values in the range
+ * of such a tree, m_before. Likewise for values in the range
* m_explLast < value <= m_last
, but delgating to m_after
*
* Actually figuring out if a code point is in the encoding is expensive. So the
* purpose of this tree is to cache such determinations, and not to build the
- * entire tree of information at the start, but only build up as much of the
+ * entire tree of information at the start, but only build up as much of the
* tree as is used during the transformation.
*
* This Class is not a public API, and should only be used internally within
* the serializer.
- *
+ *
* @xsl.usage internal
*/
public final class EncodingInfo extends Object
@@ -79,7 +79,7 @@
* is in this encoding.
*/
private InEncoding m_encoding;
-
+
/**
* This is not a public API. It returns true if the
* char in question is in the encoding.
@@ -89,15 +89,15 @@
public boolean isInEncoding(char ch) {
if (m_encoding == null) {
m_encoding = new EncodingImpl();
-
+
// One could put alternate logic in here to
// instantiate another object that implements the
// InEncoding interface. For example if the JRE is 1.4 or up
// we could have an object that uses JRE 1.4 methods
}
- return m_encoding.isInEncoding(ch);
+ return m_encoding.isInEncoding(ch);
}
-
+
/**
* This is not a public API. It returns true if the
* character formed by the high/low pair is in the encoding.
@@ -108,13 +108,13 @@
public boolean isInEncoding(char high, char low) {
if (m_encoding == null) {
m_encoding = new EncodingImpl();
-
+
// One could put alternate logic in here to
// instantiate another object that implements the
// InEncoding interface. For example if the JRE is 1.4 or up
// we could have an object that uses JRE 1.4 methods
}
- return m_encoding.isInEncoding(high, low);
+ return m_encoding.isInEncoding(high, low);
}
/**
@@ -132,16 +132,16 @@
this.name = name;
this.javaName = javaName;
}
-
-
-
+
+
+
/**
* A simple interface to isolate the implementation.
* We could also use some new JRE 1.4 methods in another implementation
* provided we use reflection with them.
*
* This interface is not a public API,
- * and should only be used internally within the serializer.
+ * and should only be used internally within the serializer.
* @xsl.usage internal
*/
private interface InEncoding {
@@ -157,10 +157,10 @@
}
/**
- * This class implements the
+ * This class implements the
*/
private class EncodingImpl implements InEncoding {
-
+
public boolean isInEncoding(char ch1) {
@@ -169,7 +169,7 @@
if (codePoint < m_explFirst) {
// The unicode value is before the range
// that we explictly manage, so we delegate the answer.
-
+
// If we don't have an m_before object to delegate to, make one.
if (m_before == null)
m_before =
@@ -182,7 +182,7 @@
} else if (m_explLast < codePoint) {
// The unicode value is after the range
// that we explictly manage, so we delegate the answer.
-
+
// If we don't have an m_after object to delegate to, make one.
if (m_after == null)
m_after =
@@ -195,13 +195,13 @@
} else {
// The unicode value is in the range we explitly handle
final int idx = codePoint - m_explFirst;
-
+
// If we already know the answer, just return it.
if (m_alreadyKnown[idx])
ret = m_isInEncoding[idx];
else {
// We don't know the answer, so find out,
- // which may be expensive, then cache the answer
+ // which may be expensive, then cache the answer
ret = inEncoding(ch1, m_encoding);
m_alreadyKnown[idx] = true;
m_isInEncoding[idx] = ret;
@@ -216,7 +216,7 @@
if (codePoint < m_explFirst) {
// The unicode value is before the range
// that we explictly manage, so we delegate the answer.
-
+
// If we don't have an m_before object to delegate to, make one.
if (m_before == null)
m_before =
@@ -229,7 +229,7 @@
} else if (m_explLast < codePoint) {
// The unicode value is after the range
// that we explictly manage, so we delegate the answer.
-
+
// If we don't have an m_after object to delegate to, make one.
if (m_after == null)
m_after =
@@ -242,13 +242,13 @@
} else {
// The unicode value is in the range we explitly handle
final int idx = codePoint - m_explFirst;
-
+
// If we already know the answer, just return it.
if (m_alreadyKnown[idx])
ret = m_isInEncoding[idx];
else {
// We don't know the answer, so find out,
- // which may be expensive, then cache the answer
+ // which may be expensive, then cache the answer
ret = inEncoding(high, low, m_encoding);
m_alreadyKnown[idx] = true;
m_isInEncoding[idx] = ret;
@@ -268,7 +268,7 @@
* range
*/
final private int m_first;
-
+
/**
* m_explFirst through m_explLast is the range of unicode
* value that this object handles explicitly and does not
@@ -292,10 +292,10 @@
* to which this object may delegate.
*/
private InEncoding m_after;
-
+
/**
* The number of unicode values explicitly handled
- * by a single EncodingInfo object. This value is
+ * by a single EncodingInfo object. This value is
* tuneable, but is set to 128 because that covers the
* entire low range of ASCII type chars within a single
* object.
@@ -312,7 +312,7 @@
* value is in the encoding.
*/
final private boolean m_isInEncoding[] = new boolean[RANGE];
-
+
private EncodingImpl() {
// This object will answer whether any unicode value
// is in the encoding, it handles values 0 through Integer.MAX_VALUE
@@ -323,17 +323,17 @@
// Set the range of unicode values that this object manages
// either explicitly or implicitly.
m_first = first;
- m_last = last;
-
- // Set the range of unicode values that this object
+ m_last = last;
+
+ // Set the range of unicode values that this object
// explicitly manages. Align the explicitly managed values
- // to RANGE so multiple EncodingImpl objects dont manage the same
+ // to RANGE so multiple EncodingImpl objects dont manage the same
// values.
m_explFirst = codePoint / RANGE * RANGE;
m_explLast = m_explFirst + (RANGE-1);
-
+
m_encoding = encoding;
-
+
if (javaName != null)
{
// Some optimization.
@@ -347,7 +347,7 @@
|| "Unicode".equals(javaName)
|| "UNICODE".equals(javaName)
|| javaName.startsWith("ISO8859")) {
-
+
// Not only does this EncodingImpl object explicitly
// handle chracters in the low range, it is
// also one that we know something about, without
@@ -370,7 +370,7 @@
}
/* A little bit more than optimization.
- *
+ *
* We will say that any character is in the encoding if
* we don't have an encoding.
* This is meaningful when the serializer is being used
@@ -399,38 +399,38 @@
* @param ch the char in question, that is not a high char of
* a high/low surrogate pair.
* @param encoding the Java name of the enocding.
- *
+ *
* @xsl.usage internal
- *
+ *
*/
private static boolean inEncoding(char ch, String encoding) {
boolean isInEncoding;
try {
char cArray[] = new char[1];
cArray[0] = ch;
- // Construct a String from the char
+ // Construct a String from the char
String s = new String(cArray);
- // Encode the String into a sequence of bytes
- // using the given, named charset.
+ // Encode the String into a sequence of bytes
+ // using the given, named charset.
byte[] bArray = s.getBytes(encoding);
isInEncoding = inEncoding(ch, bArray);
} catch (Exception e) {
isInEncoding = false;
-
+
// If for some reason the encoding is null, e.g.
// for a temporary result tree, we should just
// say that every character is in the encoding.
if (encoding == null)
- isInEncoding = true;
+ isInEncoding = true;
}
return isInEncoding;
}
-
+
/**
* This is heart of the code that determines if a given high/low
* surrogate pair forms a character that is in the given encoding.
- * This method is probably expensive, and the answer should be cached.
+ * This method is probably expensive, and the answer should be cached.
*
* This method is not a public API,
* and should only be used internally within the serializer.
@@ -438,29 +438,29 @@
* a high/low surrogate pair.
* @param low the low char of a high/low surrogate pair.
* @param encoding the Java name of the encoding.
- *
+ *
* @xsl.usage internal
- *
- */
+ *
+ */
private static boolean inEncoding(char high, char low, String encoding) {
boolean isInEncoding;
try {
char cArray[] = new char[2];
cArray[0] = high;
cArray[1] = low;
- // Construct a String from the char
+ // Construct a String from the char
String s = new String(cArray);
- // Encode the String into a sequence of bytes
- // using the given, named charset.
+ // Encode the String into a sequence of bytes
+ // using the given, named charset.
byte[] bArray = s.getBytes(encoding);
isInEncoding = inEncoding(high,bArray);
} catch (Exception e) {
isInEncoding = false;
}
-
+
return isInEncoding;
- }
-
+ }
+
/**
* This method is the core of determining if character
* is in the encoding. The method is not foolproof, because
@@ -477,7 +477,7 @@
// If the string written out as data is not in the encoding,
// the output is not specified according to the documentation
// on the String.getBytes(encoding) method,
- // but we do our best here.
+ // but we do our best here.
if (data==null || data.length == 0) {
isInEncoding = false;
}
@@ -488,11 +488,11 @@
isInEncoding = false;
/*
* else if (isJapanese) {
- * // isJapanese is really
- * // ( "EUC-JP".equals(javaName)
+ * // isJapanese is really
+ * // ( "EUC-JP".equals(javaName)
* // || "EUC_JP".equals(javaName)
* // || "SJIS".equals(javaName) )
- *
+ *
* // Work around some bugs in JRE for Japanese
* if(data[0] == 0x21)
* isInEncoding = false;
@@ -501,11 +501,11 @@
* else
* isInEncoding = true;
* }
- */
-
+ */
+
else {
// We don't know for sure, but it looks like it is in the encoding
- isInEncoding = true;
+ isInEncoding = true;
}
}
return isInEncoding;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/Encodings.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/Encodings.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/Encodings.java Wed May 02 13:32:36 2012 +0100
@@ -34,6 +34,7 @@
import java.util.Properties;
import java.util.StringTokenizer;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
/**
* Provides information about encodings. Depends on the Java runtime
@@ -41,7 +42,7 @@
* to override encoding names and provide the last printable character
* for each encoding.
*
- * @version $Revision: 1.9 $ $Date: 2009/12/01 22:17:31 $
+ * @version $Revision: 1.11 $ $Date: 2010-11-01 04:34:44 $
* @author Assaf Arkin
*/
@@ -63,7 +64,7 @@
*/
private static final String ENCODINGS_PROP = "com.sun.org.apache.xalan.internal.serialize.encodings";
-
+
/**
* Returns a writer for the specified encoding based on
* an output stream.
@@ -109,7 +110,7 @@
throw new UnsupportedEncodingException(encoding);
}
}
-
+
/**
* Returns the last printable character for an unspecified
@@ -121,9 +122,9 @@
{
return m_defaultLastPrintable;
}
-
-
-
+
+
+
/**
* Returns the EncodingInfo object for the specified
* encoding.
@@ -131,7 +132,7 @@
* This is not a public API.
*
* @param encoding The encoding
- * @return The object that is used to determine if
+ * @return The object that is used to determine if
* characters are in the given encoding.
* @xsl.usage internal
*/
@@ -150,7 +151,7 @@
return ei;
}
-
+
/**
* A fast and cheap way to uppercase a String that is
* only made of printable ASCII characters.
@@ -163,29 +164,29 @@
*/
static private String toUpperCaseFast(final String s) {
- boolean different = false;
- final int mx = s.length();
- char[] chars = new char[mx];
- for (int i=0; i < mx; i++) {
- char ch = s.charAt(i);
+ boolean different = false;
+ final int mx = s.length();
+ char[] chars = new char[mx];
+ for (int i=0; i < mx; i++) {
+ char ch = s.charAt(i);
// is the character a lower case ASCII one?
- if ('a' <= ch && ch <= 'z') {
+ if ('a' <= ch && ch <= 'z') {
// a cheap and fast way to uppercase that is good enough
- ch = (char) (ch + ('A' - 'a'));
- different = true; // the uppercased String is different
- }
- chars[i] = ch;
- }
-
- // A little optimization, don't call String.valueOf() if
- // the uppercased string is the same as the input string.
- final String upper;
- if (different)
- upper = String.valueOf(chars);
- else
- upper = s;
-
- return upper;
+ ch = (char) (ch + ('A' - 'a'));
+ different = true; // the uppercased String is different
+ }
+ chars[i] = ch;
+ }
+
+ // A little optimization, don't call String.valueOf() if
+ // the uppercased string is the same as the input string.
+ final String upper;
+ if (different)
+ upper = String.valueOf(chars);
+ else
+ upper = s;
+
+ return upper;
}
/** The default encoding, ISO style, ISO style. */
@@ -324,9 +325,7 @@
}
if (is == null) {
- SecuritySupport ss = SecuritySupport.getInstance();
- is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
- ENCODINGS_FILE);
+ is = SecuritySupport.getResourceAsStream(ENCODINGS_FILE);
}
Properties props = new Properties();
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/NamespaceMappings.java Wed May 02 13:32:36 2012 +0100
@@ -33,7 +33,7 @@
* This class keeps track of the currently defined namespaces. Conceptually the
* prefix/uri/depth triplets are pushed on a stack pushed on a stack. The depth
* indicates the nesting depth of the element for which the mapping was made.
- *
+ *
*
For example:
*
*
@@ -45,7 +45,7 @@
*
*
*
- *
+ *
* When the element is encounted the prefix "p1" associated with uri
* "def" is pushed on the stack with depth 1.
* When the first is encountered "p2" and "ghi" are pushed with
@@ -54,14 +54,14 @@
* When occurs the popNamespaces(3) will pop "p3"/"jkl" off the
* stack. Of course popNamespaces(2) would pop anything with depth 2 or
* greater.
- *
+ *
* So prefix/uri pairs are pushed and poped off the stack as elements are
* processed. At any given moment of processing the currently visible prefixes
* are on the stack and a prefix can be found given a uri, or a uri can be found
* given a prefix.
- *
+ *
* This class is public only because it is used by Xalan. It is not a public API
- *
+ *
* @xsl.usage internal
*/
public class NamespaceMappings
@@ -82,14 +82,14 @@
*/
private HashMap m_namespaces = new HashMap();
- /**
+ /**
* The top of this stack contains the MapRecord
* of the last declared a namespace.
* Used to know how many prefix mappings to pop when leaving
* the current element depth.
- * For every prefix mapping the current element depth is
+ * For every prefix mapping the current element depth is
* pushed on this stack.
- * That way all prefixes pushed at the current depth can be
+ * That way all prefixes pushed at the current depth can be
* removed at the same time.
* Used to ensure prefix/uri map scopes are closed correctly
*
@@ -114,7 +114,7 @@
*/
private void initNamespaces()
{
-
+
// Define the default namespace (initially maps to "" uri)
Stack stack;
@@ -131,27 +131,27 @@
/**
* Use a namespace prefix to lookup a namespace URI.
- *
+ *
* @param prefix String the prefix of the namespace
* @return the URI corresponding to the prefix
*/
public String lookupNamespace(String prefix)
{
final Stack stack = (Stack) m_namespaces.get(prefix);
- return stack != null && !stack.isEmpty() ?
+ return stack != null && !stack.isEmpty() ?
((MappingRecord) stack.peek()).m_uri : null;
}
-
+
MappingRecord getMappingFromPrefix(String prefix) {
final Stack stack = (Stack) m_namespaces.get(prefix);
- return stack != null && !stack.isEmpty() ?
+ return stack != null && !stack.isEmpty() ?
((MappingRecord) stack.peek()) : null;
}
/**
- * Given a namespace uri, and the namespaces mappings for the
+ * Given a namespace uri, and the namespaces mappings for the
* current element, return the current prefix for that uri.
- *
+ *
* @param uri the namespace URI to be search for
* @return an existing prefix that maps to the given URI, null if no prefix
* maps to the given namespace URI.
@@ -171,7 +171,7 @@
}
return foundPrefix;
}
-
+
MappingRecord getMappingFromURI(String uri)
{
MappingRecord foundMap = null;
@@ -263,7 +263,7 @@
*/
map = (MappingRecord) m_nodeStack.pop();
- final String prefix = map.m_prefix;
+ final String prefix = map.m_prefix;
popNamespace(prefix);
if (saxHandler != null)
{
@@ -276,7 +276,7 @@
// not much we can do if they aren't willing to listen
}
}
-
+
}
}
@@ -289,7 +289,7 @@
return "ns" + (count++);
}
-
+
/**
* This method makes a clone of this object.
*
@@ -300,17 +300,17 @@
clone.m_namespaces = (HashMap) m_namespaces.clone();
clone.count = count;
return clone;
-
+
}
-
+
final void reset()
{
this.count = 0;
this.m_namespaces.clear();
- this.m_nodeStack.clear();
+ this.m_nodeStack.clear();
initNamespaces();
}
-
+
class MappingRecord {
final String m_prefix; // the prefix
final String m_uri; // the uri
@@ -320,7 +320,7 @@
m_prefix = prefix;
m_uri = uri;
m_declarationDepth = depth;
-
+
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -38,12 +38,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @xsl.usage internal
@@ -126,7 +126,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -173,7 +173,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -322,13 +322,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -338,7 +338,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -364,7 +364,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -393,7 +393,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -449,7 +449,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -473,11 +473,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -487,11 +487,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -583,7 +583,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -600,7 +600,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -625,7 +625,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 8859254254255146542L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/SerializerFactory.java Wed May 02 13:32:36 2012 +0100
@@ -29,6 +29,7 @@
import com.sun.org.apache.xml.internal.serializer.utils.MsgKey;
import com.sun.org.apache.xml.internal.serializer.utils.Utils;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
import org.xml.sax.ContentHandler;
/**
@@ -126,9 +127,7 @@
- ClassLoader loader = ObjectFactory.findClassLoader();
-
- Class cls = ObjectFactory.findProviderClass(className, loader, true);
+ Class cls = ObjectFactory.findProviderClass(className, true);
// _serializers.put(method, cls);
@@ -156,7 +155,7 @@
* SAX ContentHandler events to the users handler.
*/
className = SerializerConstants.DEFAULT_SAX_SERIALIZER;
- cls = ObjectFactory.findProviderClass(className, loader, true);
+ cls = ObjectFactory.findProviderClass(className, true);
SerializationHandler sh =
(SerializationHandler) cls.newInstance();
sh.setContentHandler( (ContentHandler) obj);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLSAXHandler.java Wed May 02 13:32:36 2012 +0100
@@ -56,7 +56,7 @@
/**
* Keeps track of whether output escaping is currently enabled
*/
- protected boolean m_escapeSetting = false;
+ protected boolean m_escapeSetting = true;
/**
* Returns null.
@@ -742,6 +742,6 @@
*/
private void resetToHTMLSAXHandler()
{
- this.m_escapeSetting = false;
+ this.m_escapeSetting = true;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToHTMLStream.java Wed May 02 13:32:36 2012 +0100
@@ -58,7 +58,7 @@
* Map that tells which XML characters should have special treatment, and it
* provides character to entity name lookup.
*/
- private static final CharInfo m_htmlcharInfo =
+ private final CharInfo m_htmlcharInfo =
// new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE);
CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML);
@@ -1369,7 +1369,7 @@
// System.out.println("ch: "+(int)ch);
// System.out.println("m_maxCharacter: "+(int)m_maxCharacter);
// System.out.println("m_attrCharsMap[ch]: "+(int)m_attrCharsMap[ch]);
- if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
+ if (escapingNotNeeded(ch) && (!m_charInfo.shouldMapAttrChar(ch)))
{
cleanLength++;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToStream.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToStream.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToStream.java Wed May 02 13:32:36 2012 +0100
@@ -919,7 +919,8 @@
{
// This is the old/fast code here, but is this
// correct for all encodings?
- if (ch >= 0x20 || (0x0A == ch || 0x0D == ch || 0x09 == ch))
+ if (ch >= CharInfo.S_SPACE || (CharInfo.S_LINEFEED == ch ||
+ CharInfo.S_CARRIAGERETURN == ch || CharInfo.S_HORIZONAL_TAB == ch))
ret= true;
else
ret = false;
@@ -1028,7 +1029,7 @@
*
* @throws java.io.IOException
*/
- protected int accumDefaultEntity(
+ int accumDefaultEntity(
java.io.Writer writer,
char ch,
int i,
@@ -1047,7 +1048,7 @@
{
// if this is text node character and a special one of those,
// or if this is a character from attribute value and a special one of those
- if ((fromTextNode && m_charInfo.isSpecialTextChar(ch)) || (!fromTextNode && m_charInfo.isSpecialAttrChar(ch)))
+ if ((fromTextNode && m_charInfo.shouldMapTextChar(ch)) || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch)))
{
String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
@@ -1398,7 +1399,6 @@
if (m_cdataTagOpen)
closeCDATA();
- // the check with _escaping is a bit of a hack for XLSTC
if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping))
{
@@ -1421,82 +1421,173 @@
try
{
int i;
- char ch1;
int startClean;
// skip any leading whitspace
// don't go off the end and use a hand inlined version
// of isWhitespace(ch)
final int end = start + length;
- int lastDirty = start - 1; // last character that needed processing
- for (i = start;
- ((i < end)
- && ((ch1 = chars[i]) == 0x20
- || (ch1 == 0xA && m_lineSepUse)
- || ch1 == 0xD
- || ch1 == 0x09));
- i++)
- {
- /*
- * We are processing leading whitespace, but are doing the same
- * processing for dirty characters here as for non-whitespace.
- *
- */
- if (!m_charInfo.isTextASCIIClean(ch1))
- {
- lastDirty = processDirty(chars,end, i,ch1, lastDirty, true);
- i = lastDirty;
+ int lastDirtyCharProcessed = start - 1; // last non-clean character that was processed
+ // that was processed
+ final Writer writer = m_writer;
+ boolean isAllWhitespace = true;
+
+ // process any leading whitspace
+ i = start;
+ while (i < end && isAllWhitespace) {
+ char ch1 = chars[i];
+
+ if (m_charInfo.shouldMapTextChar(ch1)) {
+ // The character is supposed to be replaced by a String
+ // so write out the clean whitespace characters accumulated
+ // so far
+ // then the String.
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ String outputStringForChar = m_charInfo
+ .getOutputStringForChar(ch1);
+ writer.write(outputStringForChar);
+ // We can't say that everything we are writing out is
+ // all whitespace, we just wrote out a String.
+ isAllWhitespace = false;
+ lastDirtyCharProcessed = i; // mark the last non-clean
+ // character processed
+ i++;
+ } else {
+ // The character is clean, but is it a whitespace ?
+ switch (ch1) {
+ // TODO: Any other whitespace to consider?
+ case CharInfo.S_SPACE:
+ // Just accumulate the clean whitespace
+ i++;
+ break;
+ case CharInfo.S_LINEFEED:
+ lastDirtyCharProcessed = processLineFeed(chars, i,
+ lastDirtyCharProcessed, writer);
+ i++;
+ break;
+ case CharInfo.S_CARRIAGERETURN:
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("
");
+ lastDirtyCharProcessed = i;
+ i++;
+ break;
+ case CharInfo.S_HORIZONAL_TAB:
+ // Just accumulate the clean whitespace
+ i++;
+ break;
+ default:
+ // The character was clean, but not a whitespace
+ // so break the loop to continue with this character
+ // (we don't increment index i !!)
+ isAllWhitespace = false;
+ break;
}
}
+ }
/* If there is some non-whitespace, mark that we may need
* to preserve this. This is only important if we have indentation on.
*/
- if (i < end)
+ if (i < end || !isAllWhitespace)
m_ispreserve = true;
-
-// int lengthClean; // number of clean characters in a row
-// final boolean[] isAsciiClean = m_charInfo.getASCIIClean();
-
- final boolean isXML10 = XMLVERSION10.equals(getVersion());
- // we've skipped the leading whitespace, now deal with the rest
for (; i < end; i++)
{
- {
- // A tight loop to skip over common clean chars
- // This tight loop makes it easier for the JIT
- // to optimize.
- char ch2;
- while (i "&"
+ // e.g. '<' --> "<"
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ String outputStringForChar = m_charInfo.getOutputStringForChar(ch);
+ writer.write(outputStringForChar);
+ lastDirtyCharProcessed = i;
}
-
- final char ch = chars[i];
- /* The check for isCharacterInC0orC1Ranger and
- * isNELorLSEPCharacter has been added
- * to support Control Characters in XML 1.1
- */
- if (!isCharacterInC0orC1Range(ch) &&
- (isXML10 || !isNELorLSEPCharacter(ch)) &&
- (escapingNotNeeded(ch) && (!m_charInfo.isSpecialTextChar(ch)))
- || ('"' == ch))
- {
- ; // a character needing no special processing
+ else {
+ if (ch <= 0x1F) {
+ // Range 0x00 through 0x1F inclusive
+ //
+ // This covers the non-whitespace control characters
+ // in the range 0x1 to 0x1F inclusive.
+ // It also covers the whitespace control characters in the same way:
+ // 0x9 TAB
+ // 0xA NEW LINE
+ // 0xD CARRIAGE RETURN
+ //
+ // We also cover 0x0 ... It isn't valid
+ // but we will output ""
+
+ // The default will handle this just fine, but this
+ // is a little performance boost to handle the more
+ // common TAB, NEW-LINE, CARRIAGE-RETURN
+ switch (ch) {
+
+ case CharInfo.S_HORIZONAL_TAB:
+ // Leave whitespace TAB as a real character
+ break;
+ case CharInfo.S_LINEFEED:
+ lastDirtyCharProcessed = processLineFeed(chars, i, lastDirtyCharProcessed, writer);
+ break;
+ case CharInfo.S_CARRIAGERETURN:
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("
");
+ lastDirtyCharProcessed = i;
+ // Leave whitespace carriage return as a real character
+ break;
+ default:
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ lastDirtyCharProcessed = i;
+ break;
+
}
- else
- {
- lastDirty = processDirty(chars,end, i, ch, lastDirty, true);
- i = lastDirty;
+ }
+ else if (ch < 0x7F) {
+ // Range 0x20 through 0x7E inclusive
+ // Normal ASCII chars, do nothing, just add it to
+ // the clean characters
+
+ }
+ else if (ch <= 0x9F){
+ // Range 0x7F through 0x9F inclusive
+ // More control characters, including NEL (0x85)
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ lastDirtyCharProcessed = i;
+ }
+ else if (ch == CharInfo.S_LINE_SEPARATOR) {
+ // LINE SEPARATOR
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("
");
+ lastDirtyCharProcessed = i;
+ }
+ else if (m_encodingInfo.isInEncoding(ch)) {
+ // If the character is in the encoding, and
+ // not in the normal ASCII range, we also
+ // just leave it get added on to the clean characters
+
+ }
+ else {
+ // This is a fallback plan, we should never get here
+ // but if the character wasn't previously handled
+ // (i.e. isn't in the encoding, etc.) then what
+ // should we do? We choose to write out an entity
+ writeOutCleanChars(chars, i, lastDirtyCharProcessed);
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ lastDirtyCharProcessed = i;
+ }
}
}
// we've reached the end. Any clean characters at the
// end of the array than need to be written out?
- startClean = lastDirty + 1;
+ startClean = lastDirtyCharProcessed + 1;
if (i > startClean)
{
int lengthClean = i - startClean;
@@ -1515,6 +1606,32 @@
if (m_tracer != null)
super.fireCharEvent(chars, start, length);
}
+
+ private int processLineFeed(final char[] chars, int i, int lastProcessed, final Writer writer) throws IOException {
+ if (!m_lineSepUse
+ || (m_lineSepLen ==1 && m_lineSep[0] == CharInfo.S_LINEFEED)){
+ // We are leaving the new-line alone, and it is just
+ // being added to the 'clean' characters,
+ // so the last dirty character processed remains unchanged
+ }
+ else {
+ writeOutCleanChars(chars, i, lastProcessed);
+ writer.write(m_lineSep, 0, m_lineSepLen);
+ lastProcessed = i;
+ }
+ return lastProcessed;
+ }
+
+ private void writeOutCleanChars(final char[] chars, int i, int lastProcessed) throws IOException {
+ int startClean;
+ startClean = lastProcessed + 1;
+ if (startClean < i)
+ {
+ int lengthClean = i - startClean;
+ m_writer.write(chars, startClean, lengthClean);
+ }
+ }
+
/**
* This method checks if a given character is between C0 or C1 range
* of Control characters.
@@ -1634,7 +1751,7 @@
*
* @throws org.xml.sax.SAXException
*/
- protected int accumDefaultEscape(
+ private int accumDefaultEscape(
Writer writer,
char ch,
int i,
@@ -1698,16 +1815,15 @@
* to write it out as Numeric Character Reference(NCR) regardless of XML Version
* being used for output document.
*/
- if (isCharacterInC0orC1Range(ch) ||
- (XMLVERSION11.equals(getVersion()) && isNELorLSEPCharacter(ch)))
+ if (isCharacterInC0orC1Range(ch) || isNELorLSEPCharacter(ch))
{
writer.write("");
writer.write(Integer.toString(ch));
writer.write(';');
}
else if ((!escapingNotNeeded(ch) ||
- ( (fromTextNode && m_charInfo.isSpecialTextChar(ch))
- || (!fromTextNode && m_charInfo.isSpecialAttrChar(ch))))
+ ( (fromTextNode && m_charInfo.shouldMapTextChar(ch))
+ || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch))))
&& m_elemContext.m_currentElemDepth > 0)
{
writer.write("");
@@ -1971,28 +2087,86 @@
string.getChars(0,len, m_attrBuff, 0);
final char[] stringChars = m_attrBuff;
- for (int i = 0; i < len; )
+ for (int i = 0; i < len;)
{
char ch = stringChars[i];
- if (escapingNotNeeded(ch) && (!m_charInfo.isSpecialAttrChar(ch)))
- {
- writer.write(ch);
- i++;
- }
- else
- { // I guess the parser doesn't normalize cr/lf in attributes. -sb
-// if ((CharInfo.S_CARRIAGERETURN == ch)
-// && ((i + 1) < len)
-// && (CharInfo.S_LINEFEED == stringChars[i + 1]))
-// {
-// i++;
-// ch = CharInfo.S_LINEFEED;
-// }
-
+
+ if (m_charInfo.shouldMapAttrChar(ch) || !(escapingNotNeeded(ch))) {
+ // The character is supposed to be replaced by a String
+ // e.g. '&' --> "&"
+ // e.g. '<' --> "<"
i = accumDefaultEscape(writer, ch, i, stringChars, len, false, true);
}
+ else {
+ i++;
+ if (0x0 <= ch && ch <= 0x1F) {
+ // Range 0x00 through 0x1F inclusive
+ // This covers the non-whitespace control characters
+ // in the range 0x1 to 0x1F inclusive.
+ // It also covers the whitespace control characters in the same way:
+ // 0x9 TAB
+ // 0xA NEW LINE
+ // 0xD CARRIAGE RETURN
+ //
+ // We also cover 0x0 ... It isn't valid
+ // but we will output ""
+
+ // The default will handle this just fine, but this
+ // is a little performance boost to handle the more
+ // common TAB, NEW-LINE, CARRIAGE-RETURN
+ switch (ch) {
+
+ case CharInfo.S_HORIZONAL_TAB:
+ writer.write(" ");
+ break;
+ case CharInfo.S_LINEFEED:
+ writer.write("
");
+ break;
+ case CharInfo.S_CARRIAGERETURN:
+ writer.write("
");
+ break;
+ default:
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ break;
+
}
-
+ }
+ else if (ch < 0x7F) {
+ // Range 0x20 through 0x7E inclusive
+ // Normal ASCII chars
+ writer.write(ch);
+ }
+ else if (ch <= 0x9F){
+ // Range 0x7F through 0x9F inclusive
+ // More control characters
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ }
+ else if (ch == CharInfo.S_LINE_SEPARATOR) {
+ // LINE SEPARATOR
+ writer.write("
");
+ }
+ else if (m_encodingInfo.isInEncoding(ch)) {
+ // If the character is in the encoding, and
+ // not in the normal ASCII range, we also
+ // just write it out
+ writer.write(ch);
+ }
+ else {
+ // This is a fallback plan, we should never get here
+ // but if the character wasn't previously handled
+ // (i.e. isn't in the encoding, etc.) then what
+ // should we do? We choose to write out a character ref
+ writer.write("");
+ writer.write(Integer.toString(ch));
+ writer.write(';');
+ }
+
+ }
+ }
}
/**
@@ -2219,13 +2393,14 @@
try
{
- if (shouldIndent())
- indent();
-
final int limit = start + length;
boolean wasDash = false;
if (m_cdataTagOpen)
closeCDATA();
+
+ if (shouldIndent())
+ indent();
+
final java.io.Writer writer = m_writer;
writer.write(COMMENT_BEGIN);
// Detect occurrences of two consecutive dashes, handle as necessary.
@@ -2258,6 +2433,15 @@
throw new SAXException(e);
}
+ /*
+ * Don't write out any indentation whitespace now,
+ * because there may be non-whitespace text after this.
+ *
+ * Simply mark that at this point if we do decide
+ * to indent that we should
+ * add a newline on the end of the current line before
+ * the indentation at the start of the next line.
+ */
m_startNewLine = true;
// time to generate comment event
if (m_tracer != null)
@@ -2506,7 +2690,7 @@
*/
protected boolean shouldIndent()
{
- return m_doIndent && (!m_ispreserve && !m_isprevtext);
+ return m_doIndent && (!m_ispreserve && !m_isprevtext) && m_elemContext.m_currentElemDepth > 0;
}
/**
@@ -2749,6 +2933,14 @@
closeCDATA();
m_cdataTagOpen = false;
}
+ if (m_writer != null) {
+ try {
+ m_writer.flush();
+ }
+ catch(IOException e) {
+ // what? me worry?
+ }
+ }
}
public void setContentHandler(ContentHandler ch)
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLSAXHandler.java Wed May 02 13:32:36 2012 +0100
@@ -50,7 +50,7 @@
/**
* Keeps track of whether output escaping is currently enabled
*/
- protected boolean m_escapeSetting = false;
+ protected boolean m_escapeSetting = true;
public ToXMLSAXHandler()
{
@@ -772,7 +772,7 @@
*/
private void resetToXMLSAXHandler()
{
- this.m_escapeSetting = false;
+ this.m_escapeSetting = true;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java Wed May 02 13:32:36 2012 +0100
@@ -56,7 +56,7 @@
* Map that tells which XML characters should have special treatment, and it
* provides character to entity name lookup.
*/
- private static CharInfo m_xmlcharInfo =
+ private CharInfo m_xmlcharInfo =
// new CharInfo(CharInfo.XML_ENTITIES_RESOURCE);
CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML);
@@ -160,8 +160,22 @@
writer.write('\"');
writer.write(standalone);
writer.write("?>");
- if (m_doIndent)
- writer.write(m_lineSep, 0, m_lineSepLen);
+ if (m_doIndent) {
+ if (m_standaloneWasSpecified
+ || getDoctypePublic() != null
+ || getDoctypeSystem() != null) {
+ // We almost never put a newline after the XML
+ // header because this XML could be used as
+ // an extenal general parsed entity
+ // and we don't know the context into which it
+ // will be used in the future. Only when
+ // standalone, or a doctype system or public is
+ // specified are we free to insert a new line
+ // after the header. Is it even worth bothering
+ // in these rare cases?
+ writer.write(m_lineSep, 0, m_lineSepLen);
+ }
+ }
}
catch(IOException e)
{
@@ -312,12 +326,15 @@
writer.write('?');
writer.write('>');
- // Always output a newline char if not inside of an
- // element. The whitespace is not significant in that
- // case.
- if (m_elemContext.m_currentElemDepth <= 0)
- writer.write(m_lineSep, 0, m_lineSepLen);
-
+ /*
+ * Don't write out any indentation whitespace now,
+ * because there may be non-whitespace text after this.
+ *
+ * Simply mark that at this point if we do decide
+ * to indent that we should
+ * add a newline on the end of the current line before
+ * the indentation at the start of the next line.
+ */
m_startNewLine = true;
}
catch(IOException e)
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/WriterToUTF8Buffered.java Wed May 02 13:32:36 2012 +0100
@@ -204,10 +204,10 @@
*/
int split = length/CHARS_MAX;
final int chunks;
- if (split > 1)
+ if (length % CHARS_MAX > 0)
+ chunks = split + 1;
+ else
chunks = split;
- else
- chunks = 2;
int end_chunk = start;
for (int chunk = 1; chunk <= chunks; chunk++)
{
@@ -339,10 +339,10 @@
final int start = 0;
int split = length/CHARS_MAX;
final int chunks;
- if (split > 1)
+ if (length % CHARS_MAX > 0)
+ chunks = split + 1;
+ else
chunks = split;
- else
- chunks = 2;
int end_chunk = 0;
for (int chunk = 1; chunk <= chunks; chunk++)
{
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/utils/URI.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/utils/URI.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/serializer/utils/URI.java Wed May 02 13:32:36 2012 +0100
@@ -502,7 +502,7 @@
// if we get to this point, we need to resolve relative path
// RFC 2396 5.2 #6
- String path = new String();
+ String path = "";
String basePath = p_base.getPath();
// 6a - get all but the last segment of the base URI path
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.8 2008/04/02 00:41:01 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -169,7 +169,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -318,13 +318,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -334,7 +334,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -360,7 +360,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -389,7 +389,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -445,7 +445,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -469,11 +469,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -483,11 +483,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -579,7 +579,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -596,7 +596,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -621,7 +621,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = 2036619216663421552L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectPool.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectPool.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ObjectPool.java Wed May 02 13:32:36 2012 +0100
@@ -22,10 +22,11 @@
*/
package com.sun.org.apache.xml.internal.utils;
-import java.util.Vector;
+import java.util.ArrayList;
import com.sun.org.apache.xml.internal.res.XMLErrorResources;
import com.sun.org.apache.xml.internal.res.XMLMessages;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
/**
@@ -40,9 +41,9 @@
* @serial */
private final Class objectType;
- /** Vector of given objects this points to.
+ /** Stack of given objects this points to.
* @serial */
- private final Vector freeStack;
+ private final ArrayList freeStack;
/**
* Constructor ObjectPool
@@ -52,7 +53,7 @@
public ObjectPool(Class type)
{
objectType = type;
- freeStack = new Vector();
+ freeStack = new ArrayList();
}
/**
@@ -64,14 +65,13 @@
{
try
{
- objectType = ObjectFactory.findProviderClass(
- className, ObjectFactory.findClassLoader(), true);
+ objectType = ObjectFactory.findProviderClass(className, true);
}
catch(ClassNotFoundException cnfe)
{
throw new WrappedRuntimeException(cnfe);
}
- freeStack = new Vector();
+ freeStack = new ArrayList();
}
@@ -85,7 +85,7 @@
public ObjectPool(Class type, int size)
{
objectType = type;
- freeStack = new Vector(size);
+ freeStack = new ArrayList(size);
}
/**
@@ -95,7 +95,7 @@
public ObjectPool()
{
objectType = null;
- freeStack = new Vector();
+ freeStack = new ArrayList();
}
/**
@@ -112,10 +112,7 @@
{
// Remove object from end of free pool.
- Object result = freeStack.lastElement();
-
- freeStack.setSize(freeStack.size() - 1);
-
+ Object result = freeStack.remove(freeStack.size() - 1);
return result;
}
@@ -150,10 +147,7 @@
{
// Remove object from end of free pool.
- Object result = freeStack.lastElement();
-
- freeStack.setSize(freeStack.size() - 1);
-
+ Object result = freeStack.remove(freeStack.size() - 1);
return result;
}
}
@@ -171,7 +165,7 @@
// Remove safety. -sb
// if (objectType.isInstance(obj))
// {
- freeStack.addElement(obj);
+ freeStack.add(obj);
// }
// else
// {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ThreadControllerWrapper.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ThreadControllerWrapper.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/ThreadControllerWrapper.java Wed May 02 13:32:36 2012 +0100
@@ -28,23 +28,23 @@
*/
public class ThreadControllerWrapper
{
-
+
/** The ThreadController pool */
private static ThreadController m_tpool = new ThreadController();
-
+
public static Thread runThread(Runnable runnable, int priority)
{
return m_tpool.run(runnable, priority);
}
-
+
public static void waitThread(Thread worker, Runnable task)
throws InterruptedException
{
m_tpool.waitThread(worker, task);
}
-
+
/**
- * Thread controller utility class for incremental SAX source. Must
+ * Thread controller utility class for incremental SAX source. Must
* be overriden with a derived class to support thread pooling.
*
* All thread-related stuff is in this class.
@@ -57,11 +57,11 @@
*/
final class SafeThread extends Thread {
private volatile boolean ran = false;
-
+
public SafeThread(Runnable target) {
super(target);
}
-
+
public final void run() {
if (Thread.currentThread() != this) {
throw new IllegalStateException("The run() method in a"
@@ -74,8 +74,8 @@
else {
throw new IllegalStateException("The run() method in a"
+ " SafeThread cannot be called more than once.");
- }
- }
+ }
+ }
super.run();
}
}
@@ -122,5 +122,5 @@
worker.join();
}
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/TreeWalker.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/TreeWalker.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/TreeWalker.java Wed May 02 13:32:36 2012 +0100
@@ -153,9 +153,25 @@
*/
public void traverse(Node pos) throws org.xml.sax.SAXException
{
-
this.m_contentHandler.startDocument();
+ traverseFragment(pos);
+
+ this.m_contentHandler.endDocument();
+ }
+
+ /**
+ * Perform a pre-order traversal non-recursive style.
+ *
+ * In contrast to the traverse() method this method will not issue
+ * startDocument() and endDocument() events to the SAX listener.
+ *
+ * @param pos Node in the tree where to start traversal
+ *
+ * @throws TransformerException
+ */
+ public void traverseFragment(Node pos) throws org.xml.sax.SAXException
+ {
Node top = pos;
while (null != pos)
@@ -191,7 +207,6 @@
pos = nextNode;
}
- this.m_contentHandler.endDocument();
}
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/URI.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/URI.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/URI.java Wed May 02 13:32:36 2012 +0100
@@ -522,7 +522,7 @@
// if we get to this point, we need to resolve relative path
// RFC 2396 5.2 #6
- String path = new String();
+ String path = "";
String basePath = p_base.getPath();
// 6a - get all but the last segment of the base URI path
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLReaderManager.java Wed May 02 13:32:36 2012 +0100
@@ -22,6 +22,8 @@
*/
package com.sun.org.apache.xml.internal.utils;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import java.util.HashMap;
import javax.xml.parsers.FactoryConfigurationError;
@@ -60,6 +62,7 @@
*/
private HashMap m_inUse;
+ private boolean m_useServicesMechanism = true;
/**
* Hidden constructor
*/
@@ -69,7 +72,8 @@
/**
* Retrieves the singleton reader manager
*/
- public static XMLReaderManager getInstance() {
+ public static XMLReaderManager getInstance(boolean useServicesMechanism) {
+ m_singletonManager.setServicesMechnism(useServicesMechanism);
return m_singletonManager;
}
@@ -93,11 +97,11 @@
}
// If the cached reader for this thread is in use, construct a new
- // one; otherwise, return the cached reader unless it isn't an
+ // one; otherwise, return the cached reader unless it isn't an
// instance of the class set in the 'org.xml.sax.driver' property
reader = (XMLReader) m_readers.get();
boolean threadHasReader = (reader != null);
- String factory = SecuritySupport.getInstance().getSystemProperty(property);
+ String factory = SecuritySupport.getSystemProperty(property);
if (threadHasReader && m_inUse.get(reader) != Boolean.TRUE &&
( factory == null || reader.getClass().getName().equals(factory))) {
m_inUse.put(reader, Boolean.TRUE);
@@ -115,7 +119,7 @@
// If unable to create an instance, let's try to use
// the XMLReader from JAXP
if (m_parserFactory == null) {
- m_parserFactory = SAXParserFactory.newInstance();
+ m_parserFactory = FactoryImpl.getSAXFactory(m_useServicesMechanism);
m_parserFactory.setNamespaceAware(true);
}
@@ -145,7 +149,7 @@
m_readers.set(reader);
m_inUse.put(reader, Boolean.TRUE);
}
- }
+ }
return reader;
}
@@ -163,4 +167,18 @@
m_inUse.remove(reader);
}
}
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return m_useServicesMechanism;
+ }
+
+ /**
+ * Set the state of the services mechanism feature.
+ */
+ public void setServicesMechnism(boolean flag) {
+ m_useServicesMechanism = flag;
+ }
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLString.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLString.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLString.java Wed May 02 13:32:36 2012 +0100
@@ -127,7 +127,7 @@
/**
* Compares this string to the specified object.
* The result is true
if and only if the argument is not
- * null
and is a String
object that represents
+ * null
and is an XMLString
object that represents
* the same sequence of characters as this object.
*
* @param anObject the object to compare this String
@@ -139,6 +139,20 @@
*/
public abstract boolean equals(XMLString anObject);
+ /**
+ * Compares this string to the specified String
.
+ * The result is true
if and only if the argument is not
+ * null
and is a String
object that represents
+ * the same sequence of characters as this object.
+ *
+ * @param anotherString the object to compare this String
+ * against.
+ * @return true
if the String
s are equal;
+ * false
otherwise.
+ * @see java.lang.String#compareTo(java.lang.String)
+ * @see java.lang.String#equalsIgnoreCase(java.lang.String)
+ */
+ public abstract boolean equals(String anotherString);
/**
* Compares this string to the specified object.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/XMLStringDefault.java Wed May 02 13:32:36 2012 +0100
@@ -152,6 +152,22 @@
}
}
+ /**
+ * Compares this string to the specified String
.
+ * The result is true
if and only if the argument is not
+ * null
and is a String
object that represents
+ * the same sequence of characters as this object.
+ *
+ * @param obj2 the object to compare this String
against.
+ * @return true
if the String
s are equal;
+ * false
otherwise.
+ * @see java.lang.String#compareTo(java.lang.String)
+ * @see java.lang.String#equalsIgnoreCase(java.lang.String)
+ */
+ public boolean equals(String obj2) {
+ return m_str.equals(obj2);
+ }
+
/**
* Compares this string to the specified object.
* The result is true
if and only if the argument is not
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/res/XResources_en.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/res/XResources_en.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xml/internal/utils/res/XResources_en.java Wed May 02 13:32:36 2012 +0100
@@ -48,19 +48,19 @@
//language orientation
{ "orientation", "LeftToRight" },
- //language numbering
+ //language numbering
{ "numbering", "additive" },
// largest numerical value
//{"MaxNumericalValue", new Integer()},
- //These would not be used for EN. Only used for traditional numbering
+ //These would not be used for EN. Only used for traditional numbering
//{"numberGroups", new int[]{10,1}},
//These only used for mutiplicative-additive numbering
//{"multiplier", "10"},
- //{"multiplierChar", "M"},
+ //{"multiplierChar", "M"},
//{"digits", new char[]{'a','b','c','d','e','f','g','h','i'}},
//{"digits", new char[]{0x10D0,0x10D1,0x10D2,0x10D3,0x10D4,0x10D5,0x10D6,0x10D7,0x10D8}},
- //{"tens", new char[]{0x10D9,0x10DA,0x10DB,0x10DC,0x10DD,0x10DE,0x10DF,0x10E0,0x10E1}},
+ //{"tens", new char[]{0x10D9,0x10DA,0x10DB,0x10DC,0x10DD,0x10DE,0x10DF,0x10E0,0x10E1}},
//hundreds, etc...
//{"tables", new String[]{"tens", "digits"}}
};
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/XPathContext.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/XPathContext.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/XPathContext.java Wed May 02 13:32:36 2012 +0100
@@ -96,6 +96,8 @@
*/
private boolean m_isSecureProcessing = false;
+ private boolean m_useServicesMechanism = true;
+
/**
* Though XPathContext context extends
* the DTMManager, it really is a proxy for this object, which
@@ -308,13 +310,14 @@
*/
public XPathContext()
{
- m_prefixResolvers.push(null);
- m_currentNodes.push(DTM.NULL);
- m_currentExpressionNodes.push(DTM.NULL);
- m_saxLocations.push(null);
+ this(true);
}
+ public XPathContext(boolean useServicesMechanism) {
+ init(useServicesMechanism);
+ }
/**
+ **This constructor doesn't seem to be used anywhere -- huizhe wang**
* Create an XPathContext instance.
* @param owner Value that can be retrieved via the getOwnerObject() method.
* @see #getOwnerObject
@@ -326,10 +329,18 @@
m_ownerGetErrorListener = m_owner.getClass().getMethod("getErrorListener", new Class[] {});
}
catch (NoSuchMethodException nsme) {}
+ init(true);
+ }
+
+ private void init(boolean useServicesMechanism) {
m_prefixResolvers.push(null);
m_currentNodes.push(DTM.NULL);
m_currentExpressionNodes.push(DTM.NULL);
m_saxLocations.push(null);
+ m_useServicesMechanism = useServicesMechanism;
+ m_dtmManager = DTMManager.newInstance(
+ com.sun.org.apache.xpath.internal.objects.XMLStringFactoryImpl.getFactory(),
+ m_useServicesMechanism);
}
/**
@@ -352,7 +363,8 @@
m_dtmManager = DTMManager.newInstance(
- com.sun.org.apache.xpath.internal.objects.XMLStringFactoryImpl.getFactory());
+ com.sun.org.apache.xpath.internal.objects.XMLStringFactoryImpl.getFactory(),
+ m_useServicesMechanism);
m_saxLocations.removeAllElements();
m_axesIteratorStack.removeAllElements();
@@ -1098,6 +1110,19 @@
{
return XPathContext.this.getErrorListener();
}
+ /**
+ * Return the state of the services mechanism feature.
+ */
+ public boolean useServicesMechnism() {
+ return m_useServicesMechanism;
+ }
+
+ /**
+ * Set the state of the services mechanism feature.
+ */
+ public void setServicesMechnism(boolean flag) {
+ m_useServicesMechanism = flag;
+ }
/**
* Get the value of a node as a number.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/AxesWalker.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/AxesWalker.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/AxesWalker.java Wed May 02 13:32:36 2012 +0100
@@ -427,7 +427,7 @@
return -1;
}
- walker.setPredicateCount(walker.getPredicateCount() - 1);
+ walker.setPredicateCount(m_predicateIndex);
walker.setNextWalker(null);
walker.setPrevWalker(null);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/BasicTestIterator.java Wed May 02 13:32:36 2012 +0100
@@ -27,6 +27,7 @@
import com.sun.org.apache.xml.internal.dtm.DTMIterator;
import com.sun.org.apache.xml.internal.utils.PrefixResolver;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
/**
* Base for iterators that handle predicates. Does the basic next
@@ -76,7 +77,7 @@
{
super(compiler, opPos, analysis, false);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
int whatToShow = compiler.getWhatToShow(firstStepPos);
if ((0 == (whatToShow
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/DescendantIterator.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,9 @@
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
import com.sun.org.apache.xpath.internal.compiler.OpCodes;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
import com.sun.org.apache.xpath.internal.patterns.NodeTest;
+import org.w3c.dom.DOMException;
/**
* This class implements an optimized iterator for
@@ -57,7 +59,7 @@
super(compiler, opPos, analysis, false);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
int stepType = compiler.getOp(firstStepPos);
boolean orSelf = (OpCodes.FROM_DESCENDANTS_OR_SELF == stepType);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/IteratorPool.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/IteratorPool.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/IteratorPool.java Wed May 02 13:32:36 2012 +0100
@@ -22,7 +22,7 @@
*/
package com.sun.org.apache.xpath.internal.axes;
-import java.util.Vector;
+import java.util.ArrayList;
import com.sun.org.apache.xml.internal.dtm.DTMIterator;
import com.sun.org.apache.xml.internal.utils.WrappedRuntimeException;
@@ -31,17 +31,19 @@
* Pool of object of a given type to pick from to help memory usage
* @xsl.usage internal
*/
-public class IteratorPool implements java.io.Serializable
+public final class IteratorPool implements java.io.Serializable
{
static final long serialVersionUID = -460927331149566998L;
- /** Type of objects in this pool.
- * @serial */
+ /**
+ * Type of objects in this pool.
+ */
private final DTMIterator m_orig;
- /** Vector of given objects this points to.
- * @serial */
- private final Vector m_freeStack;
+ /**
+ * Stack of given objects this points to.
+ */
+ private final ArrayList m_freeStack;
/**
* Constructor IteratorPool
@@ -51,7 +53,7 @@
public IteratorPool(DTMIterator original)
{
m_orig = original;
- m_freeStack = new Vector();
+ m_freeStack = new ArrayList();
}
/**
@@ -72,10 +74,7 @@
else
{
// Remove object from end of free pool.
- DTMIterator result = (DTMIterator)m_freeStack.lastElement();
-
- m_freeStack.setSize(m_freeStack.size() - 1);
-
+ DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1);
return result;
}
}
@@ -104,10 +103,7 @@
else
{
// Remove object from end of free pool.
- DTMIterator result = (DTMIterator)m_freeStack.lastElement();
-
- m_freeStack.setSize(m_freeStack.size() - 1);
-
+ DTMIterator result = (DTMIterator)m_freeStack.remove(m_freeStack.size() - 1);
return result;
}
}
@@ -120,6 +116,6 @@
*/
public synchronized void freeInstance(DTMIterator obj)
{
- m_freeStack.addElement(obj);
+ m_freeStack.add(obj);
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/MatchPatternIterator.java Wed May 02 13:32:36 2012 +0100
@@ -28,6 +28,7 @@
import com.sun.org.apache.xml.internal.dtm.DTMIterator;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
import com.sun.org.apache.xpath.internal.objects.XObject;
import com.sun.org.apache.xpath.internal.patterns.NodeTest;
import com.sun.org.apache.xpath.internal.patterns.StepPattern;
@@ -78,7 +79,7 @@
super(compiler, opPos, analysis, false);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
m_pattern = WalkerFactory.loadSteps(this, compiler, firstStepPos, 0);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/NodeSequence.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/NodeSequence.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/NodeSequence.java Wed May 02 13:32:36 2012 +0100
@@ -34,7 +34,7 @@
import com.sun.org.apache.xpath.internal.objects.XObject;
/**
- * This class is the dynamic wrapper for a Xalan DTMIterator instance, and
+ * This class is the dynamic wrapper for a Xalan DTMIterator instance, and
* provides random access capabilities.
*/
public class NodeSequence extends XObject
@@ -84,7 +84,7 @@
*/
protected void SetVector(NodeVector v)
{
- setObject(v);
+ setObject(v);
}
@@ -95,7 +95,7 @@
public boolean hasCache()
{
final NodeVector nv = getVector();
- return (nv != null);
+ return (nv != null);
}
/**
@@ -136,7 +136,7 @@
*/
public final void setIter(DTMIterator iter)
{
- m_iter = iter;
+ m_iter = iter;
}
/**
@@ -145,7 +145,7 @@
*/
public final DTMIterator getContainedIter()
{
- return m_iter;
+ return m_iter;
}
/**
@@ -166,9 +166,9 @@
*/
private NodeSequence(DTMIterator iter, int context, XPathContext xctxt, boolean shouldCacheNodes)
{
- setIter(iter);
- setRoot(context, xctxt);
- setShouldCacheNodes(shouldCacheNodes);
+ setIter(iter);
+ setRoot(context, xctxt);
+ setShouldCacheNodes(shouldCacheNodes);
}
/**
@@ -178,21 +178,21 @@
*/
public NodeSequence(Object nodeVector)
{
- super(nodeVector);
+ super(nodeVector);
if (nodeVector instanceof NodeVector) {
SetVector((NodeVector) nodeVector);
}
- if(null != nodeVector)
- {
- assertion(nodeVector instanceof NodeVector,
- "Must have a NodeVector as the object for NodeSequence!");
- if(nodeVector instanceof DTMIterator)
- {
- setIter((DTMIterator)nodeVector);
- m_last = ((DTMIterator)nodeVector).getLength();
- }
+ if(null != nodeVector)
+ {
+ assertion(nodeVector instanceof NodeVector,
+ "Must have a NodeVector as the object for NodeSequence!");
+ if(nodeVector instanceof DTMIterator)
+ {
+ setIter((DTMIterator)nodeVector);
+ m_last = ((DTMIterator)nodeVector).getLength();
+ }
- }
+ }
}
/**
@@ -221,13 +221,13 @@
*/
public DTM getDTM(int nodeHandle)
{
- DTMManager mgr = getDTMManager();
- if(null != mgr)
- return getDTMManager().getDTM(nodeHandle);
+ DTMManager mgr = getDTMManager();
+ if(null != mgr)
+ return getDTMManager().getDTM(nodeHandle);
else
{
- assertion(false, "Can not get a DTM Unless a DTMManager has been set!");
- return null;
+ assertion(false, "Can not get a DTM Unless a DTMManager has been set!");
+ return null;
}
}
@@ -244,15 +244,15 @@
*/
public int getRoot()
{
- if(null != m_iter)
- return m_iter.getRoot();
- else
- {
- // NodeSetDTM will call this, and so it's not a good thing to throw
- // an assertion here.
- // assertion(false, "Can not get the root from a non-iterated NodeSequence!");
- return DTM.NULL;
- }
+ if(null != m_iter)
+ return m_iter.getRoot();
+ else
+ {
+ // NodeSetDTM will call this, and so it's not a good thing to throw
+ // an assertion here.
+ // assertion(false, "Can not get the root from a non-iterated NodeSequence!");
+ return DTM.NULL;
+ }
}
/**
@@ -266,22 +266,22 @@
throw new RuntimeException("Unable to evaluate expression using " +
"this context");
}
-
- if(null != m_iter)
- {
- XPathContext xctxt = (XPathContext)environment;
- m_dtmMgr = xctxt.getDTMManager();
- m_iter.setRoot(nodeHandle, environment);
- if(!m_iter.isDocOrdered())
- {
- if(!hasCache())
- setShouldCacheNodes(true);
- runTo(-1);
- m_next=0;
- }
- }
- else
- assertion(false, "Can not setRoot on a non-iterated NodeSequence!");
+
+ if(null != m_iter)
+ {
+ XPathContext xctxt = (XPathContext)environment;
+ m_dtmMgr = xctxt.getDTMManager();
+ m_iter.setRoot(nodeHandle, environment);
+ if(!m_iter.isDocOrdered())
+ {
+ if(!hasCache())
+ setShouldCacheNodes(true);
+ runTo(-1);
+ m_next=0;
+ }
+ }
+ else
+ assertion(false, "Can not setRoot on a non-iterated NodeSequence!");
}
/**
@@ -289,8 +289,8 @@
*/
public void reset()
{
- m_next = 0;
- // not resetting the iterator on purpose!!!
+ m_next = 0;
+ // not resetting the iterator on purpose!!!
}
/**
@@ -299,7 +299,7 @@
public int getWhatToShow()
{
return hasCache() ? (DTMFilter.SHOW_ALL & ~DTMFilter.SHOW_ENTITY_REFERENCE)
- : m_iter.getWhatToShow();
+ : m_iter.getWhatToShow();
}
/**
@@ -307,10 +307,10 @@
*/
public boolean getExpandEntityReferences()
{
- if(null != m_iter)
- return m_iter.getExpandEntityReferences();
- else
- return true;
+ if(null != m_iter)
+ return m_iter.getExpandEntityReferences();
+ else
+ return true;
}
/**
@@ -324,42 +324,42 @@
if (null != vec)
{
// There is a cache
- if(m_next < vec.size())
- {
+ if(m_next < vec.size())
+ {
// The node is in the cache, so just return it.
- int next = vec.elementAt(m_next);
- m_next++;
- return next;
- }
- else if(cacheComplete() || (-1 != m_last) || (null == m_iter))
- {
- m_next++;
- return DTM.NULL;
- }
+ int next = vec.elementAt(m_next);
+ m_next++;
+ return next;
+ }
+ else if(cacheComplete() || (-1 != m_last) || (null == m_iter))
+ {
+ m_next++;
+ return DTM.NULL;
+ }
}
if (null == m_iter)
return DTM.NULL;
- int next = m_iter.nextNode();
+ int next = m_iter.nextNode();
if(DTM.NULL != next)
{
- if(hasCache())
- {
- if(m_iter.isDocOrdered())
- {
- getVector().addElement(next);
- m_next++;
- }
- else
- {
- int insertIndex = addNodeInDocOrder(next);
- if(insertIndex >= 0)
- m_next++;
- }
- }
- else
- m_next++;
+ if(hasCache())
+ {
+ if(m_iter.isDocOrdered())
+ {
+ getVector().addElement(next);
+ m_next++;
+ }
+ else
+ {
+ int insertIndex = addNodeInDocOrder(next);
+ if(insertIndex >= 0)
+ m_next++;
+ }
+ }
+ else
+ m_next++;
}
else
{
@@ -368,8 +368,8 @@
// know that it is complete.
markCacheComplete();
- m_last = m_next;
- m_next++;
+ m_last = m_next;
+ m_next++;
}
return next;
@@ -380,22 +380,22 @@
*/
public int previousNode()
{
- if(hasCache())
- {
- if(m_next <= 0)
- return DTM.NULL;
- else
- {
- m_next--;
- return item(m_next);
- }
- }
- else
- {
- int n = m_iter.previousNode();
- m_next = m_iter.getCurrentPos();
- return m_next;
- }
+ if(hasCache())
+ {
+ if(m_next <= 0)
+ return DTM.NULL;
+ else
+ {
+ m_next--;
+ return item(m_next);
+ }
+ }
+ else
+ {
+ int n = m_iter.previousNode();
+ m_next = m_iter.getCurrentPos();
+ return m_next;
+ }
}
/**
@@ -403,9 +403,9 @@
*/
public void detach()
{
- if(null != m_iter)
- m_iter.detach();
- super.detach();
+ if(null != m_iter)
+ m_iter.detach();
+ super.detach();
}
/**
@@ -415,14 +415,14 @@
*/
public void allowDetachToRelease(boolean allowRelease)
{
- if((false == allowRelease) && !hasCache())
- {
- setShouldCacheNodes(true);
- }
+ if((false == allowRelease) && !hasCache())
+ {
+ setShouldCacheNodes(true);
+ }
- if(null != m_iter)
- m_iter.allowDetachToRelease(allowRelease);
- super.allowDetachToRelease(allowRelease);
+ if(null != m_iter)
+ m_iter.allowDetachToRelease(allowRelease);
+ super.allowDetachToRelease(allowRelease);
}
/**
@@ -430,22 +430,22 @@
*/
public int getCurrentNode()
{
- if(hasCache())
- {
- int currentIndex = m_next-1;
- NodeVector vec = getVector();
- if((currentIndex >= 0) && (currentIndex < vec.size()))
- return vec.elementAt(currentIndex);
- else
- return DTM.NULL;
- }
+ if(hasCache())
+ {
+ int currentIndex = m_next-1;
+ NodeVector vec = getVector();
+ if((currentIndex >= 0) && (currentIndex < vec.size()))
+ return vec.elementAt(currentIndex);
+ else
+ return DTM.NULL;
+ }
- if(null != m_iter)
- {
- return m_iter.getCurrentNode();
- }
- else
- return DTM.NULL;
+ if(null != m_iter)
+ {
+ return m_iter.getCurrentNode();
+ }
+ else
+ return DTM.NULL;
}
/**
@@ -467,8 +467,8 @@
{
SetVector(new NodeVector());
}
-// else
-// getVector().RemoveAllNoClear(); // Is this good?
+// else
+// getVector().RemoveAllNoClear(); // Is this good?
}
else
SetVector(null);
@@ -527,7 +527,7 @@
*/
public void setCurrentPos(int i)
{
- runTo(i);
+ runTo(i);
}
/**
@@ -535,10 +535,10 @@
*/
public int item(int index)
{
- setCurrentPos(index);
- int n = nextNode();
- m_next = index;
- return n;
+ setCurrentPos(index);
+ int n = nextNode();
+ m_next = index;
+ return n;
}
/**
@@ -546,9 +546,9 @@
*/
public void setItem(int node, int index)
{
- NodeVector vec = getVector();
- if(null != vec)
- {
+ NodeVector vec = getVector();
+ if(null != vec)
+ {
int oldNode = vec.elementAt(index);
if (oldNode != node && m_cache.useCount() > 1) {
/* If we are going to set the node at the given index
@@ -583,11 +583,11 @@
* values in that same copy which has a use count of 1.
*/
}
- vec.setElementAt(node, index);
- m_last = vec.size();
- }
- else
- m_iter.setItem(node, index);
+ vec.setElementAt(node, index);
+ m_last = vec.size();
+ }
+ else
+ m_iter.setItem(node, index);
}
/**
@@ -597,8 +597,8 @@
{
IteratorCache cache = getCache();
- if(cache != null)
- {
+ if(cache != null)
+ {
// Nodes from the iterator are cached
if (cache.isComplete()) {
// All of the nodes from the iterator are cached
@@ -615,18 +615,18 @@
return m_iter.getLength();
}
- if(-1 == m_last)
- {
- int pos = m_next;
- runTo(-1);
- m_next = pos;
- }
- return m_last;
- }
- else
- {
- return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
- }
+ if(-1 == m_last)
+ {
+ int pos = m_next;
+ runTo(-1);
+ m_next = pos;
+ }
+ return m_last;
+ }
+ else
+ {
+ return (-1 == m_last) ? (m_last = m_iter.getLength()) : m_last;
+ }
}
/**
@@ -635,7 +635,7 @@
*/
public DTMIterator cloneWithReset() throws CloneNotSupportedException
{
- NodeSequence seq = (NodeSequence)super.clone();
+ NodeSequence seq = (NodeSequence)super.clone();
seq.m_next = 0;
if (m_cache != null) {
// In making this clone of an iterator we are making
@@ -680,10 +680,10 @@
*/
public boolean isDocOrdered()
{
- if(null != m_iter)
- return m_iter.isDocOrdered();
- else
- return true; // can't be sure?
+ if(null != m_iter)
+ return m_iter.isDocOrdered();
+ else
+ return true; // can't be sure?
}
/**
@@ -691,12 +691,12 @@
*/
public int getAxis()
{
- if(null != m_iter)
- return m_iter.getAxis();
+ if(null != m_iter)
+ return m_iter.getAxis();
else
{
- assertion(false, "Can not getAxis from a non-iterated node sequence!");
- return 0;
+ assertion(false, "Can not getAxis from a non-iterated node sequence!");
+ return 0;
}
}
@@ -705,10 +705,10 @@
*/
public int getAnalysisBits()
{
- if((null != m_iter) && (m_iter instanceof PathComponent))
- return ((PathComponent)m_iter).getAnalysisBits();
+ if((null != m_iter) && (m_iter instanceof PathComponent))
+ return ((PathComponent)m_iter).getAnalysisBits();
else
- return 0;
+ return 0;
}
/**
@@ -716,7 +716,7 @@
*/
public void fixupVariables(Vector vars, int globalsSize)
{
- super.fixupVariables(vars, globalsSize);
+ super.fixupVariables(vars, globalsSize);
}
/**
@@ -959,4 +959,3 @@
return m_cache;
}
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIterator.java Wed May 02 13:32:36 2012 +0100
@@ -29,6 +29,7 @@
import com.sun.org.apache.xpath.internal.Expression;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
/**
* This class implements a general iterator for
@@ -58,7 +59,7 @@
throws javax.xml.transform.TransformerException
{
super(compiler, opPos, analysis);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
m_axis = WalkerFactory.getAxisFromStep(compiler, firstStepPos);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/OneStepIteratorForward.java Wed May 02 13:32:36 2012 +0100
@@ -26,6 +26,7 @@
import com.sun.org.apache.xml.internal.dtm.DTMFilter;
import com.sun.org.apache.xpath.internal.Expression;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
/**
* This class implements a general iterator for
@@ -54,7 +55,7 @@
throws javax.xml.transform.TransformerException
{
super(compiler, opPos, analysis);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
m_axis = WalkerFactory.getAxisFromStep(compiler, firstStepPos);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/UnionPathIterator.java Wed May 02 13:32:36 2012 +0100
@@ -30,6 +30,7 @@
import com.sun.org.apache.xpath.internal.XPathVisitor;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
import com.sun.org.apache.xpath.internal.compiler.OpCodes;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
/**
* This class extends NodeSetDTM, which implements DTMIterator,
@@ -160,7 +161,7 @@
super();
- opPos = compiler.getFirstChildPos(opPos);
+ opPos = OpMap.getFirstChildPos(opPos);
loadLocationPaths(compiler, opPos, 0);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkerFactory.java Wed May 02 13:32:36 2012 +0100
@@ -30,6 +30,7 @@
import com.sun.org.apache.xpath.internal.compiler.Compiler;
import com.sun.org.apache.xpath.internal.compiler.FunctionTable;
import com.sun.org.apache.xpath.internal.compiler.OpCodes;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
import com.sun.org.apache.xpath.internal.objects.XNumber;
import com.sun.org.apache.xpath.internal.patterns.ContextMatchStepPattern;
import com.sun.org.apache.xpath.internal.patterns.FunctionPattern;
@@ -162,7 +163,7 @@
throws javax.xml.transform.TransformerException
{
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
int analysis = analyze(compiler, firstStepPos, 0);
boolean isOneStep = isOneStep(analysis);
DTMIterator iter;
@@ -402,7 +403,7 @@
int opPos)
{
int endFunc = opPos + compiler.getOp(opPos + 1) - 1;
- opPos = compiler.getFirstChildPos(opPos);
+ opPos = OpMap.getFirstChildPos(opPos);
int funcID = compiler.getOp(opPos);
// System.out.println("funcID: "+funcID);
// System.out.println("opPos: "+opPos);
@@ -453,7 +454,7 @@
case OpCodes.OP_LT:
case OpCodes.OP_LTE:
case OpCodes.OP_EQUALS:
- int leftPos = compiler.getFirstChildPos(op);
+ int leftPos = OpMap.getFirstChildPos(op);
int rightPos = compiler.getNextOpPos(leftPos);
isProx = isProximateInnerExpr(compiler, leftPos);
if(isProx)
@@ -521,7 +522,7 @@
case OpCodes.OP_LT:
case OpCodes.OP_LTE:
case OpCodes.OP_EQUALS:
- int leftPos = compiler.getFirstChildPos(innerExprOpPos);
+ int leftPos = OpMap.getFirstChildPos(innerExprOpPos);
int rightPos = compiler.getNextOpPos(leftPos);
isProx = isProximateInnerExpr(compiler, leftPos);
if(isProx)
@@ -984,9 +985,7 @@
int stepType = compiler.getOp(opPos);
boolean simpleInit = false;
- int totalNumberWalkers = (analysis & BITS_COUNT);
boolean prevIsOneStepDown = true;
- int firstStepPos = compiler.getFirstChildPos(opPos);
int whatToShow = compiler.getWhatToShow(opPos);
StepPattern ai = null;
@@ -1286,7 +1285,7 @@
public static String getAnalysisString(int analysis)
{
StringBuffer buf = new StringBuffer();
- buf.append("count: "+getStepCount(analysis)+" ");
+ buf.append("count: ").append(getStepCount(analysis)).append(' ');
if((analysis & BIT_NODETEST_ANY) != 0)
{
buf.append("NTANY|");
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/axes/WalkingIterator.java Wed May 02 13:32:36 2012 +0100
@@ -29,6 +29,7 @@
import com.sun.org.apache.xpath.internal.VariableStack;
import com.sun.org.apache.xpath.internal.XPathVisitor;
import com.sun.org.apache.xpath.internal.compiler.Compiler;
+import com.sun.org.apache.xpath.internal.compiler.OpMap;
/**
* Location path iterator that uses Walkers.
@@ -58,7 +59,7 @@
{
super(compiler, opPos, analysis, shouldLoadWalkers);
- int firstStepPos = compiler.getFirstChildPos(opPos);
+ int firstStepPos = OpMap.getFirstChildPos(opPos);
if (shouldLoadWalkers)
{
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/FuncLoader.java Wed May 02 13:32:36 2012 +0100
@@ -25,6 +25,8 @@
import javax.xml.transform.TransformerException;
import com.sun.org.apache.xpath.internal.functions.Function;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import com.sun.org.apache.xalan.internal.utils.ConfigurationError;
/**
* Lazy load of functions into the function table as needed, so we don't
@@ -96,11 +98,10 @@
throw new TransformerException("Application can't install his own xpath function.");
}
- return (Function) ObjectFactory.newInstance(
- className, ObjectFactory.findClassLoader(), true);
+ return (Function) ObjectFactory.newInstance(className, true);
}
- catch (ObjectFactory.ConfigurationError e)
+ catch (ConfigurationError e)
{
throw new TransformerException(e.getException());
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -324,13 +324,13 @@
fXalanProperties.load(fis);
fis.close();
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/OpMap.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/OpMap.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/compiler/OpMap.java Wed May 02 13:32:36 2012 +0100
@@ -242,7 +242,7 @@
else
{
throw new RuntimeException(
- XSLMessages.createXPATHMessage(XPATHErrorResources.ER_UNKNOWN_STEP, new Object[]{new Integer(stepType).toString()}));
+ XSLMessages.createXPATHMessage(XPATHErrorResources.ER_UNKNOWN_STEP, new Object[]{String.valueOf(stepType)}));
//"Programmer's assertion in getNextStepPos: unknown stepType: " + stepType);
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/FuncSystemProperty.java Wed May 02 13:32:36 2012 +0100
@@ -31,6 +31,8 @@
import com.sun.org.apache.xpath.internal.objects.XObject;
import com.sun.org.apache.xpath.internal.objects.XString;
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
+import com.sun.org.apache.xalan.internal.utils.ObjectFactory;
+import com.sun.org.apache.xalan.internal.utils.SecuritySupport;
/**
* Execute the SystemProperty() function.
@@ -168,9 +170,8 @@
try
{
// Use SecuritySupport class to provide priveleged access to property file
- SecuritySupport ss = SecuritySupport.getInstance();
- InputStream is = ss.getResourceAsStream(ObjectFactory.findClassLoader(),
+ InputStream is = SecuritySupport.getResourceAsStream(ObjectFactory.findClassLoader(),
file);
// get a buffered version
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/ObjectFactory.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/ObjectFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/functions/ObjectFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,12 +39,12 @@
*
* This code is designed to implement the JAXP 1.1 spec pluggability
* feature and is designed to run on JDK version 1.1 and
- * later, and to compile on JDK 1.2 and onward.
+ * later, and to compile on JDK 1.2 and onward.
* The code also runs both as part of an unbundled jar file and
* when bundled as part of the JDK.
*
* This class was moved from the javax.xml.parsers.ObjectFactory
- * class and modified to be used as a general utility for creating objects
+ * class and modified to be used as a general utility for creating objects
* dynamically.
*
* @version $Id: ObjectFactory.java,v 1.7 2008/04/02 00:40:59 joehw Exp $
@@ -127,7 +127,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Object createObject(String factoryId,
+ static Object createObject(String factoryId,
String propertiesFilename,
String fallbackClassName)
throws ConfigurationError
@@ -174,7 +174,7 @@
*
* @exception ObjectFactory.ConfigurationError
*/
- static Class lookUpFactoryClass(String factoryId)
+ static Class lookUpFactoryClass(String factoryId)
throws ConfigurationError
{
return lookUpFactoryClass(factoryId, null, null);
@@ -323,13 +323,13 @@
fis = ss.getFileInputStream(propertiesFile);
fXalanProperties.load(fis);
}
- } catch (Exception x) {
- fXalanProperties = null;
- fLastModified = -1;
+ } catch (Exception x) {
+ fXalanProperties = null;
+ fLastModified = -1;
// assert(x instanceof FileNotFoundException
- // || x instanceof SecurityException)
- // In both cases, ignore and continue w/ next location
- }
+ // || x instanceof SecurityException)
+ // In both cases, ignore and continue w/ next location
+ }
finally {
// try to close the input stream if one was opened.
if (fis != null) {
@@ -339,7 +339,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if(fXalanProperties != null) {
factoryClassName = fXalanProperties.getProperty(factoryId);
@@ -365,7 +365,7 @@
// Ignore the exception.
catch (IOException exc) {}
}
- }
+ }
}
if (factoryClassName != null) {
if (DEBUG) debugPrintln("found in " + propertiesFilename + ", value="
@@ -394,7 +394,7 @@
*/
static ClassLoader findClassLoader()
throws ConfigurationError
- {
+ {
SecuritySupport ss = SecuritySupport.getInstance();
// Figure out which ClassLoader to use for loading the provider
@@ -450,7 +450,7 @@
/**
* Create an instance of a class using the specified ClassLoader
- */
+ */
static Object newInstance(String className, ClassLoader cl,
boolean doFallback)
throws ConfigurationError
@@ -474,11 +474,11 @@
/**
* Find a Class using the specified ClassLoader
- */
+ */
static Class findProviderClass(String className, ClassLoader cl,
boolean doFallback)
throws ClassNotFoundException, ConfigurationError
- {
+ {
//throw security exception if the calling thread is not allowed to access the
//class. Restrict the access to the package classes as specified in java.security policy.
SecurityManager security = System.getSecurityManager();
@@ -488,11 +488,11 @@
String packageName = className;
if (lastDot != -1) packageName = className.substring(0, lastDot);
security.checkPackageAccess(packageName);
- }
+ }
}catch(SecurityException e){
throw e;
}
-
+
Class providerClass;
if (cl == null) {
// XXX Use the bootstrap ClassLoader. There is no way to
@@ -584,7 +584,7 @@
} catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -601,7 +601,7 @@
}
// Ignore the exception.
catch (IOException exc) {}
- }
+ }
if (factoryClassName != null &&
! "".equals(factoryClassName)) {
@@ -626,7 +626,7 @@
/**
* A configuration error.
*/
- static class ConfigurationError
+ static class ConfigurationError
extends Error {
static final long serialVersionUID = -5782303800588797207L;
//
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathExpressionImpl.java Wed May 02 13:32:36 2012 +0100
@@ -29,6 +29,7 @@
import com.sun.org.apache.xml.internal.utils.PrefixResolver;
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.XSLMessages;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import javax.xml.namespace.NamespaceContext;
import javax.xml.namespace.QName;
@@ -50,6 +51,7 @@
/**
* The XPathExpression interface encapsulates a (compiled) XPath expression.
*
+ * @version $Revision: 1.10 $
* @author Ramesh Mandava
*/
public class XPathExpressionImpl implements javax.xml.xpath.XPathExpression{
@@ -64,6 +66,7 @@
// extensions function need to throw XPathFunctionException
private boolean featureSecureProcessing = false;
+ private boolean useServicesMechanism = true;
/** Protected constructor to prevent direct instantiation; use compile()
* from the context.
*/
@@ -84,12 +87,13 @@
JAXPPrefixResolver prefixResolver,
XPathFunctionResolver functionResolver,
XPathVariableResolver variableResolver,
- boolean featureSecureProcessing ) {
+ boolean featureSecureProcessing, boolean useServicesMechanism ) {
this.xpath = xpath;
this.prefixResolver = prefixResolver;
this.functionResolver = functionResolver;
this.variableResolver = variableResolver;
this.featureSecureProcessing = featureSecureProcessing;
+ this.useServicesMechanism = useServicesMechanism;
};
public void setXPath (com.sun.org.apache.xpath.internal.XPath xpath ) {
@@ -286,7 +290,7 @@
}
try {
if ( dbf == null ) {
- dbf = DocumentBuilderFactory.newInstance();
+ dbf = FactoryImpl.getDOMFactory(useServicesMechanism);
dbf.setNamespaceAware( true );
dbf.setValidating( false );
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -21,6 +21,7 @@
package com.sun.org.apache.xpath.internal.jaxp;
+import com.sun.org.apache.xalan.internal.XalanConstants;
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.XSLMessages;
@@ -33,30 +34,30 @@
/**
* The XPathFactory builds XPaths.
*
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.11 $
* @author Ramesh Mandava
*/
public class XPathFactoryImpl extends XPathFactory {
-
- /**
- *
Name of class as a constant to use for debugging.
- */
- private static final String CLASS_NAME = "XPathFactoryImpl";
-
- /**
- *XPathFunctionResolver for this XPathFactory and created XPaths.
- */
- private XPathFunctionResolver xPathFunctionResolver = null;
-
- /**
- * XPathVariableResolver for this XPathFactory and created XPaths
- */
- private XPathVariableResolver xPathVariableResolver = null;
+
+ /**
+ * Name of class as a constant to use for debugging.
+ */
+ private static final String CLASS_NAME = "XPathFactoryImpl";
- /**
- * State of secure processing feature.
- */
- private boolean _isNotSecureProcessing = true;
+ /**
+ *XPathFunctionResolver for this XPathFactory and created XPaths.
+ */
+ private XPathFunctionResolver xPathFunctionResolver = null;
+
+ /**
+ * XPathVariableResolver for this XPathFactory and created XPaths
+ */
+ private XPathVariableResolver xPathVariableResolver = null;
+
+ /**
+ * State of secure processing feature.
+ */
+ private boolean _isNotSecureProcessing = true;
/**
* State of secure mode.
*/
@@ -64,28 +65,39 @@
/**
* javax.xml.xpath.XPathFactory implementation.
*/
+
+ private boolean _useServicesMechanism = true;
+
public XPathFactoryImpl() {
+ this(true);
+ }
+
+ public static XPathFactory newXPathFactoryNoServiceLoader() {
+ return new XPathFactoryImpl(false);
+ }
+
+ public XPathFactoryImpl(boolean useServicesMechanism) {
if (System.getSecurityManager() != null) {
_isSecureMode = true;
_isNotSecureProcessing = false;
}
+ this._useServicesMechanism = useServicesMechanism;
}
-
- /**
- * Is specified object model supported by this
+ /**
+ *
Is specified object model supported by this
* XPathFactory
?
- *
- * @param objectModel Specifies the object model which the returned
+ *
+ * @param objectModel Specifies the object model which the returned
* XPathFactory
will understand.
- *
- * @return true
if XPathFactory
supports
+ *
+ * @return true
if XPathFactory
supports
* objectModel
, else false
.
- *
- * @throws NullPointerException If objectModel
is null
.
- * @throws IllegalArgumentException If objectModel.length() == 0
.
- */
- public boolean isObjectModelSupported(String objectModel) {
-
+ *
+ * @throws NullPointerException If objectModel
is null
.
+ * @throws IllegalArgumentException If objectModel.length() == 0
.
+ */
+ public boolean isObjectModelSupported(String objectModel) {
+
if (objectModel == null) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_OBJECT_MODEL_NULL,
@@ -93,64 +105,64 @@
throw new NullPointerException( fmsg );
}
-
+
if (objectModel.length() == 0) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_OBJECT_MODEL_EMPTY,
new Object[] { this.getClass().getName() } );
throw new IllegalArgumentException( fmsg );
}
-
- // know how to support default object model, W3C DOM
+
+ // know how to support default object model, W3C DOM
if (objectModel.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) {
return true;
}
-
+
// don't know how to support anything else
return false;
- }
+ }
/**
* Returns a new XPath
object using the underlying
* object model determined when the factory was instantiated.
- *
- * @return New XPath
- */
- public javax.xml.xpath.XPath newXPath() {
- return new com.sun.org.apache.xpath.internal.jaxp.XPathImpl(
+ *
+ * @return New XPath
+ */
+ public javax.xml.xpath.XPath newXPath() {
+ return new com.sun.org.apache.xpath.internal.jaxp.XPathImpl(
xPathVariableResolver, xPathFunctionResolver,
- !_isNotSecureProcessing );
- }
-
- /**
- * Set a feature for this XPathFactory
and
+ !_isNotSecureProcessing, _useServicesMechanism );
+ }
+
+ /**
+ *
Set a feature for this XPathFactory
and
* XPath
s created by this factory.
- *
- *
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * An {@link XPathFactoryConfigurationException} is thrown if this
+ *
+ *
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * An {@link XPathFactoryConfigurationException} is thrown if this
* XPathFactory
or the XPath
s
- * it creates cannot support the feature.
- * It is possible for an XPathFactory
to expose a feature
+ * it creates cannot support the feature.
+ * It is possible for an XPathFactory
to expose a feature
* value but be unable to change its state.
- *
- *
- * See {@link javax.xml.xpath.XPathFactory} for full documentation
+ *
+ *
+ * See {@link javax.xml.xpath.XPathFactory} for full documentation
* of specific features.
- *
- * @param name Feature name.
- * @param value Is feature state true
or false
.
- *
- * @throws XPathFactoryConfigurationException if this
+ *
+ * @param name Feature name.
+ * @param value Is feature state true
or false
.
+ *
+ * @throws XPathFactoryConfigurationException if this
* XPathFactory
or the XPath
s
- * it creates cannot support this feature.
- * @throws NullPointerException if name
is
+ * it creates cannot support this feature.
+ * @throws NullPointerException if name
is
* null
.
- */
- public void setFeature(String name, boolean value)
- throws XPathFactoryConfigurationException {
-
+ */
+ public void setFeature(String name, boolean value)
+ throws XPathFactoryConfigurationException {
+
// feature name cannot be null
if (name == null) {
String fmsg = XSLMessages.createXPATHMessage(
@@ -158,7 +170,7 @@
new Object[] { CLASS_NAME, new Boolean( value) } );
throw new NullPointerException( fmsg );
}
-
+
// secure processing?
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
if ((_isSecureMode) && (!value)) {
@@ -169,43 +181,47 @@
}
_isNotSecureProcessing = !value;
-
+
// all done processing feature
return;
}
-
+ if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+ _useServicesMechanism = value;
+ return;
+ }
+
// unknown feature
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_FEATURE_UNKNOWN,
new Object[] { name, CLASS_NAME, new Boolean(value) } );
throw new XPathFactoryConfigurationException( fmsg );
- }
+ }
- /**
- * Get the state of the named feature.
- *
- *
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * An {@link XPathFactoryConfigurationException} is thrown if this
+ /**
+ *
Get the state of the named feature.
+ *
+ *
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * An {@link XPathFactoryConfigurationException} is thrown if this
* XPathFactory
or the XPath
s
- * it creates cannot support the feature.
- * It is possible for an XPathFactory
to expose a feature
+ * it creates cannot support the feature.
+ * It is possible for an XPathFactory
to expose a feature
* value but be unable to change its state.
- *
- *
- * @param name Feature name.
- *
- * @return State of the named feature.
- *
- * @throws XPathFactoryConfigurationException if this
+ *
+ *
+ * @param name Feature name.
+ *
+ * @return State of the named feature.
+ *
+ * @throws XPathFactoryConfigurationException if this
* XPathFactory
or the XPath
s
- * it creates cannot support this feature.
- * @throws NullPointerException if name
is
+ * it creates cannot support this feature.
+ * @throws NullPointerException if name
is
* null
.
- */
- public boolean getFeature(String name)
- throws XPathFactoryConfigurationException {
+ */
+ public boolean getFeature(String name)
+ throws XPathFactoryConfigurationException {
// feature name cannot be null
if (name == null) {
@@ -214,12 +230,14 @@
new Object[] { CLASS_NAME } );
throw new NullPointerException( fmsg );
}
-
+
// secure processing?
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
return !_isNotSecureProcessing;
}
-
+ if (name.equals(XalanConstants.ORACLE_FEATURE_SERVICE_MECHANISM)) {
+ return _useServicesMechanism;
+ }
// unknown feature
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_GETTING_UNKNOWN_FEATURE,
@@ -227,23 +245,23 @@
throw new XPathFactoryConfigurationException( fmsg );
}
-
- /**
+
+ /**
* Establish a default function resolver.
- *
- * Any XPath
objects constructed from this factory will use
- * the specified resolver by default.
- *
- * A NullPointerException
is thrown if
+ *
+ *
Any XPath
objects constructed from this factory will use
+ * the specified resolver by default.
+ *
+ * A NullPointerException
is thrown if
* resolver
is null
.
- *
- * @param resolver XPath function resolver.
- *
- * @throws NullPointerException If resolver
is
+ *
+ * @param resolver XPath function resolver.
+ *
+ * @throws NullPointerException If resolver
is
* null
.
- */
+ */
public void setXPathFunctionResolver(XPathFunctionResolver resolver) {
-
+
// resolver cannot be null
if (resolver == null) {
String fmsg = XSLMessages.createXPATHMessage(
@@ -251,36 +269,33 @@
new Object[] { CLASS_NAME } );
throw new NullPointerException( fmsg );
}
-
+
xPathFunctionResolver = resolver;
}
-
- /**
- * Establish a default variable resolver.
- *
- * Any XPath
objects constructed from this factory will use
- * the specified resolver by default.
- *
- * A NullPointerException
is thrown if resolver
is null
.
- *
- * @param resolver Variable resolver.
- *
- * @throws NullPointerException If resolver
is
+
+ /**
+ * Establish a default variable resolver.
+ *
+ * Any XPath
objects constructed from this factory will use
+ * the specified resolver by default.
+ *
+ * A NullPointerException
is thrown if resolver
is null
.
+ *
+ * @param resolver Variable resolver.
+ *
+ * @throws NullPointerException If resolver
is
* null
.
- */
- public void setXPathVariableResolver(XPathVariableResolver resolver) {
+ */
+ public void setXPathVariableResolver(XPathVariableResolver resolver) {
- // resolver cannot be null
- if (resolver == null) {
+ // resolver cannot be null
+ if (resolver == null) {
String fmsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_NULL_XPATH_VARIABLE_RESOLVER,
new Object[] { CLASS_NAME } );
- throw new NullPointerException( fmsg );
- }
-
- xPathVariableResolver = resolver;
- }
+ throw new NullPointerException( fmsg );
+ }
+
+ xPathVariableResolver = resolver;
+ }
}
-
-
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/jaxp/XPathImpl.java Wed May 02 13:32:36 2012 +0100
@@ -34,9 +34,9 @@
import com.sun.org.apache.xpath.internal.objects.XObject;
import com.sun.org.apache.xpath.internal.res.XPATHErrorResources;
import com.sun.org.apache.xalan.internal.res.XSLMessages;
+import com.sun.org.apache.xalan.internal.utils.FactoryImpl;
import org.w3c.dom.Node;
-import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.traversal.NodeIterator;
@@ -53,6 +53,7 @@
* of an XPath expression.
*
*
+ * @version $Revision: 1.10 $
* @author Ramesh Mandava
*/
public class XPathImpl implements javax.xml.xpath.XPath {
@@ -68,6 +69,7 @@
// Secure Processing Feature is set on XPathFactory then the invocation of
// extensions function need to throw XPathFunctionException
private boolean featureSecureProcessing = false;
+ private boolean useServiceMechanism = true;
XPathImpl( XPathVariableResolver vr, XPathFunctionResolver fr ) {
this.origVariableResolver = this.variableResolver = vr;
@@ -75,10 +77,11 @@
}
XPathImpl( XPathVariableResolver vr, XPathFunctionResolver fr,
- boolean featureSecureProcessing ) {
+ boolean featureSecureProcessing, boolean useServiceMechanism ) {
this.origVariableResolver = this.variableResolver = vr;
this.origFunctionResolver = this.functionResolver = fr;
this.featureSecureProcessing = featureSecureProcessing;
+ this.useServiceMechanism = useServiceMechanism;
}
/**
@@ -156,7 +159,7 @@
private static Document d = null;
- private static DocumentBuilder getParser() {
+ private DocumentBuilder getParser() {
try {
// we'd really like to cache those DocumentBuilders, but we can't because:
// 1. thread safety. parsers are not thread-safe, so at least
@@ -169,7 +172,7 @@
//
// so we really have to create a fresh DocumentBuilder every time we need one
// - KK
- DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
+ DocumentBuilderFactory dbf = FactoryImpl.getDOMFactory(useServiceMechanism);
dbf.setNamespaceAware( true );
dbf.setValidating( false );
return dbf.newDocumentBuilder();
@@ -179,17 +182,6 @@
}
}
- private static Document getDummyDocument( ) {
- // we don't need synchronization here; even if two threads
- // enter this code at the same time, we just waste a little time
- if(d==null) {
- DOMImplementation dim = getParser().getDOMImplementation();
- d = dim.createDocument("http://java.sun.com/jaxp/xpath",
- "dummyroot", null);
- }
- return d;
- }
-
private XObject eval(String expression, Object contextItem)
throws javax.xml.transform.TransformerException {
@@ -399,7 +391,7 @@
// Can have errorListener
XPathExpressionImpl ximpl = new XPathExpressionImpl (xpath,
prefixResolver, functionResolver, variableResolver,
- featureSecureProcessing );
+ featureSecureProcessing, useServiceMechanism );
return ximpl;
} catch ( javax.xml.transform.TransformerException te ) {
throw new XPathExpressionException ( te ) ;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSet.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSet.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSet.java Wed May 02 13:32:36 2012 +0100
@@ -38,7 +38,7 @@
* @xsl.usage general
*/
public class XNodeSet extends NodeSequence
-{
+{
static final long serialVersionUID = 1916026368035639667L;
/**
* Default constructor for derived objects.
@@ -54,9 +54,9 @@
*/
public XNodeSet(DTMIterator val)
{
- super();
- if(val instanceof XNodeSet)
- {
+ super();
+ if(val instanceof XNodeSet)
+ {
final XNodeSet nodeSet = (XNodeSet) val;
setIter(nodeSet.m_iter);
m_dtmMgr = nodeSet.m_dtmMgr;
@@ -68,11 +68,11 @@
// Get the cache from val and use it ourselves (we share it).
setObject(nodeSet.getIteratorCache());
- }
- else
- setIter(val);
+ }
+ else
+ setIter(val);
}
-
+
/**
* Construct a XNodeSet object.
*
@@ -80,21 +80,21 @@
*/
public XNodeSet(XNodeSet val)
{
- super();
+ super();
setIter(val.m_iter);
m_dtmMgr = val.m_dtmMgr;
m_last = val.m_last;
if(!val.hasCache())
- val.setShouldCacheNodes(true);
+ val.setShouldCacheNodes(true);
setObject(val.m_obj);
}
/**
- * Construct an empty XNodeSet object. This is used to create a mutable
+ * Construct an empty XNodeSet object. This is used to create a mutable
* nodeset to which random nodes may be added.
*/
- public XNodeSet(DTMManager dtmMgr)
+ public XNodeSet(DTMManager dtmMgr)
{
this(DTM.NULL,dtmMgr);
}
@@ -116,7 +116,7 @@
m_last = 1;
}
else
- m_last = 0;
+ m_last = 0;
}
/**
@@ -156,7 +156,7 @@
/**
* Cast result object to a number.
*
- * @return numeric value of the string conversion from the
+ * @return numeric value of the string conversion from the
* next node in the NodeSetDTM, or NAN if no node was found
*/
public double num()
@@ -165,12 +165,12 @@
int node = item(0);
return (node != DTM.NULL) ? getNumberFromNode(node) : Double.NaN;
}
-
+
/**
- * Cast result object to a number, but allow side effects, such as the
+ * Cast result object to a number, but allow side effects, such as the
* incrementing of an iterator.
*
- * @return numeric value of the string conversion from the
+ * @return numeric value of the string conversion from the
* next node in the NodeSetDTM, or NAN if no node was found
*/
public double numWithSideEffects()
@@ -190,9 +190,9 @@
{
return (item(0) != DTM.NULL);
}
-
+
/**
- * Cast result object to a boolean, but allow side effects, such as the
+ * Cast result object to a boolean, but allow side effects, such as the
* incrementing of an iterator.
*
* @return True if there is a next node in the nodeset
@@ -202,7 +202,7 @@
return (nextNode() != DTM.NULL);
}
-
+
/**
* Get the string conversion from a single node.
*
@@ -223,7 +223,7 @@
return com.sun.org.apache.xpath.internal.objects.XString.EMPTYSTRING;
}
}
-
+
/**
* Directly call the
* characters method on the passed ContentHandler for the
@@ -239,25 +239,25 @@
throws org.xml.sax.SAXException
{
int node = item(0);
-
+
if(node != DTM.NULL)
{
m_dtmMgr.getDTM(node).dispatchCharactersEvents(node, ch, false);
}
-
+
}
-
+
/**
* Cast result object to an XMLString.
*
- * @return The document fragment node data or the empty string.
+ * @return The document fragment node data or the empty string.
*/
public XMLString xstr()
{
int node = item(0);
return (node != DTM.NULL) ? getStringFromNode(node) : XString.EMPTYSTRING;
}
-
+
/**
* Cast result object to a string.
*
@@ -268,7 +268,7 @@
XString xstring = (XString)xstr();
xstring.appendToFsb(fsb);
}
-
+
/**
* Cast result object to a string.
@@ -279,9 +279,9 @@
public String str()
{
int node = item(0);
- return (node != DTM.NULL) ? getStringFromNode(node).toString() : "";
+ return (node != DTM.NULL) ? getStringFromNode(node).toString() : "";
}
-
+
/**
* Return a java object that's closest to the representation
* that should be handed to an extension.
@@ -291,9 +291,9 @@
public Object object()
{
if(null == m_obj)
- return this;
+ return this;
else
- return m_obj;
+ return m_obj;
}
// %REVIEW%
@@ -301,7 +301,7 @@
// /**
// * Cast result object to a result tree fragment.
// *
-// * @param support The XPath context to use for the conversion
+// * @param support The XPath context to use for the conversion
// *
// * @return the nodeset as a result tree fragment.
// */
@@ -310,7 +310,7 @@
// DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
// DocumentBuilder db = dbf.newDocumentBuilder();
// Document myDoc = db.newDocument();
-//
+//
// DocumentFragment docFrag = myDoc.createDocumentFragment();
//
// DTMIterator nl = iter();
@@ -335,7 +335,7 @@
{
return new com.sun.org.apache.xml.internal.dtm.ref.DTMNodeIterator(iter());
}
-
+
/**
* Cast result object to a nodelist.
*
@@ -348,14 +348,14 @@
com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList nodelist = new com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList(this);
// Creating a DTMNodeList has the side-effect that it will create a clone
// XNodeSet with cache and run m_iter to the end. You cannot get any node
- // from m_iter after this call. As a fix, we call SetVector() on the clone's
+ // from m_iter after this call. As a fix, we call SetVector() on the clone's
// cache. See Bugzilla 14406.
XNodeSet clone = (XNodeSet)nodelist.getDTMIterator();
SetVector(clone.getVector());
return nodelist;
}
-
+
// /**
// * Return a java object that's closest to the representation
// * that should be handed to an extension.
@@ -374,11 +374,11 @@
{
return this;
}
-
+
public void release(DTMIterator iter)
{
}
-
+
/**
* Cast result object to a nodelist.
*
@@ -388,17 +388,17 @@
{
try
{
- if(hasCache())
- return cloneWithReset();
- else
- return this; // don't bother to clone... won't do any good!
+ if(hasCache())
+ return cloneWithReset();
+ else
+ return this; // don't bother to clone... won't do any good!
}
catch (CloneNotSupportedException cnse)
{
throw new RuntimeException(cnse.getMessage());
}
}
-
+
/**
* Get a fresh copy of the object. For use with variables.
*
@@ -408,10 +408,10 @@
{
try
{
- if(hasCache())
- return (XObject)cloneWithReset();
- else
- return this; // don't bother to clone... won't do any good!
+ if(hasCache())
+ return (XObject)cloneWithReset();
+ else
+ return this; // don't bother to clone... won't do any good!
}
catch (CloneNotSupportedException cnse)
{
@@ -467,7 +467,7 @@
* @param obj2 Object to compare this nodeset to
* @param comparator Comparator to use
*
- * @return See the comments below for each object type comparison
+ * @return See the comments below for each object type comparison
*
* @throws javax.xml.transform.TransformerException
*/
@@ -482,16 +482,16 @@
{
// %OPT% This should be XMLString based instead of string based...
- // From http://www.w3.org/TR/xpath:
- // If both objects to be compared are node-sets, then the comparison
- // will be true if and only if there is a node in the first node-set
- // and a node in the second node-set such that the result of performing
+ // From http://www.w3.org/TR/xpath:
+ // If both objects to be compared are node-sets, then the comparison
+ // will be true if and only if there is a node in the first node-set
+ // and a node in the second node-set such that the result of performing
// the comparison on the string-values of the two nodes is true.
// Note this little gem from the draft:
- // NOTE: If $x is bound to a node-set, then $x="foo"
- // does not mean the same as not($x!="foo"): the former
- // is true if and only if some node in $x has the string-value
- // foo; the latter is true if and only if all nodes in $x have
+ // NOTE: If $x is bound to a node-set, then $x="foo"
+ // does not mean the same as not($x!="foo"): the former
+ // is true if and only if some node in $x has the string-value
+ // foo; the latter is true if and only if all nodes in $x have
// the string-value foo.
DTMIterator list1 = iterRaw();
DTMIterator list2 = ((XNodeSet) obj2).iterRaw();
@@ -544,11 +544,11 @@
else if (XObject.CLASS_BOOLEAN == type)
{
- // From http://www.w3.org/TR/xpath:
- // If one object to be compared is a node-set and the other is a boolean,
- // then the comparison will be true if and only if the result of
- // performing the comparison on the boolean and on the result of
- // converting the node-set to a boolean using the boolean function
+ // From http://www.w3.org/TR/xpath:
+ // If one object to be compared is a node-set and the other is a boolean,
+ // then the comparison will be true if and only if the result of
+ // performing the comparison on the boolean and on the result of
+ // converting the node-set to a boolean using the boolean function
// is true.
double num1 = bool() ? 1.0 : 0.0;
double num2 = obj2.num();
@@ -558,13 +558,13 @@
else if (XObject.CLASS_NUMBER == type)
{
- // From http://www.w3.org/TR/xpath:
- // If one object to be compared is a node-set and the other is a number,
- // then the comparison will be true if and only if there is a
- // node in the node-set such that the result of performing the
- // comparison on the number to be compared and on the result of
- // converting the string-value of that node to a number using
- // the number function is true.
+ // From http://www.w3.org/TR/xpath:
+ // If one object to be compared is a node-set and the other is a number,
+ // then the comparison will be true if and only if there is a
+ // node in the node-set such that the result of performing the
+ // comparison on the number to be compared and on the result of
+ // converting the string-value of that node to a number using
+ // the number function is true.
DTMIterator list1 = iterRaw();
double num2 = obj2.num();
int node;
@@ -604,12 +604,12 @@
else if (XObject.CLASS_STRING == type)
{
- // From http://www.w3.org/TR/xpath:
- // If one object to be compared is a node-set and the other is a
- // string, then the comparison will be true if and only if there
- // is a node in the node-set such that the result of performing
- // the comparison on the string-value of the node and the other
- // string is true.
+ // From http://www.w3.org/TR/xpath:
+ // If one object to be compared is a node-set and the other is a
+ // string, then the comparison will be true if and only if there
+ // is a node in the node-set such that the result of performing
+ // the comparison on the string-value of the node and the other
+ // string is true.
XMLString s2 = obj2.xstr();
DTMIterator list1 = iterRaw();
int node;
@@ -639,7 +639,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -653,7 +653,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -667,7 +667,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -681,7 +681,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -696,7 +696,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -717,7 +717,7 @@
*
* @param obj2 object to compare this nodeset to
*
- * @return see this.compare(...)
+ * @return see this.compare(...)
*
* @throws javax.xml.transform.TransformerException
*/
@@ -738,7 +738,7 @@
*
*
* @param s1 First string to compare
- * @param s2 Second String to compare
+ * @param s2 Second String to compare
*
* @return Whether the strings are equal or not
*/
@@ -767,7 +767,7 @@
*
*
* @param s1 First string to compare
- * @param s2 Second String to compare
+ * @param s2 Second String to compare
*
* @return True if s1 is less than s2
*/
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNodeSetForDOM.java Wed May 02 13:32:36 2012 +0100
@@ -31,7 +31,7 @@
import org.w3c.dom.traversal.NodeIterator;
/**
- * This class overrides the XNodeSet#object() method to provide the original
+ * This class overrides the XNodeSet#object() method to provide the original
* Node object, NodeList object, or NodeIterator.
*/
public class XNodeSetForDOM extends XNodeSet
@@ -47,7 +47,7 @@
setObject(new NodeSetDTM(dtmMgr));
((NodeSetDTM) m_obj).addNode(dtmHandle);
}
-
+
/**
* Construct a XNodeSet object.
*
@@ -55,11 +55,11 @@
*/
public XNodeSetForDOM(XNodeSet val)
{
- super(val);
- if(val instanceof XNodeSetForDOM)
- m_origObj = ((XNodeSetForDOM)val).m_origObj;
+ super(val);
+ if(val instanceof XNodeSetForDOM)
+ m_origObj = ((XNodeSetForDOM)val).m_origObj;
}
-
+
public XNodeSetForDOM(NodeList nodeList, XPathContext xctxt)
{
m_dtmMgr = xctxt.getDTMManager();
@@ -87,7 +87,7 @@
m_last=nsdtm.getLength();
setObject(nsdtm);
}
-
+
/**
* Return the original DOM object that the user passed in. For use primarily
* by the extension mechanism.
@@ -98,7 +98,7 @@
{
return m_origObj;
}
-
+
/**
* Cast result object to a nodelist. Always issues an error.
*
@@ -108,10 +108,10 @@
*/
public NodeIterator nodeset() throws javax.xml.transform.TransformerException
{
- return (m_origObj instanceof NodeIterator)
- ? (NodeIterator)m_origObj : super.nodeset();
+ return (m_origObj instanceof NodeIterator)
+ ? (NodeIterator)m_origObj : super.nodeset();
}
-
+
/**
* Cast result object to a nodelist. Always issues an error.
*
@@ -121,8 +121,8 @@
*/
public NodeList nodelist() throws javax.xml.transform.TransformerException
{
- return (m_origObj instanceof NodeList)
- ? (NodeList)m_origObj : super.nodelist();
+ return (m_origObj instanceof NodeList)
+ ? (NodeList)m_origObj : super.nodelist();
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNumber.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNumber.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XNumber.java Wed May 02 13:32:36 2012 +0100
@@ -50,7 +50,7 @@
m_val = d;
}
-
+
/**
* Construct a XNodeSet object.
*
@@ -68,7 +68,7 @@
/**
* Tell that this is a CLASS_NUMBER.
*
- * @return node type CLASS_NUMBER
+ * @return node type CLASS_NUMBER
*/
public int getType()
{
@@ -79,7 +79,7 @@
* Given a request type, return the equivalent string.
* For diagnostic purposes.
*
- * @return type string "#NUMBER"
+ * @return type string "#NUMBER"
*/
public String getTypeString()
{
@@ -95,7 +95,7 @@
{
return m_val;
}
-
+
/**
* Evaluate expression to a number.
*
@@ -103,7 +103,7 @@
*
* @throws javax.xml.transform.TransformerException
*/
- public double num(XPathContext xctxt)
+ public double num(XPathContext xctxt)
throws javax.xml.transform.TransformerException
{
@@ -238,7 +238,7 @@
// len = s.length();
// }
//
-// // Account for exponent by adding zeros as needed
+// // Account for exponent by adding zeros as needed
// // and moving the decimal place
//
// if (exp == 0)
@@ -337,7 +337,7 @@
// Eliminate trailing 0's - bugzilla 14241
while (s.charAt(e-1) == '0')
e--;
-
+
if (exp > 0)
return sign + s.substring(0, 1) + s.substring(2, 2 + exp) + "."
+ s.substring(2 + exp, e);
@@ -388,37 +388,37 @@
*
* @param obj2 Object to compare this to
*
- * @return true if the two objects are equal
+ * @return true if the two objects are equal
*
* @throws javax.xml.transform.TransformerException
*/
public boolean equals(XObject obj2)
{
- // In order to handle the 'all' semantics of
- // nodeset comparisons, we always call the
+ // In order to handle the 'all' semantics of
+ // nodeset comparisons, we always call the
// nodeset function.
int t = obj2.getType();
try
{
- if (t == XObject.CLASS_NODESET)
- return obj2.equals(this);
- else if(t == XObject.CLASS_BOOLEAN)
- return obj2.bool() == bool();
- else
- return m_val == obj2.num();
+ if (t == XObject.CLASS_NODESET)
+ return obj2.equals(this);
+ else if(t == XObject.CLASS_BOOLEAN)
+ return obj2.bool() == bool();
+ else
+ return m_val == obj2.num();
}
catch(javax.xml.transform.TransformerException te)
{
throw new com.sun.org.apache.xml.internal.utils.WrappedRuntimeException(te);
}
}
-
+
/**
- * Tell if this expression returns a stable number that will not change during
- * iterations within the expression. This is used to determine if a proximity
+ * Tell if this expression returns a stable number that will not change during
+ * iterations within the expression. This is used to determine if a proximity
* position predicate can indicate that no more searching has to occur.
- *
+ *
*
* @return true if the expression represents a stable number.
*/
@@ -426,13 +426,13 @@
{
return true;
}
-
+
/**
* @see com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
- visitor.visitNumberLiteral(owner, this);
+ visitor.visitNumberLiteral(owner, this);
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XObject.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XObject.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XObject.java Wed May 02 13:32:36 2012 +0100
@@ -739,23 +739,23 @@
*/
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)
{
- assertion(false, "callVisitors should not be called for this object!!!");
+ assertion(false, "callVisitors should not be called for this object!!!");
}
/**
* @see Expression#deepEquals(Expression)
*/
public boolean deepEquals(Expression expr)
{
- if(!isSameClass(expr))
- return false;
+ if(!isSameClass(expr))
+ return false;
- // If equals at the expression level calls deepEquals, I think we're
- // still safe from infinite recursion since this object overrides
- // equals. I hope.
- if(!this.equals((XObject)expr))
- return false;
+ // If equals at the expression level calls deepEquals, I think we're
+ // still safe from infinite recursion since this object overrides
+ // equals. I hope.
+ if(!this.equals((XObject)expr))
+ return false;
- return true;
+ return true;
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XRTreeFrag.java Wed May 02 13:32:36 2012 +0100
@@ -53,19 +53,19 @@
{
super(null);
exprSetParent(parent);
- initDTM(root, xctxt);
+ initDTM(root, xctxt);
}
-
+
/**
* Create an XRTreeFrag Object.
*
*/
public XRTreeFrag(int root, XPathContext xctxt)
{
- super(null);
- initDTM(root, xctxt);
+ super(null);
+ initDTM(root, xctxt);
}
-
+
private final void initDTM(int root, XPathContext xctxt){
m_dtmRoot = root;
final DTM dtm = xctxt.getDTM(root);
@@ -73,7 +73,7 @@
m_DTMXRTreeFrag = xctxt.getDTMXRTreeFrag(xctxt.getDTMIdentity(dtm));
}
}
-
+
/**
* Return a java object that's closest to the representation
* that should be handed to an extension.
@@ -87,7 +87,7 @@
else
return super.object();
}
-
+
/**
* Create an XRTreeFrag Object.
*
@@ -96,11 +96,11 @@
{
super(expr);
}
-
+
/**
* Specify if it's OK for detach to release the iterator for reuse.
- *
- * @param allowRelease true if it is OK for detach to release this iterator
+ *
+ * @param allowRelease true if it is OK for detach to release this iterator
* for pooling.
*/
public void allowDetachToRelease(boolean allowRelease)
@@ -114,20 +114,20 @@
* in the INVALID state. After detach
has been invoked,
* calls to nextNode
or previousNode
will
* raise a runtime exception.
- *
+ *
* In general, detach should only be called once on the object.
*/
public void detach(){
if(m_allowRelease){
- m_DTMXRTreeFrag.destruct();
+ m_DTMXRTreeFrag.destruct();
setObject(null);
}
}
-
+
/**
* Tell what kind of class this is.
*
- * @return type CLASS_RTREEFRAG
+ * @return type CLASS_RTREEFRAG
*/
public int getType()
{
@@ -169,22 +169,22 @@
{
return true;
}
-
+
private XMLString m_xmlStr = null;
-
+
/**
* Cast result object to an XMLString.
*
- * @return The document fragment node data or the empty string.
+ * @return The document fragment node data or the empty string.
*/
public XMLString xstr()
{
if(null == m_xmlStr)
m_xmlStr = m_DTMXRTreeFrag.getDTM().getStringValue(m_dtmRoot);
-
+
return m_xmlStr;
}
-
+
/**
* Cast result object to a string.
*
@@ -200,7 +200,7 @@
/**
* Cast result object to a string.
*
- * @return The document fragment node data or the empty string.
+ * @return The document fragment node data or the empty string.
*/
public String str()
{
@@ -222,7 +222,7 @@
/**
* Cast result object to a DTMIterator.
* dml - modified to return an RTFIterator for
- * benefit of EXSLT object-type function in
+ * benefit of EXSLT object-type function in
* {@link com.sun.org.apache.xalan.internal.lib.ExsltCommon}.
* @return The document fragment as a DTMIterator
*/
@@ -261,9 +261,9 @@
{
if (XObject.CLASS_NODESET == obj2.getType())
{
-
- // In order to handle the 'all' semantics of
- // nodeset comparisons, we always call the
+
+ // In order to handle the 'all' semantics of
+ // nodeset comparisons, we always call the
// nodeset function.
return obj2.equals(this);
}
@@ -285,7 +285,7 @@
}
else if (XObject.CLASS_RTREEFRAG == obj2.getType())
{
-
+
// Probably not so good. Think about this.
return xstr().equals(obj2.xstr());
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XString.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XString.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XString.java Wed May 02 13:32:36 2012 +0100
@@ -321,6 +321,22 @@
return xstr().equals(obj2.xstr());
}
+ /**
+ * Compares this string to the specified String
.
+ * The result is true
if and only if the argument is not
+ * null
and is a String
object that represents
+ * the same sequence of characters as this object.
+ *
+ * @param obj2 the object to compare this String
against.
+ * @return true
if the String
s are equal;
+ * false
otherwise.
+ * @see java.lang.String#compareTo(java.lang.String)
+ * @see java.lang.String#equalsIgnoreCase(java.lang.String)
+ */
+ public boolean equals(String obj2) {
+ return str().equals(obj2);
+ }
+
/**
* Compares this string to the specified object.
* The result is true
if and only if the argument is not
@@ -336,11 +352,14 @@
*/
public boolean equals(XMLString obj2)
{
-
- if (!obj2.hasString())
- return obj2.equals(this);
- else
- return str().equals(obj2.toString());
+ if (obj2 != null) {
+ if (!obj2.hasString()) {
+ return obj2.equals(str());
+ } else {
+ return str().equals(obj2.toString());
+ }
+ }
+ return false;
}
/**
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/objects/XStringForFSB.java Wed May 02 13:32:36 2012 +0100
@@ -979,7 +979,7 @@
return Double.NaN;
try {
- return new Double(valueString).doubleValue();
+ return Double.parseDouble(valueString);
} catch (NumberFormatException nfe) {
// This should catch double periods, empty strings.
return Double.NaN;
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/patterns/StepPattern.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/patterns/StepPattern.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/patterns/StepPattern.java Wed May 02 13:32:36 2012 +0100
@@ -857,7 +857,7 @@
}
else
{
- buf.append("?" + Integer.toHexString(pat.m_whatToShow));
+ buf.append('?').append(Integer.toHexString(pat.m_whatToShow));
}
if (null != pat.m_predicates)
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() not supported by XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() not supported by XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() not supported by XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() not supported by XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() not supported by XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() not supported by XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() not supported by XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() not supported by XRTreeFragSelectWrapper"},
+ "str() not supported by XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() not supported for XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a boolean."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a single node. The method getSingleNodeValue applies only to types ANY_UNORDERED_NODE_TYPE and FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Unknown error in XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a number"},
+ "The XPathResult of XPath expression ''{0}'' has an XPathResultType of {1} which cannot be converted to a number"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: Cannot set the feature to false when security manager is present: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_de.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
+ "str() nicht unterst\u00FCtzt von XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() nicht unterst\u00FCtzt f\u00FCr XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPathResult von XPath-Ausdruck \"{0}\" hat XPathResultType {1}, der nicht in einen booleschen Wert konvertiert werden kann."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPathResult von XPath-Ausdruck \"{0}\" hat XPathResultType {1}, der nicht in einen einzelnen Knoten konvertiert werden kann. Die Methode \"getSingleNodeValue\" gilt nur f\u00FCr die Typen ANY_UNORDERED_NODE_TYPE und FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Unbekannter Fehler in XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPathResult von XPath-Ausdruck \"{0}\" hat XPathResultType {1}, der nicht in eine Zahl konvertiert werden kann"},
+ "XPathResult von XPath-Ausdruck \"{0}\" hat XPathResultType {1}, der nicht in eine Zahl konvertiert werden kann"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: Feature kann nicht auf \"false\" gesetzt werden, wenn Security Manager vorhanden ist: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_es.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() no soportado por XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() no soportado por XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() no soportado por XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() no soportado por XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() no soportado por XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() no soportado por XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() no soportado por XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() no soportado por XRTreeFragSelectWrapper"},
+ "str() no soportado por XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() no soportado para XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en un valor booleano."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir a un nodo \u00FAnico. El m\u00E9todo getSingleNodeValue se aplica s\u00F3lo a los tipos ANY_UNORDERED_NODE_TYPE y FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Error desconocido en XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en un n\u00FAmero"},
+ "El valor de XPathResult de la expresi\u00F3n XPath ''{0}'' tiene un valor de XPathResultType de {1} que no se puede convertir en un n\u00FAmero"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: no se puede definir la funci\u00F3n en false cuando est\u00E1 presente el gestor de seguridad: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_fr.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() non pris en charge par XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() non pris en charge par XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() non pris en charge par XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() non pris en charge par XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() non pris en charge par XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() non pris en charge par XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() non pris en charge par XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() non pris en charge par XRTreeFragSelectWrapper"},
+ "str() non pris en charge par XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() non pris en charge pour XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en valeur bool\u00E9enne."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en noeud unique. La m\u00E9thode getSingleNodeValue est applicable uniquement aux types ANY_UNORDERED_NODE_TYPE et FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Erreur inconnue d\u00E9tect\u00E9e dans XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en nombre"},
+ "L''\u00E9l\u00E9ment XPathResult de l''expression XPath ''{0}'' comporte un \u00E9l\u00E9ment XPathResultType de {1} qui ne peut pas \u00EAtre converti en nombre"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING : impossible de d\u00E9finir la fonctionnalit\u00E9 sur False en pr\u00E9sence du gestionnaire de s\u00E9curit\u00E9 : {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_it.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() non supportato da XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() non supportato da XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() non supportato da XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() non supportato da XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() non supportato da XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() non supportato da XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() non supportato da XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() non supportato da XRTreeFragSelectWrapper"},
+ "str() non supportato da XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() non supportato per XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un valore booleano."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un nodo singolo. Il metodo getSingleNodeValue \u00E8 valido solo per i tipi ANY_UNORDERED_NODE_TYPE e FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Errore sconosciuto nell'XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un numero."},
+ "XPathResult dell''espressione XPath ''{0}'' a un valore di XPathResultType pari a {1} che non pu\u00F2 essere convertito in un numero."},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: impossibile impostare la funzione su false se \u00E8 presente Security Manager: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ja.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
+ "str()\u306FXRTreeFragSelectWrapper\u306B\u3088\u3063\u3066\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb()\u306FXStringForChars\u7528\u306B\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPath\u5F0F''{0}''\u306EXPathResult\u306F\u3001boolean\u306B\u5909\u63DB\u3067\u304D\u306A\u3044{1}\u306EXPathResultType\u3067\u3059\u3002"},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPath\u5F0F''{0}''\u306EXPathResult\u306F\u3001\u5358\u4E00\u30CE\u30FC\u30C9\u306B\u5909\u63DB\u3067\u304D\u306A\u3044{1}\u306EXPathResultType\u3067\u3059\u3002\u30E1\u30BD\u30C3\u30C9getSingleNodeValue\u306F\u3001ANY_UNORDERED_NODE_TYPE\u30BF\u30A4\u30D7\u304A\u3088\u3073FIRST_ORDERED_NODE_TYPE\u30BF\u30A4\u30D7\u306B\u306E\u307F\u9069\u7528\u3055\u308C\u307E\u3059\u3002"},
@@ -749,7 +749,7 @@
"XPath\u306B\u4E0D\u660E\u306A\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002"},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPath\u5F0F''{0}''\u306EXPathResult\u306F\u3001\u6570\u5024\u306B\u5909\u63DB\u3067\u304D\u306A\u3044{1}\u306EXPathResultType\u3092\u6301\u3061\u307E\u3059"},
+ "XPath\u5F0F''{0}''\u306EXPathResult\u306F\u3001\u6570\u5024\u306B\u5909\u63DB\u3067\u304D\u306A\u3044{1}\u306EXPathResultType\u3092\u6301\u3061\u307E\u3059"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: \u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u304C\u5B58\u5728\u3059\u308B\u3068\u304D\u3001\u6A5F\u80FD\u3092false\u306B\u8A2D\u5B9A\u3067\u304D\u307E\u305B\u3093: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_ko.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"XRTreeFragSelectWrapper\uB294 asNodeIterator()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper\uB294 detach()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper\uB294 detach()\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper\uB294 num()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper\uB294 num()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper\uB294 xstr()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper\uB294 xstr()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper\uB294 str()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
+ "XRTreeFragSelectWrapper\uB294 str()\uC744 \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb()\uB294 XStringForChars\uC5D0 \uB300\uD574 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uBD80\uC6B8\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uB2E8\uC77C \uB178\uB4DC\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4. getSingleNodeValue \uBA54\uC18C\uB4DC\uB294 ANY_UNORDERED_NODE_TYPE \uBC0F FIRST_ORDERED_NODE_TYPE \uC720\uD615\uC5D0\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."},
@@ -749,7 +749,7 @@
"XPath\uC5D0 \uC54C \uC218 \uC5C6\uB294 \uC624\uB958\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uC22B\uC790\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."},
+ "XPath \uD45C\uD604\uC2DD ''{0}''\uC5D0 \uB300\uD55C XPathResult\uC758 XPathResultType\uC774 \uC22B\uC790\uB85C \uBCC0\uD658\uB420 \uC218 \uC5C6\uB294 {1}\uC785\uB2C8\uB2E4."},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: \uBCF4\uC548 \uAD00\uB9AC\uC790\uAC00 \uC788\uC744 \uACBD\uC6B0 \uAE30\uB2A5\uC744 false\uB85C \uC124\uC815\uD560 \uC218 \uC5C6\uC74C: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_pt_BR.java Wed May 02 13:32:36 2012 +0100
@@ -88,182 +88,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -273,20 +273,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -295,8 +295,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -322,42 +322,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -581,22 +581,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() n\u00E3o suportado por XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() n\u00E3o suportado por XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() n\u00E3o suportado por XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() n\u00E3o suportado por XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() n\u00E3o suportado por XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() n\u00E3o suportado por XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() n\u00E3o suportado por XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() n\u00E3o suportado por XRTreeFragSelectWrapper"},
+ "str() n\u00E3o suportado por XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() n\u00E3o suportado para XStringForChars"},
@@ -692,7 +692,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"O XPathResult da express\u00E3o de XPath ''{0}'' tem um XPathResultType de {1} que n\u00E3o pode ser convertido em um booliano."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"O XPathResult da express\u00E3o de XPath ''{0}'' tem um XPathResultType de {1} que n\u00E3o pode ser convertido em um n\u00F3 simples. O m\u00E9todo getSingleNodeValue aplica-se somente aos tipos ANY_UNORDERED_NODE_TYPE e FIRST_ORDERED_NODE_TYPE."},
@@ -750,7 +750,7 @@
"Erro desconhecido no XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "O XPathResult da express\u00E3o XPath ''{0}'' tem um XPathResultType {1} que n\u00E3o pode ser convertido em n\u00FAmero."},
+ "O XPathResult da express\u00E3o XPath ''{0}'' tem um XPathResultType {1} que n\u00E3o pode ser convertido em n\u00FAmero."},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -816,7 +816,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: N\u00E3o \u00E9 poss\u00EDvel definir o recurso como falso quando o gerenciador de seguran\u00E7a est\u00E1 presente: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_sv.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"asNodeIterator() st\u00F6ds inte av XRTreeFragSelectWrapper"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "detach() st\u00F6ds inte av XRTreeFragSelectWrapper"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "detach() st\u00F6ds inte av XRTreeFragSelectWrapper"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "num() st\u00F6ds inte av XRTreeFragSelectWrapper"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "num() st\u00F6ds inte av XRTreeFragSelectWrapper"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "xstr() st\u00F6ds inte av XRTreeFragSelectWrapper"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "xstr() st\u00F6ds inte av XRTreeFragSelectWrapper"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "str() st\u00F6ds inte av XRTreeFragSelectWrapper"},
+ "str() st\u00F6ds inte av XRTreeFragSelectWrapper"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"fsb() st\u00F6ds inte f\u00F6r XStringForChars"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till booleskt v\u00E4rde."},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till enskild nod. Metoden getSingleNodeValue anv\u00E4nds endast till typ ANY_UNORDERED_NODE_TYPE och FIRST_ORDERED_NODE_TYPE."},
@@ -749,7 +749,7 @@
"Ok\u00E4nt fel i XPath."},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till ett tal."},
+ "XPathResult i XPath-uttrycket ''{0}'' inneh\u00E5ller XPathResultType {1} som inte kan konverteras till ett tal."},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: Kan inte ange funktionen som false om s\u00E4kerhetshanteraren anv\u00E4nds: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_CN.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"XRTreeFragSelectWrapper \u4E0D\u652F\u6301 asNodeIterator()"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 detach()"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 detach()"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 num()"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 num()"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 xstr()"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 xstr()"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 str()"},
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u6301 str()"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"XStringForChars \u4E0D\u652F\u6301 fsb()"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPath \u8868\u8FBE\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709{1}\u7C7B\u578B\u7684 XPathResultType, \u65E0\u6CD5\u5C06\u6B64 XPathResultType \u8F6C\u6362\u4E3A boolean\u3002"},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPath \u8868\u8FBE\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709{1}\u7C7B\u578B\u7684 XPathResultType, \u65E0\u6CD5\u5C06\u6B64 XPathResultType \u8F6C\u6362\u4E3A\u5355\u4E00\u8282\u70B9\u3002\u65B9\u6CD5 getSingleNodeValue \u4EC5\u9002\u7528\u4E8E\u7C7B\u578B ANY_UNORDERED_NODE_TYPE \u548C FIRST_ORDERED_NODE_TYPE\u3002"},
@@ -749,7 +749,7 @@
"XPath \u4E2D\u5B58\u5728\u672A\u77E5\u9519\u8BEF\u3002"},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPath \u8868\u8FBE\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709{1}\u7C7B\u578B\u7684 XPathResultType, \u65E0\u6CD5\u5C06\u6B64 XPathResultType \u8F6C\u6362\u4E3A\u6570\u5B57"},
+ "XPath \u8868\u8FBE\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709{1}\u7C7B\u578B\u7684 XPathResultType, \u65E0\u6CD5\u5C06\u6B64 XPathResultType \u8F6C\u6362\u4E3A\u6570\u5B57"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: \u5B58\u5728 Security Manager \u65F6, \u65E0\u6CD5\u5C06\u6B64\u529F\u80FD\u8BBE\u7F6E\u4E3A\u201C\u5047\u201D: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java
--- a/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/org/apache/xpath/internal/res/XPATHErrorResources_zh_TW.java Wed May 02 13:32:36 2012 +0100
@@ -87,182 +87,182 @@
* 11) QName is an XML term meaning "qualified name".
*/
- /*
+ /*
* static variables
*/
public static final String ERROR0000 = "ERROR0000";
- public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
- "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
- public static final String ER_CURRENT_TAKES_NO_ARGS =
- "ER_CURRENT_TAKES_NO_ARGS";
+ public static final String ER_CURRENT_NOT_ALLOWED_IN_MATCH =
+ "ER_CURRENT_NOT_ALLOWED_IN_MATCH";
+ public static final String ER_CURRENT_TAKES_NO_ARGS =
+ "ER_CURRENT_TAKES_NO_ARGS";
public static final String ER_DOCUMENT_REPLACED = "ER_DOCUMENT_REPLACED";
- public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
- "ER_CONTEXT_HAS_NO_OWNERDOC";
- public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
- "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
- public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
- "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
- public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
- "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
- public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
- "ER_NUMBER_HAS_TOO_MANY_ARGS";
- public static final String ER_NAME_HAS_TOO_MANY_ARGS =
- "ER_NAME_HAS_TOO_MANY_ARGS";
- public static final String ER_STRING_HAS_TOO_MANY_ARGS =
- "ER_STRING_HAS_TOO_MANY_ARGS";
- public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
- "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
- public static final String ER_TRANSLATE_TAKES_3_ARGS =
- "ER_TRANSLATE_TAKES_3_ARGS";
- public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
- "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
- public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
- "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
+ public static final String ER_CONTEXT_HAS_NO_OWNERDOC =
+ "ER_CONTEXT_HAS_NO_OWNERDOC";
+ public static final String ER_LOCALNAME_HAS_TOO_MANY_ARGS =
+ "ER_LOCALNAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAMESPACEURI_HAS_TOO_MANY_ARGS =
+ "ER_NAMESPACEURI_HAS_TOO_MANY_ARGS";
+ public static final String ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS =
+ "ER_NORMALIZESPACE_HAS_TOO_MANY_ARGS";
+ public static final String ER_NUMBER_HAS_TOO_MANY_ARGS =
+ "ER_NUMBER_HAS_TOO_MANY_ARGS";
+ public static final String ER_NAME_HAS_TOO_MANY_ARGS =
+ "ER_NAME_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRING_HAS_TOO_MANY_ARGS =
+ "ER_STRING_HAS_TOO_MANY_ARGS";
+ public static final String ER_STRINGLENGTH_HAS_TOO_MANY_ARGS =
+ "ER_STRINGLENGTH_HAS_TOO_MANY_ARGS";
+ public static final String ER_TRANSLATE_TAKES_3_ARGS =
+ "ER_TRANSLATE_TAKES_3_ARGS";
+ public static final String ER_UNPARSEDENTITYURI_TAKES_1_ARG =
+ "ER_UNPARSEDENTITYURI_TAKES_1_ARG";
+ public static final String ER_NAMESPACEAXIS_NOT_IMPLEMENTED =
+ "ER_NAMESPACEAXIS_NOT_IMPLEMENTED";
public static final String ER_UNKNOWN_AXIS = "ER_UNKNOWN_AXIS";
- public static final String ER_UNKNOWN_MATCH_OPERATION =
- "ER_UNKNOWN_MATCH_OPERATION";
+ public static final String ER_UNKNOWN_MATCH_OPERATION =
+ "ER_UNKNOWN_MATCH_OPERATION";
public static final String ER_INCORRECT_ARG_LENGTH ="ER_INCORRECT_ARG_LENGTH";
- public static final String ER_CANT_CONVERT_TO_NUMBER =
- "ER_CANT_CONVERT_TO_NUMBER";
- public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
- "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
- public static final String ER_CANT_CONVERT_TO_NODELIST =
- "ER_CANT_CONVERT_TO_NODELIST";
- public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
- "ER_CANT_CONVERT_TO_MUTABLENODELIST";
+ public static final String ER_CANT_CONVERT_TO_NUMBER =
+ "ER_CANT_CONVERT_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER =
+ "ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER";
+ public static final String ER_CANT_CONVERT_TO_NODELIST =
+ "ER_CANT_CONVERT_TO_NODELIST";
+ public static final String ER_CANT_CONVERT_TO_MUTABLENODELIST =
+ "ER_CANT_CONVERT_TO_MUTABLENODELIST";
public static final String ER_CANT_CONVERT_TO_TYPE ="ER_CANT_CONVERT_TO_TYPE";
- public static final String ER_EXPECTED_MATCH_PATTERN =
- "ER_EXPECTED_MATCH_PATTERN";
- public static final String ER_COULDNOT_GET_VAR_NAMED =
- "ER_COULDNOT_GET_VAR_NAMED";
+ public static final String ER_EXPECTED_MATCH_PATTERN =
+ "ER_EXPECTED_MATCH_PATTERN";
+ public static final String ER_COULDNOT_GET_VAR_NAMED =
+ "ER_COULDNOT_GET_VAR_NAMED";
public static final String ER_UNKNOWN_OPCODE = "ER_UNKNOWN_OPCODE";
public static final String ER_EXTRA_ILLEGAL_TOKENS ="ER_EXTRA_ILLEGAL_TOKENS";
- public static final String ER_EXPECTED_DOUBLE_QUOTE =
- "ER_EXPECTED_DOUBLE_QUOTE";
- public static final String ER_EXPECTED_SINGLE_QUOTE =
- "ER_EXPECTED_SINGLE_QUOTE";
+ public static final String ER_EXPECTED_DOUBLE_QUOTE =
+ "ER_EXPECTED_DOUBLE_QUOTE";
+ public static final String ER_EXPECTED_SINGLE_QUOTE =
+ "ER_EXPECTED_SINGLE_QUOTE";
public static final String ER_EMPTY_EXPRESSION = "ER_EMPTY_EXPRESSION";
public static final String ER_EXPECTED_BUT_FOUND = "ER_EXPECTED_BUT_FOUND";
- public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
- "ER_INCORRECT_PROGRAMMER_ASSERTION";
- public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
- "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
- public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
- "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
- public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
- "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
- public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
- "ER_PREDICATE_ILLEGAL_SYNTAX";
+ public static final String ER_INCORRECT_PROGRAMMER_ASSERTION =
+ "ER_INCORRECT_PROGRAMMER_ASSERTION";
+ public static final String ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL =
+ "ER_BOOLEAN_ARG_NO_LONGER_OPTIONAL";
+ public static final String ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_PRECEDING_ARG";
+ public static final String ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG =
+ "ER_FOUND_COMMA_BUT_NO_FOLLOWING_ARG";
+ public static final String ER_PREDICATE_ILLEGAL_SYNTAX =
+ "ER_PREDICATE_ILLEGAL_SYNTAX";
public static final String ER_ILLEGAL_AXIS_NAME = "ER_ILLEGAL_AXIS_NAME";
public static final String ER_UNKNOWN_NODETYPE = "ER_UNKNOWN_NODETYPE";
- public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
- "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
- public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
- "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
- public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
- "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
- public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
- "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
- public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
- "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
+ public static final String ER_PATTERN_LITERAL_NEEDS_BE_QUOTED =
+ "ER_PATTERN_LITERAL_NEEDS_BE_QUOTED";
+ public static final String ER_COULDNOT_BE_FORMATTED_TO_NUMBER =
+ "ER_COULDNOT_BE_FORMATTED_TO_NUMBER";
+ public static final String ER_COULDNOT_CREATE_XMLPROCESSORLIAISON =
+ "ER_COULDNOT_CREATE_XMLPROCESSORLIAISON";
+ public static final String ER_DIDNOT_FIND_XPATH_SELECT_EXP =
+ "ER_DIDNOT_FIND_XPATH_SELECT_EXP";
+ public static final String ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH =
+ "ER_COULDNOT_FIND_ENDOP_AFTER_OPLOCATIONPATH";
public static final String ER_ERROR_OCCURED = "ER_ERROR_OCCURED";
- public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
- "ER_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String ER_ILLEGAL_VARIABLE_REFERENCE =
+ "ER_ILLEGAL_VARIABLE_REFERENCE";
public static final String ER_AXES_NOT_ALLOWED = "ER_AXES_NOT_ALLOWED";
- public static final String ER_KEY_HAS_TOO_MANY_ARGS =
- "ER_KEY_HAS_TOO_MANY_ARGS";
+ public static final String ER_KEY_HAS_TOO_MANY_ARGS =
+ "ER_KEY_HAS_TOO_MANY_ARGS";
public static final String ER_COUNT_TAKES_1_ARG = "ER_COUNT_TAKES_1_ARG";
- public static final String ER_COULDNOT_FIND_FUNCTION =
- "ER_COULDNOT_FIND_FUNCTION";
+ public static final String ER_COULDNOT_FIND_FUNCTION =
+ "ER_COULDNOT_FIND_FUNCTION";
public static final String ER_UNSUPPORTED_ENCODING ="ER_UNSUPPORTED_ENCODING";
- public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
- "ER_PROBLEM_IN_DTM_NEXTSIBLING";
- public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
- "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
- public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
- "ER_SETDOMFACTORY_NOT_SUPPORTED";
+ public static final String ER_PROBLEM_IN_DTM_NEXTSIBLING =
+ "ER_PROBLEM_IN_DTM_NEXTSIBLING";
+ public static final String ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL =
+ "ER_CANNOT_WRITE_TO_EMPTYNODELISTIMPL";
+ public static final String ER_SETDOMFACTORY_NOT_SUPPORTED =
+ "ER_SETDOMFACTORY_NOT_SUPPORTED";
public static final String ER_PREFIX_MUST_RESOLVE = "ER_PREFIX_MUST_RESOLVE";
public static final String ER_PARSE_NOT_SUPPORTED = "ER_PARSE_NOT_SUPPORTED";
public static final String ER_SAX_API_NOT_HANDLED = "ER_SAX_API_NOT_HANDLED";
-public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
- "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
- public static final String ER_DTM_CANNOT_HANDLE_NODES =
- "ER_DTM_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_CANNOT_HANDLE_NODES =
- "ER_XERCES_CANNOT_HANDLE_NODES";
- public static final String ER_XERCES_PARSE_ERROR_DETAILS =
- "ER_XERCES_PARSE_ERROR_DETAILS";
+public static final String ER_IGNORABLE_WHITESPACE_NOT_HANDLED =
+ "ER_IGNORABLE_WHITESPACE_NOT_HANDLED";
+ public static final String ER_DTM_CANNOT_HANDLE_NODES =
+ "ER_DTM_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_CANNOT_HANDLE_NODES =
+ "ER_XERCES_CANNOT_HANDLE_NODES";
+ public static final String ER_XERCES_PARSE_ERROR_DETAILS =
+ "ER_XERCES_PARSE_ERROR_DETAILS";
public static final String ER_XERCES_PARSE_ERROR = "ER_XERCES_PARSE_ERROR";
- public static final String ER_INVALID_UTF16_SURROGATE =
- "ER_INVALID_UTF16_SURROGATE";
+ public static final String ER_INVALID_UTF16_SURROGATE =
+ "ER_INVALID_UTF16_SURROGATE";
public static final String ER_OIERROR = "ER_OIERROR";
public static final String ER_CANNOT_CREATE_URL = "ER_CANNOT_CREATE_URL";
public static final String ER_XPATH_READOBJECT = "ER_XPATH_READOBJECT";
- public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
- "ER_FUNCTION_TOKEN_NOT_FOUND";
- public static final String ER_CANNOT_DEAL_XPATH_TYPE =
- "ER_CANNOT_DEAL_XPATH_TYPE";
+ public static final String ER_FUNCTION_TOKEN_NOT_FOUND =
+ "ER_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String ER_CANNOT_DEAL_XPATH_TYPE =
+ "ER_CANNOT_DEAL_XPATH_TYPE";
public static final String ER_NODESET_NOT_MUTABLE = "ER_NODESET_NOT_MUTABLE";
- public static final String ER_NODESETDTM_NOT_MUTABLE =
- "ER_NODESETDTM_NOT_MUTABLE";
+ public static final String ER_NODESETDTM_NOT_MUTABLE =
+ "ER_NODESETDTM_NOT_MUTABLE";
/** Variable not resolvable: */
public static final String ER_VAR_NOT_RESOLVABLE = "ER_VAR_NOT_RESOLVABLE";
/** Null error handler */
public static final String ER_NULL_ERROR_HANDLER = "ER_NULL_ERROR_HANDLER";
/** Programmer's assertion: unknown opcode */
- public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
- "ER_PROG_ASSERT_UNKNOWN_OPCODE";
+ public static final String ER_PROG_ASSERT_UNKNOWN_OPCODE =
+ "ER_PROG_ASSERT_UNKNOWN_OPCODE";
/** 0 or 1 */
public static final String ER_ZERO_OR_ONE = "ER_ZERO_OR_ONE";
/** rtf() not supported by XRTreeFragSelectWrapper */
- public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ public static final String ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
+ "ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** asNodeIterator() not supported by XRTreeFragSelectWrapper */
public static final String ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER = "ER_ASNODEITERATOR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** fsb() not supported for XStringForChars */
- public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
- "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
+ public static final String ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS =
+ "ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS";
/** Could not find variable with the name of */
public static final String ER_COULD_NOT_FIND_VAR = "ER_COULD_NOT_FIND_VAR";
/** XStringForChars can not take a string for an argument */
- public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
- "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
+ public static final String ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING =
+ "ER_XSTRINGFORCHARS_CANNOT_TAKE_STRING";
/** The FastStringBuffer argument can not be null */
- public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
- "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
+ public static final String ER_FASTSTRINGBUFFER_CANNOT_BE_NULL =
+ "ER_FASTSTRINGBUFFER_CANNOT_BE_NULL";
/** 2 or 3 */
public static final String ER_TWO_OR_THREE = "ER_TWO_OR_THREE";
/** Variable accessed before it is bound! */
- public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
- "ER_VARIABLE_ACCESSED_BEFORE_BIND";
+ public static final String ER_VARIABLE_ACCESSED_BEFORE_BIND =
+ "ER_VARIABLE_ACCESSED_BEFORE_BIND";
/** XStringForFSB can not take a string for an argument! */
- public static final String ER_FSB_CANNOT_TAKE_STRING =
- "ER_FSB_CANNOT_TAKE_STRING";
+ public static final String ER_FSB_CANNOT_TAKE_STRING =
+ "ER_FSB_CANNOT_TAKE_STRING";
/** Error! Setting the root of a walker to null! */
- public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
- "ER_SETTING_WALKER_ROOT_TO_NULL";
+ public static final String ER_SETTING_WALKER_ROOT_TO_NULL =
+ "ER_SETTING_WALKER_ROOT_TO_NULL";
/** This NodeSetDTM can not iterate to a previous node! */
- public static final String ER_NODESETDTM_CANNOT_ITERATE =
- "ER_NODESETDTM_CANNOT_ITERATE";
+ public static final String ER_NODESETDTM_CANNOT_ITERATE =
+ "ER_NODESETDTM_CANNOT_ITERATE";
/** This NodeSet can not iterate to a previous node! */
- public static final String ER_NODESET_CANNOT_ITERATE =
- "ER_NODESET_CANNOT_ITERATE";
+ public static final String ER_NODESET_CANNOT_ITERATE =
+ "ER_NODESET_CANNOT_ITERATE";
/** This NodeSetDTM can not do indexing or counting functions! */
- public static final String ER_NODESETDTM_CANNOT_INDEX =
- "ER_NODESETDTM_CANNOT_INDEX";
+ public static final String ER_NODESETDTM_CANNOT_INDEX =
+ "ER_NODESETDTM_CANNOT_INDEX";
/** This NodeSet can not do indexing or counting functions! */
- public static final String ER_NODESET_CANNOT_INDEX =
- "ER_NODESET_CANNOT_INDEX";
+ public static final String ER_NODESET_CANNOT_INDEX =
+ "ER_NODESET_CANNOT_INDEX";
/** Can not call setShouldCacheNodes after nextNode has been called! */
- public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
- "ER_CANNOT_CALL_SETSHOULDCACHENODE";
+ public static final String ER_CANNOT_CALL_SETSHOULDCACHENODE =
+ "ER_CANNOT_CALL_SETSHOULDCACHENODE";
/** {0} only allows {1} arguments */
public static final String ER_ONLY_ALLOWS = "ER_ONLY_ALLOWS";
/** Programmer's assertion in getNextStepPos: unknown stepType: {0} */
public static final String ER_UNKNOWN_STEP = "ER_UNKNOWN_STEP";
/** Problem with RelativeLocationPath */
- public static final String ER_EXPECTED_REL_LOC_PATH =
- "ER_EXPECTED_REL_LOC_PATH";
+ public static final String ER_EXPECTED_REL_LOC_PATH =
+ "ER_EXPECTED_REL_LOC_PATH";
/** Problem with LocationPath */
public static final String ER_EXPECTED_LOC_PATH = "ER_EXPECTED_LOC_PATH";
public static final String ER_EXPECTED_LOC_PATH_AT_END_EXPR =
@@ -272,20 +272,20 @@
/** Problem with NodeTest */
public static final String ER_EXPECTED_NODE_TEST = "ER_EXPECTED_NODE_TEST";
/** Expected step pattern */
- public static final String ER_EXPECTED_STEP_PATTERN =
- "ER_EXPECTED_STEP_PATTERN";
+ public static final String ER_EXPECTED_STEP_PATTERN =
+ "ER_EXPECTED_STEP_PATTERN";
/** Expected relative path pattern */
- public static final String ER_EXPECTED_REL_PATH_PATTERN =
- "ER_EXPECTED_REL_PATH_PATTERN";
+ public static final String ER_EXPECTED_REL_PATH_PATTERN =
+ "ER_EXPECTED_REL_PATH_PATTERN";
/** ER_CANT_CONVERT_XPATHRESULTTYPE_TO_BOOLEAN */
- public static final String ER_CANT_CONVERT_TO_BOOLEAN =
- "ER_CANT_CONVERT_TO_BOOLEAN";
+ public static final String ER_CANT_CONVERT_TO_BOOLEAN =
+ "ER_CANT_CONVERT_TO_BOOLEAN";
/** Field ER_CANT_CONVERT_TO_SINGLENODE */
- public static final String ER_CANT_CONVERT_TO_SINGLENODE =
- "ER_CANT_CONVERT_TO_SINGLENODE";
+ public static final String ER_CANT_CONVERT_TO_SINGLENODE =
+ "ER_CANT_CONVERT_TO_SINGLENODE";
/** Field ER_CANT_GET_SNAPSHOT_LENGTH */
- public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
- "ER_CANT_GET_SNAPSHOT_LENGTH";
+ public static final String ER_CANT_GET_SNAPSHOT_LENGTH =
+ "ER_CANT_GET_SNAPSHOT_LENGTH";
/** Field ER_NON_ITERATOR_TYPE */
public static final String ER_NON_ITERATOR_TYPE = "ER_NON_ITERATOR_TYPE";
/** Field ER_DOC_MUTATED */
@@ -294,8 +294,8 @@
public static final String ER_EMPTY_XPATH_RESULT = "ER_EMPTY_XPATH_RESULT";
public static final String ER_INCOMPATIBLE_TYPES = "ER_INCOMPATIBLE_TYPES";
public static final String ER_NULL_RESOLVER = "ER_NULL_RESOLVER";
- public static final String ER_CANT_CONVERT_TO_STRING =
- "ER_CANT_CONVERT_TO_STRING";
+ public static final String ER_CANT_CONVERT_TO_STRING =
+ "ER_CANT_CONVERT_TO_STRING";
public static final String ER_NON_SNAPSHOT_TYPE = "ER_NON_SNAPSHOT_TYPE";
public static final String ER_WRONG_DOCUMENT = "ER_WRONG_DOCUMENT";
/* Note to translators: The XPath expression cannot be evaluated with respect
@@ -321,42 +321,42 @@
public static final String ER_SECUREPROCESSING_FEATURE = "ER_SECUREPROCESSING_FEATURE";
public static final String ER_NULL_XPATH_FUNCTION_RESOLVER = "ER_NULL_XPATH_FUNCTION_RESOLVER";
public static final String ER_NULL_XPATH_VARIABLE_RESOLVER = "ER_NULL_XPATH_VARIABLE_RESOLVER";
- //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
+ //END: Keys needed for exception messages of JAXP 1.3 XPath API implementation
- public static final String WG_LOCALE_NAME_NOT_HANDLED =
- "WG_LOCALE_NAME_NOT_HANDLED";
- public static final String WG_PROPERTY_NOT_SUPPORTED =
- "WG_PROPERTY_NOT_SUPPORTED";
- public static final String WG_DONT_DO_ANYTHING_WITH_NS =
- "WG_DONT_DO_ANYTHING_WITH_NS";
+ public static final String WG_LOCALE_NAME_NOT_HANDLED =
+ "WG_LOCALE_NAME_NOT_HANDLED";
+ public static final String WG_PROPERTY_NOT_SUPPORTED =
+ "WG_PROPERTY_NOT_SUPPORTED";
+ public static final String WG_DONT_DO_ANYTHING_WITH_NS =
+ "WG_DONT_DO_ANYTHING_WITH_NS";
public static final String WG_SECURITY_EXCEPTION = "WG_SECURITY_EXCEPTION";
- public static final String WG_QUO_NO_LONGER_DEFINED =
- "WG_QUO_NO_LONGER_DEFINED";
- public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
- "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
- public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
- "WG_FUNCTION_TOKEN_NOT_FOUND";
- public static final String WG_COULDNOT_FIND_FUNCTION =
- "WG_COULDNOT_FIND_FUNCTION";
+ public static final String WG_QUO_NO_LONGER_DEFINED =
+ "WG_QUO_NO_LONGER_DEFINED";
+ public static final String WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST =
+ "WG_NEED_DERIVED_OBJECT_TO_IMPLEMENT_NODETEST";
+ public static final String WG_FUNCTION_TOKEN_NOT_FOUND =
+ "WG_FUNCTION_TOKEN_NOT_FOUND";
+ public static final String WG_COULDNOT_FIND_FUNCTION =
+ "WG_COULDNOT_FIND_FUNCTION";
public static final String WG_CANNOT_MAKE_URL_FROM ="WG_CANNOT_MAKE_URL_FROM";
- public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
- "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
- public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
- "WG_ILLEGAL_VARIABLE_REFERENCE";
+ public static final String WG_EXPAND_ENTITIES_NOT_SUPPORTED =
+ "WG_EXPAND_ENTITIES_NOT_SUPPORTED";
+ public static final String WG_ILLEGAL_VARIABLE_REFERENCE =
+ "WG_ILLEGAL_VARIABLE_REFERENCE";
public static final String WG_UNSUPPORTED_ENCODING ="WG_UNSUPPORTED_ENCODING";
/** detach() not supported by XRTreeFragSelectWrapper */
public static final String ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** num() not supported by XRTreeFragSelectWrapper */
public static final String ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** xstr() not supported by XRTreeFragSelectWrapper */
public static final String ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
/** str() not supported by XRTreeFragSelectWrapper */
public static final String ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER =
- "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
+ "ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER";
// Error messages...
@@ -580,22 +580,22 @@
{ ER_RTF_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
"XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 asNodeIterator()"},
-
- /** detach() not supported by XRTreeFragSelectWrapper */
+
+ /** detach() not supported by XRTreeFragSelectWrapper */
{ ER_DETACH_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 detach()"},
-
- /** num() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 detach()"},
+
+ /** num() not supported by XRTreeFragSelectWrapper */
{ ER_NUM_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 num()"},
-
- /** xstr() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 num()"},
+
+ /** xstr() not supported by XRTreeFragSelectWrapper */
{ ER_XSTR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 xstr()"},
-
- /** str() not supported by XRTreeFragSelectWrapper */
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 xstr()"},
+
+ /** str() not supported by XRTreeFragSelectWrapper */
{ ER_STR_NOT_SUPPORTED_XRTREEFRAGSELECTWRAPPER,
- "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 str()"},
+ "XRTreeFragSelectWrapper \u4E0D\u652F\u63F4 str()"},
{ ER_FSB_NOT_SUPPORTED_XSTRINGFORCHARS,
"XStringForChars \u4E0D\u652F\u63F4 fsb()"},
@@ -691,7 +691,7 @@
{ ER_CANT_CONVERT_TO_BOOLEAN,
"XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u5E03\u6797\u503C\u3002"},
- // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
+ // Note to translators: Do not translate ANY_UNORDERED_NODE_TYPE and
// FIRST_ORDERED_NODE_TYPE.
{ ER_CANT_CONVERT_TO_SINGLENODE,
"XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u55AE\u4E00\u7BC0\u9EDE\u3002\u65B9\u6CD5 getSingleNodeValue \u50C5\u9069\u7528\u65BC\u985E\u578B ANY_UNORDERED_NODE_TYPE \u8207 FIRST_ORDERED_NODE_TYPE\u3002"},
@@ -749,7 +749,7 @@
"XPath \u767C\u751F\u4E0D\u660E\u7684\u932F\u8AA4\u3002"},
{ ER_CANT_CONVERT_XPATHRESULTTYPE_TO_NUMBER,
- "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u6578\u5B57\u3002"},
+ "XPath \u8868\u793A\u5F0F ''{0}'' \u7684 XPathResult \u5177\u6709 XPathResultType \u7684 {1}\uFF0C\u5B83\u7121\u6CD5\u8F49\u63DB\u70BA\u6578\u5B57\u3002"},
//BEGIN: Definitions of error keys used in exception messages of JAXP 1.3 XPath API implementation
@@ -815,7 +815,7 @@
{ER_SECUREPROCESSING_FEATURE,
"FEATURE_SECURE_PROCESSING: \u5B89\u5168\u7BA1\u7406\u7A0B\u5F0F\u5B58\u5728\u6642\uFF0C\u7121\u6CD5\u5C07\u529F\u80FD\u8A2D\u70BA\u507D: {1}#setFeature({0},{2})"},
-
+
/** Field ER_NULL_XPATH_FUNCTION_RESOLVER */
{ ER_NULL_XPATH_FUNCTION_RESOLVER,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/EventFilterSupport.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/EventFilterSupport.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/EventFilterSupport.java Wed May 02 13:32:36 2012 +0100
@@ -38,7 +38,7 @@
*
*/
public class EventFilterSupport extends EventReaderDelegate {
-
+
//maintain a reference to EventFilter
EventFilter fEventFilter ;
/** Creates a new instance of EventFilterSupport */
@@ -46,7 +46,7 @@
setParent(eventReader);
fEventFilter = eventFilter;
}
-
+
public Object next(){
try{
return nextEvent();
@@ -54,7 +54,7 @@
throw new NoSuchElementException();
}
}
-
+
public boolean hasNext(){
try{
return peek() != null ? true : false ;
@@ -62,12 +62,12 @@
return false;
}
}
-
+
public XMLEvent nextEvent()throws XMLStreamException{
if(super.hasNext()){
//get the next event by calling XMLEventReader
XMLEvent event = super.nextEvent();
-
+
//if this filter accepts this event then return this event
if(fEventFilter.accept(event)){
return event;
@@ -79,7 +79,7 @@
throw new NoSuchElementException();
}
}//nextEvent()
-
+
public XMLEvent nextTag() throws XMLStreamException{
if(super.hasNext()){
XMLEvent event = super.nextTag();
@@ -89,12 +89,12 @@
}
else{
return nextTag();
- }
+ }
}else{
throw new NoSuchElementException();
- }
+ }
}
-
+
public XMLEvent peek() throws XMLStreamException{
while (true) {
XMLEvent event = super.peek();
@@ -107,5 +107,5 @@
super.next();
}
}
-
+
}//EventFilterSupport
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/StaxErrorReporter.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/StaxErrorReporter.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/StaxErrorReporter.java Wed May 02 13:32:36 2012 +0100
@@ -45,16 +45,16 @@
*/
public class StaxErrorReporter extends XMLErrorReporter {
-
+
protected XMLReporter fXMLReporter = null ;
-
+
/** Creates a new instance of StaxErrorReporter */
public StaxErrorReporter(PropertyManager propertyManager) {
super();
putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, new XMLMessageFormatter());
reset(propertyManager);
}
-
+
/** Creates a new instance of StaxErrorReporter
* If this constructor is used to create the object, one must invoke reset() on this object.
*/
@@ -62,7 +62,7 @@
super();
putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, new XMLMessageFormatter());
}
-
+
/**
*One must call reset before using any of the function.
*/
@@ -109,16 +109,16 @@
}
message = str.toString();
}
-
-
-
+
+
+
//no reporter was specified
/**
* if (reporter == null) {
* reporter = new DefaultStaxErrorReporter();
* }
*/
-
+
// call error handler
switch (severity) {
case SEVERITY_WARNING: {
@@ -154,34 +154,34 @@
}
return message;
}
-
-
+
+
Location convertToStaxLocation(final XMLLocator location){
return new Location(){
public int getColumnNumber(){
return location.getColumnNumber();
}
-
+
public int getLineNumber(){
return location.getLineNumber();
}
-
+
public String getPublicId(){
return location.getPublicId();
}
-
+
public String getSystemId(){
return location.getLiteralSystemId();
}
-
+
public int getCharacterOffset(){
return location.getCharacterOffset();
}
public String getLocationURI(){
return "";
}
-
+
};
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEntityStorage.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEntityStorage.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEntityStorage.java Wed May 02 13:32:36 2012 +0100
@@ -36,6 +36,7 @@
import com.sun.org.apache.xerces.internal.impl.PropertyManager;
import com.sun.org.apache.xerces.internal.impl.XMLErrorReporter;
import com.sun.org.apache.xerces.internal.impl.Constants;
+import java.util.Enumeration;
/**
*
@@ -45,25 +46,25 @@
*
*/
public class XMLEntityStorage {
-
+
/** Property identifier: error reporter. */
protected static final String ERROR_REPORTER =
Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY;
-
+
/** Feature identifier: warn on duplicate EntityDef */
protected static final String WARN_ON_DUPLICATE_ENTITYDEF =
Constants.XERCES_FEATURE_PREFIX +Constants.WARN_ON_DUPLICATE_ENTITYDEF_FEATURE;
-
+
/** warn on duplicate Entity declaration.
* http://apache.org/xml/features/warn-on-duplicate-entitydef
*/
protected boolean fWarnDuplicateEntityDef;
-
+
/** Entities. */
protected Hashtable fEntities = new Hashtable();
-
+
protected Entity.ScannedEntity fCurrentEntity ;
-
+
private XMLEntityManager fEntityManager;
/**
* Error reporter. This property identifier is:
@@ -71,30 +72,30 @@
*/
protected XMLErrorReporter fErrorReporter;
protected PropertyManager fPropertyManager ;
-
+
/* To keep track whether an entity is declared in external or internal subset*/
protected boolean fInExternalSubset = false;
-
+
/** Creates a new instance of XMLEntityStorage */
public XMLEntityStorage(PropertyManager propertyManager) {
fPropertyManager = propertyManager ;
}
-
+
/** Creates a new instance of XMLEntityStorage */
/*public XMLEntityStorage(Entity.ScannedEntity currentEntity) {
fCurrentEntity = currentEntity ;*/
public XMLEntityStorage(XMLEntityManager entityManager) {
fEntityManager = entityManager;
}
-
+
public void reset(PropertyManager propertyManager){
-
+
fErrorReporter = (XMLErrorReporter)propertyManager.getProperty(Constants.XERCES_PROPERTY_PREFIX + Constants.ERROR_REPORTER_PROPERTY);
fEntities.clear();
fCurrentEntity = null;
-
+
}
-
+
public void reset(){
fEntities.clear();
fCurrentEntity = null;
@@ -115,33 +116,41 @@
*/
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {
-
-
+
+
// xerces features
-
+
fWarnDuplicateEntityDef = componentManager.getFeature(WARN_ON_DUPLICATE_ENTITYDEF, false);
fErrorReporter = (XMLErrorReporter)componentManager.getProperty(ERROR_REPORTER);
-
+
fEntities.clear();
fCurrentEntity = null;
-
+
} // reset(XMLComponentManager)
-
+
/**
- * Returns the hashtable of declared entities.
- *
- * REVISIT:
- * This should be done the "right" way by designing a better way to
- * enumerate the declared entities. For now, this method is needed
- * by the constructor that takes an XMLEntityManager parameter.
- * XXX Making this method public, return all the declared entities.
- * @return Hashtable hastable containing all the declared entities.
+ * Returns entity declaration.
+ *
+ * @param name The name of the entity.
+ *
+ * @see SymbolTable
*/
- public Hashtable getDeclaredEntities() {
- return fEntities;
- } // getDeclaredEntities():Hashtable
-
+ public Entity getEntity(String name) {
+ return (Entity)fEntities.get(name);
+ } // getEntity(String)
+
+ public boolean hasEntities() {
+ return (fEntities!=null);
+ } // getEntity(String)
+
+ public int getEntitySize() {
+ return fEntities.size();
+ } // getEntity(String)
+
+ public Enumeration getEntityKeys() {
+ return fEntities.keys();
+ }
/**
* Adds an internal entity declaration.
*
@@ -158,7 +167,7 @@
*/
public void addInternalEntity(String name, String text) {
if (!fEntities.containsKey(name)) {
- Entity entity = new Entity.InternalEntity(name, text, fInExternalSubset);
+ Entity entity = new Entity.InternalEntity(name, text, fInExternalSubset);
fEntities.put(name, entity);
}
else{
@@ -170,7 +179,7 @@
}
}
} // addInternalEntity(String,String)
-
+
/**
* Adds an external entity declaration.
*
@@ -206,7 +215,7 @@
* baseSystemId = fCurrentEntity.entityLocation.getExpandedSystemId();
* }
*/
-
+
//xxx we need to have information about the current entity.
if (fCurrentEntity != null && fCurrentEntity.entityLocation != null) {
baseSystemId = fCurrentEntity.entityLocation.getExpandedSystemId();
@@ -222,7 +231,7 @@
* }
*/
}
-
+
fCurrentEntity = fEntityManager.getCurrentEntity();
Entity entity = new Entity.ExternalEntity(name,
new XMLResourceIdentifierImpl(publicId, literalSystemId,
@@ -230,7 +239,7 @@
null, fInExternalSubset);
//TODO :: Forced to pass true above remove it.
//(fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
- // null, fCurrentEntity.isEntityDeclInExternalSubset());
+ // null, fCurrentEntity.isEntityDeclInExternalSubset());
fEntities.put(name, entity);
}
else{
@@ -241,9 +250,9 @@
XMLErrorReporter.SEVERITY_WARNING );
}
}
-
+
} // addExternalEntity(String,String,String,String)
-
+
/**
* Checks whether an entity given by name is external.
*
@@ -252,14 +261,14 @@
* (including when the entity is not declared).
*/
public boolean isExternalEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isExternal();
}
-
+
/**
* Checks whether the declaration of an entity given by name is
* // in the external subset.
@@ -269,14 +278,14 @@
* (including when the entity is not declared).
*/
public boolean isEntityDeclInExternalSubset(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isEntityDeclInExternalSubset();
}
-
+
/**
* Adds an unparsed entity declaration.
*
@@ -296,12 +305,12 @@
public void addUnparsedEntity(String name,
String publicId, String systemId,
String baseSystemId, String notation) {
-
+
fCurrentEntity = fEntityManager.getCurrentEntity();
if (!fEntities.containsKey(name)) {
Entity entity = new Entity.ExternalEntity(name, new XMLResourceIdentifierImpl(publicId, systemId, baseSystemId, null), notation, fInExternalSubset);
- // (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
- // fCurrentEntity.isEntityDeclInExternalSubset());
+ // (fCurrentEntity == null) ? fasle : fCurrentEntity.isEntityDeclInExternalSubset());
+ // fCurrentEntity.isEntityDeclInExternalSubset());
fEntities.put(name, entity);
}
else{
@@ -313,7 +322,7 @@
}
}
} // addUnparsedEntity(String,String,String,String)
-
+
/**
* Checks whether an entity given by name is unparsed.
*
@@ -322,14 +331,14 @@
* (including when the entity is not declared).
*/
public boolean isUnparsedEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
if (entity == null) {
return false;
}
return entity.isUnparsed();
}
-
+
/**
* Checks whether an entity given by name is declared.
*
@@ -337,7 +346,7 @@
* @returns True if the entity is declared, false otherwise.
*/
public boolean isDeclaredEntity(String entityName) {
-
+
Entity entity = (Entity)fEntities.get(entityName);
return entity != null;
}
@@ -357,7 +366,7 @@
public static String expandSystemId(String systemId) {
return expandSystemId(systemId, null);
} // expandSystemId(String):String
-
+
// current value of the "user.dir" property
private static String gUserDir;
// escaped value of the current "user.dir" property
@@ -409,23 +418,23 @@
}
catch (SecurityException se) {
}
-
+
// return empty string if property value is empty string.
if (userDir.length() == 0)
return "";
-
+
// compute the new escaped value if the new property value doesn't
// match the previous one
if (userDir.equals(gUserDir)) {
return gEscapedUserDir;
}
-
+
// record the new value as the global property value
gUserDir = userDir;
-
+
char separator = java.io.File.separatorChar;
userDir = userDir.replace(separator, '/');
-
+
int len = userDir.length(), ch;
StringBuffer buffer = new StringBuffer(len*3);
// change C:/blah to /C:/blah
@@ -435,7 +444,7 @@
buffer.append('/');
}
}
-
+
// for each character in the path
int i = 0;
for (; i < len; i++) {
@@ -453,7 +462,7 @@
buffer.append((char)ch);
}
}
-
+
// we saw some non-ascii character
if (i < len) {
// get UTF-8 bytes for the remaining sub-string
@@ -466,7 +475,7 @@
return userDir;
}
len = bytes.length;
-
+
// for each byte
for (i = 0; i < len; i++) {
b = bytes[i];
@@ -487,16 +496,16 @@
}
}
}
-
+
// change blah/blah to blah/blah/
if (!userDir.endsWith("/"))
buffer.append('/');
-
+
gEscapedUserDir = buffer.toString();
-
+
return gEscapedUserDir;
}
-
+
/**
* Expands a system id and returns the system id as a URI, if
* it can be expanded. A return value of null means that the
@@ -511,7 +520,7 @@
*
*/
public static String expandSystemId(String systemId, String baseSystemId) {
-
+
// check for bad parameters id
if (systemId == null || systemId.length() == 0) {
return systemId;
@@ -525,7 +534,7 @@
}
// normalize id
String id = fixURI(systemId);
-
+
// normalize base
URI base = null;
URI uri = null;
@@ -557,19 +566,19 @@
}
catch (Exception e) {
// let it go through
-
+
}
-
+
if (uri == null) {
return systemId;
}
return uri.toString();
-
+
} // expandSystemId(String,String):String
//
// Protected static methods
//
-
+
/**
* Fixes a platform dependent filename to standard URI form.
*
@@ -578,10 +587,10 @@
* @return Returns the fixed URI string.
*/
protected static String fixURI(String str) {
-
+
// handle platform dependent strings
str = str.replace(java.io.File.separatorChar, '/');
-
+
// Windows fix
if (str.length() >= 2) {
char ch1 = str.charAt(1);
@@ -597,17 +606,17 @@
str = "file:" + str;
}
}
-
+
// done
return str;
-
+
} // fixURI(String):String
-
- // indicate start of external subset
+
+ // indicate start of external subset
public void startExternalSubset() {
fInExternalSubset = true;
}
-
+
public void endExternalSubset() {
fInExternalSubset = false;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEventReaderImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEventReaderImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLEventReaderImpl.java Wed May 02 13:32:36 2012 +0100
@@ -41,10 +41,10 @@
*/
public class XMLEventReaderImpl implements javax.xml.stream.XMLEventReader{
-
+
protected XMLStreamReader fXMLReader ;
protected XMLEventAllocator fXMLEventAllocator;
-
+
//only constructor will do because we delegate everything to underlying XMLStreamReader
public XMLEventReaderImpl(XMLStreamReader reader) throws XMLStreamException {
fXMLReader = reader ;
@@ -52,10 +52,10 @@
if(fXMLEventAllocator == null){
fXMLEventAllocator = new XMLEventAllocatorImpl();
}
- fPeekedEvent = fXMLEventAllocator.allocate(fXMLReader);
+ fPeekedEvent = fXMLEventAllocator.allocate(fXMLReader);
}
-
-
+
+
public boolean hasNext() {
//if we have the peeked event return 'true'
if(fPeekedEvent != null)return true;
@@ -69,8 +69,8 @@
}
return next ;
}
-
-
+
+
public XMLEvent nextEvent() throws XMLStreamException {
//if application peeked return the peeked event
if(fPeekedEvent != null){
@@ -88,17 +88,17 @@
throw new NoSuchElementException();
}
}
-
+
public void remove(){
//remove of the event is not supported.
throw new java.lang.UnsupportedOperationException();
}
-
-
+
+
public void close() throws XMLStreamException {
fXMLReader.close();
}
-
+
/** Reads the content of a text-only element. Precondition:
* the current event is START_ELEMENT. Postcondition:
* The current event is the corresponding END_ELEMENT.
@@ -112,20 +112,20 @@
throw new XMLStreamException(
"parser must be on START_ELEMENT to read next text", fLastEvent.getLocation());
}
-
+
// STag content ETag
//[43] content ::= CharData? ((element | Reference | CDSect | PI | Comment) CharData?)*
-
+
//....some long text say in KB and underlying parser reports multiple character
// but getElementText() events....
-
+
String data = null;
//having a peeked event makes things really worse -- we have to test the first event
if(fPeekedEvent != null){
XMLEvent event = fPeekedEvent ;
fPeekedEvent = null;
int type = event.getEventType();
-
+
if( type == XMLEvent.CHARACTERS || type == XMLEvent.SPACE ||
type == XMLEvent.CDATA){
data = event.asCharacters().getData();
@@ -141,7 +141,7 @@
}else if(type == XMLEvent.END_ELEMENT){
return "";
}
-
+
//create the string buffer and add initial data
StringBuffer buffer = new StringBuffer();
if(data != null && data.length() > 0 ) {
@@ -180,14 +180,14 @@
}
return buffer.toString();
}//if (fPeekedEvent != null)
-
+
//if there was no peeked, delegate everything to fXMLReader
//update the last event before returning the text
data = fXMLReader.getElementText();
fLastEvent = fXMLEventAllocator.allocate(fXMLReader);
return data;
}
-
+
/** Get the value of a feature/property from the underlying implementation
* @param name The name of the property
* @return The value of the property
@@ -196,7 +196,7 @@
public Object getProperty(java.lang.String name) throws java.lang.IllegalArgumentException {
return fXMLReader.getProperty(name) ;
}
-
+
/** Skips any insignificant space events until a START_ELEMENT or
* END_ELEMENT is reached. If anything other than space characters are
* encountered, an exception is thrown. This method should
@@ -221,27 +221,27 @@
event = nextEvent();
eventType = event.getEventType();
}
-
+
//we have to have the while loop because there can be many PI or comment event in sucession
while((event.isCharacters() && event.asCharacters().isWhiteSpace())
|| eventType == XMLStreamConstants.PROCESSING_INSTRUCTION
|| eventType == XMLStreamConstants.COMMENT){
-
+
event = nextEvent();
eventType = event.getEventType();
}
-
+
if (eventType != XMLStreamConstants.START_ELEMENT && eventType != XMLStreamConstants.END_ELEMENT) {
throw new XMLStreamException("expected start or end tag", event.getLocation());
}
return event;
}
-
+
//if there is no peeked event -- delegate the work of getting next event to fXMLReader
fXMLReader.nextTag();
return (fLastEvent = fXMLEventAllocator.allocate(fXMLReader));
}
-
+
public Object next() {
Object object = null;
try{
@@ -253,18 +253,18 @@
}
return object;
}
-
+
public XMLEvent peek() throws XMLStreamException{
//if someone call peek() two times we should just return the peeked event
//this is reset if we call next() or nextEvent()
if(fPeekedEvent != null) return fPeekedEvent;
-
+
if(hasNext()){
//revisit: we can implement peek() by calling underlying reader to advance
// the stream and returning the event without the knowledge of the user
// that the stream was advanced but the point is we are advancing the stream
//here. -- nb.
-
+
// Is there any application that relies on this behavior ?
//Can it be an application knows that there is particularly very large 'comment' section
//or character data which it doesn't want to read or to be returned as event
@@ -277,8 +277,8 @@
return null;
}
}//peek()
-
+
private XMLEvent fPeekedEvent;
private XMLEvent fLastEvent;
-
+
}//XMLEventReaderImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/XMLInputFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLInputFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLInputFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -45,28 +45,28 @@
//xxx: Should we be reusing the XMLInputSource object
public class XMLInputFactoryImpl extends javax.xml.stream.XMLInputFactory {
-
-
+
+
//List of supported properties and default values.
private PropertyManager fPropertyManager = new PropertyManager(PropertyManager.CONTEXT_READER) ;
private static final boolean DEBUG = false;
-
+
//Maintain a reference to last reader instantiated.
private XMLStreamReaderImpl fTempReader = null ;
-
+
boolean fPropertyChanged = false;
//no reader reuse by default
boolean fReuseInstance = false;
/** Creates a new instance of ZephryParserFactory */
public XMLInputFactoryImpl() {
-
+
}
-
+
void initEventReader(){
fPropertyChanged = true;
}
-
+
/**
* @param inputstream
* @throws XMLStreamException
@@ -77,37 +77,37 @@
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(inputstream));
}
-
+
public XMLEventReader createXMLEventReader(Reader reader) throws XMLStreamException {
initEventReader();
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(reader));
}
-
+
public XMLEventReader createXMLEventReader(Source source) throws XMLStreamException {
initEventReader();
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(source));
}
-
+
public XMLEventReader createXMLEventReader(String systemId, InputStream inputstream) throws XMLStreamException {
initEventReader();
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(systemId, inputstream));
}
-
+
public XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) throws XMLStreamException {
initEventReader();
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(stream, encoding));
}
-
+
public XMLEventReader createXMLEventReader(String systemId, Reader reader) throws XMLStreamException {
initEventReader();
//delegate everything to XMLStreamReader
return new XMLEventReaderImpl(createXMLStreamReader(systemId, reader));
}
-
+
/** Create a new XMLEventReader from an XMLStreamReader. After being used
* to construct the XMLEventReader instance returned from this method
* the XMLStreamReader must not be used.
@@ -116,67 +116,67 @@
* @throws XMLStreamException
*/
public XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException {
-
+
//xxx: what do we do now -- instance is passed from the application
//probably we should check if the state is at the start document,
//eventreader call to next() should return START_DOCUMENT and
//then delegate every call to underlying streamReader
return new XMLEventReaderImpl(reader) ;
}
-
+
public XMLStreamReader createXMLStreamReader(InputStream inputstream) throws XMLStreamException {
XMLInputSource inputSource = new XMLInputSource(null, null, null, inputstream, null);
return getXMLStreamReaderImpl(inputSource);
}
-
+
public XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException {
XMLInputSource inputSource = new XMLInputSource(null, null, null, reader, null);
return getXMLStreamReaderImpl(inputSource);
}
-
+
public XMLStreamReader createXMLStreamReader(String systemId, Reader reader) throws XMLStreamException {
XMLInputSource inputSource = new XMLInputSource(null,systemId,null,reader,null);
return getXMLStreamReaderImpl(inputSource);
}
-
+
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
- return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
+ return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
new PropertyManager(fPropertyManager));
}
-
+
public XMLStreamReader createXMLStreamReader(String systemId, InputStream inputstream) throws XMLStreamException {
XMLInputSource inputSource = new XMLInputSource(null,systemId,null,inputstream,null);
return getXMLStreamReaderImpl(inputSource);
}
-
-
+
+
public XMLStreamReader createXMLStreamReader(InputStream inputstream, String encoding) throws XMLStreamException {
XMLInputSource inputSource = new XMLInputSource(null,null,null,inputstream,encoding);
return getXMLStreamReaderImpl(inputSource);
}
-
+
public XMLEventAllocator getEventAllocator() {
return (XMLEventAllocator)getProperty(XMLInputFactory.ALLOCATOR);
}
-
+
public XMLReporter getXMLReporter() {
return (XMLReporter)fPropertyManager.getProperty(XMLInputFactory.REPORTER);
}
-
+
public XMLResolver getXMLResolver() {
Object object = fPropertyManager.getProperty(XMLInputFactory.RESOLVER);
return (XMLResolver)object;
//return (XMLResolver)fPropertyManager.getProperty(XMLInputFactory.RESOLVER);
}
-
+
public void setXMLReporter(XMLReporter xmlreporter) {
fPropertyManager.setProperty(XMLInputFactory.REPORTER, xmlreporter);
}
-
+
public void setXMLResolver(XMLResolver xmlresolver) {
fPropertyManager.setProperty(XMLInputFactory.RESOLVER, xmlresolver);
}
-
+
/** Create a filtered event reader that wraps the filter around the event reader
* @param reader the event reader to wrap
* @param filter the filter to apply to the event reader
@@ -185,7 +185,7 @@
public XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException {
return new EventFilterSupport(reader, filter);
}
-
+
/** Create a filtered reader that wraps the filter around the reader
* @param reader the reader to filter
* @param filter the filter to apply to the reader
@@ -194,12 +194,12 @@
public XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException {
if( reader != null && filter != null )
return new XMLStreamFilterImpl(reader,filter);
-
+
return null;
}
-
-
-
+
+
+
/** Get the value of a feature/property from the underlying implementation
* @param name The name of the property (may not be null)
* @return The value of the property
@@ -213,7 +213,7 @@
return fPropertyManager.getProperty(name);
throw new IllegalArgumentException("Property not supported");
}
-
+
/** Query the set of fProperties that this factory supports.
*
* @param name The name of the property (may not be null)
@@ -225,14 +225,14 @@
else
return fPropertyManager.containsProperty(name);
}
-
+
/** Set a user defined event allocator for events
* @param allocator the user defined allocator
*/
public void setEventAllocator(XMLEventAllocator allocator) {
fPropertyManager.setProperty(XMLInputFactory.ALLOCATOR, allocator);
}
-
+
/** Allows the user to set specific feature/property on the underlying implementation. The underlying implementation
* is not required to support every setting of every property in the specification and may use IllegalArgumentException
* to signal that an unsupported property may not be set with the specified value.
@@ -241,7 +241,7 @@
* @throws java.lang.IllegalArgumentException if the property is not supported
*/
public void setProperty(java.lang.String name, Object value) throws java.lang.IllegalArgumentException {
-
+
if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
throw new IllegalArgumentException("Property "+name+" is not supported");
}
@@ -254,15 +254,15 @@
}
fPropertyManager.setProperty(name,value);
}
-
+
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
//1. if the temp reader is null -- create the instance and return
if(fTempReader == null){
fPropertyChanged = false;
- return fTempReader = new XMLStreamReaderImpl(inputSource,
+ return fTempReader = new XMLStreamReaderImpl(inputSource,
new PropertyManager(fPropertyManager));
}
- //if factory is configured to reuse the instance & this instance can be reused
+ //if factory is configured to reuse the instance & this instance can be reused
//& the setProperty() hasn't been called
if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
if(DEBUG)System.out.println("Reusing the instance");
@@ -274,11 +274,11 @@
}else{
fPropertyChanged = false;
//just return the new instance.. note that we are not setting fTempReader to the newly created instance
- return fTempReader = new XMLStreamReaderImpl(inputSource,
+ return fTempReader = new XMLStreamReaderImpl(inputSource,
new PropertyManager(fPropertyManager));
}
}
-
+
XMLInputSource jaxpSourcetoXMLInputSource(Source source){
if(source instanceof StreamSource){
StreamSource stSource = (StreamSource)source;
@@ -301,5 +301,5 @@
"XMLStreamReader or XMLEventReader from a " +
source.getClass().getName());
}
-
+
}//XMLInputFactoryImpl
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/XMLOutputFactoryImpl.java Wed May 02 13:32:36 2012 +0100
@@ -51,22 +51,22 @@
* @author k.venugopal@sun.com
*/
public class XMLOutputFactoryImpl extends XMLOutputFactory {
-
+
//List of supported properties and default values.
private PropertyManager fPropertyManager = new PropertyManager(PropertyManager.CONTEXT_WRITER);
-
+
//cache the instance of XMLStreamWriterImpl
private XMLStreamWriterImpl fStreamWriter = null;
-
+
/**
* TODO: at the current time, XMLStreamWriters are not Thread safe.
*/
boolean fReuseInstance = false;
-
+
/** Creates a new instance of XMLOutputFactory */
public XMLOutputFactoryImpl() {
}
-
+
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.OutputStream outputStream) throws javax.xml.stream.XMLStreamException {
return createXMLEventWriter(outputStream, null);
}
@@ -76,21 +76,21 @@
}
public javax.xml.stream.XMLEventWriter createXMLEventWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException {
-
+
if (result instanceof StAXResult && ((StAXResult)result).getXMLEventWriter() != null)
return ((StAXResult)result).getXMLEventWriter();
-
+
return new XMLEventWriterImpl(createXMLStreamWriter(result));
}
-
+
public javax.xml.stream.XMLEventWriter createXMLEventWriter(java.io.Writer writer) throws javax.xml.stream.XMLStreamException {
return new XMLEventWriterImpl(createXMLStreamWriter(writer));
}
-
+
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException {
if (result instanceof StreamResult) {
- return createXMLStreamWriter((StreamResult) result, null);
+ return createXMLStreamWriter((StreamResult) result, null);
} else if (result instanceof DOMResult) {
return new XMLDOMWriterImpl((DOMResult) result);
} else if (result instanceof StAXResult) {
@@ -107,22 +107,22 @@
throw new java.lang.UnsupportedOperationException("Result of type " + result + " is not supported. " +
"Supported result types are: DOMResult, StAXResult and StreamResult.");
}
- }
-
+ }
+
}
-
+
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.Writer writer) throws javax.xml.stream.XMLStreamException {
return createXMLStreamWriter(toStreamResult(null, writer, null) , null);
}
-
+
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream outputStream) throws javax.xml.stream.XMLStreamException {
return createXMLStreamWriter(outputStream, null);
}
-
+
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(java.io.OutputStream outputStream, String encoding) throws javax.xml.stream.XMLStreamException {
return createXMLStreamWriter(toStreamResult(outputStream, null, null) , encoding);
}
-
+
public Object getProperty(String name) throws java.lang.IllegalArgumentException {
if(name == null){
throw new IllegalArgumentException("Property not supported");
@@ -131,7 +131,7 @@
return fPropertyManager.getProperty(name);
throw new IllegalArgumentException("Property not supported");
}
-
+
public boolean isPropertySupported(String name) {
if(name == null){
return false ;
@@ -140,7 +140,7 @@
return fPropertyManager.containsProperty(name);
}
}
-
+
public void setProperty(String name, Object value) throws java.lang.IllegalArgumentException {
if(name == null || value == null || !fPropertyManager.containsProperty(name) ){
throw new IllegalArgumentException("Property "+name+"is not supported");
@@ -148,7 +148,7 @@
if(name == Constants.REUSE_INSTANCE || name.equals(Constants.REUSE_INSTANCE)){
fReuseInstance = ((Boolean)value).booleanValue();
if(DEBUG)System.out.println("fReuseInstance is set to " + fReuseInstance);
-
+
// TODO: XMLStreamWriters are not Thread safe,
// don't let application think it is optimizing
if (fReuseInstance) {
@@ -175,7 +175,7 @@
}
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
- //if factory is configured to reuse the instance & this instance can be reused
+ //if factory is configured to reuse the instance & this instance can be reused
//& the setProperty() hasn't been called
try{
if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
@@ -191,9 +191,9 @@
}//createXMLStreamWriter(StreamResult,String)
private static final boolean DEBUG = false;
-
+
/** This flag indicates the change of property. If true,
- * PropertyManager
should be passed when creating
+ * PropertyManager
should be passed when creating
* XMLStreamWriterImpl
*/
private boolean fPropertyChanged ;
}//XMLOutputFactory
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/dtd/DTDGrammarUtil.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/dtd/DTDGrammarUtil.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/dtd/DTDGrammarUtil.java Wed May 02 13:32:36 2012 +0100
@@ -52,71 +52,71 @@
public class DTDGrammarUtil {
-
+
/** Property identifier: symbol table. */
protected static final String SYMBOL_TABLE =
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY;
-
+
protected static final String NAMESPACES =
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACES_FEATURE;
-
-
+
+
/** Compile to true to debug attributes. */
private static final boolean DEBUG_ATTRIBUTES = false;
-
+
/** Compile to true to debug element children. */
private static final boolean DEBUG_ELEMENT_CHILDREN = false;
-
+
protected DTDGrammar fDTDGrammar = null;
/** Namespaces. */
protected boolean fNamespaces;
-
+
/** Symbol table. */
protected SymbolTable fSymbolTable = null;
-
+
/** Current element index. */
private int fCurrentElementIndex = -1;
-
+
/** Current content spec type. */
private int fCurrentContentSpecType = -1;
/** Content spec type stack. */
private boolean[] fElementContentState = new boolean[8];
-
+
/** Element depth. */
private int fElementDepth = -1;
-
+
/** True if inside of element content. */
private boolean fInElementContent = false;
-
+
/** Temporary atribute declaration. */
private XMLAttributeDecl fTempAttDecl = new XMLAttributeDecl();
-
+
/** Temporary qualified name. */
private QName fTempQName = new QName();
-
+
/** Temporary string buffers. */
private StringBuffer fBuffer = new StringBuffer();
-
+
private NamespaceContext fNamespaceContext = null;
-
+
/** Default constructor. */
public DTDGrammarUtil(SymbolTable symbolTable) {
fSymbolTable = symbolTable;
}
-
+
public DTDGrammarUtil(DTDGrammar grammar, SymbolTable symbolTable) {
fDTDGrammar = grammar;
fSymbolTable = symbolTable;
}
-
- public DTDGrammarUtil(DTDGrammar grammar, SymbolTable symbolTable,
+
+ public DTDGrammarUtil(DTDGrammar grammar, SymbolTable symbolTable,
NamespaceContext namespaceContext) {
fDTDGrammar = grammar;
fSymbolTable = symbolTable;
fNamespaceContext = namespaceContext;
}
-
+
/*
* Resets the component. The component can query the component manager
* about any features and properties that affect the operation of the
@@ -133,7 +133,7 @@
*/
public void reset(XMLComponentManager componentManager)
throws XMLConfigurationException {
-
+
fDTDGrammar = null;
fInElementContent = false;
fCurrentElementIndex = -1;
@@ -143,8 +143,8 @@
Constants.XERCES_PROPERTY_PREFIX + Constants.SYMBOL_TABLE_PROPERTY);
fElementDepth = -1;
}
-
-
+
+
/**
* The start of an element.
*
@@ -154,10 +154,10 @@
*
* @throws XNIException Thrown by handler to signal an error.
*/
- public void startElement(QName element, XMLAttributes attributes) throws XNIException {
- handleStartElement(element, attributes);
+ public void startElement(QName element, XMLAttributes attributes) throws XNIException {
+ handleStartElement(element, attributes);
}
-
+
/**
* The end of an element.
*
@@ -169,7 +169,7 @@
public void endElement(QName element) throws XNIException {
handleEndElement(element);
}
-
+
/**
* The start of a CDATA section.
* @param augs Additional information that may include infoset augmentations
@@ -178,7 +178,7 @@
*/
public void startCDATA(Augmentations augs) throws XNIException {
}
-
+
/**
* The end of a CDATA section.
* @param augs Additional information that may include infoset augmentations
@@ -187,31 +187,31 @@
*/
public void endCDATA(Augmentations augs) throws XNIException {
}
-
-
-
+
+
+
/** Add default attributes and validate. */
public void addDTDDefaultAttrs(QName elementName, XMLAttributes attributes)
throws XNIException {
-
+
int elementIndex;
elementIndex = fDTDGrammar.getElementDeclIndex(elementName);
// is there anything to do?
if (elementIndex == -1 || fDTDGrammar == null) {
return;
}
-
+
//
// Check after all specified attrs are scanned
// (1) report error for REQUIRED attrs that are missing (V_TAGc)
// (2) add default attrs (FIXED and NOT_FIXED)
//
int attlistIndex = fDTDGrammar.getFirstAttributeDeclIndex(elementIndex);
-
+
while (attlistIndex != -1) {
-
+
fDTDGrammar.getAttributeDecl(attlistIndex, fTempAttDecl);
-
+
if (DEBUG_ATTRIBUTES) {
if (fTempAttDecl != null) {
XMLElementDecl elementDecl = new XMLElementDecl();
@@ -232,21 +232,21 @@
String attType = getAttributeTypeName(fTempAttDecl);
int attDefaultType = fTempAttDecl.simpleType.defaultType;
String attValue = null;
-
+
if (fTempAttDecl.simpleType.defaultValue != null) {
attValue = fTempAttDecl.simpleType.defaultValue;
}
boolean specified = false;
boolean required = attDefaultType == XMLSimpleType.DEFAULT_TYPE_REQUIRED;
boolean cdata = attType == XMLSymbols.fCDATASymbol;
-
+
if (!cdata || required || attValue != null) {
-
+
//check whether attribute is a namespace declaration
if (fNamespaceContext != null && attRawName.startsWith(XMLConstants.XMLNS_ATTRIBUTE)) {
String prefix = "";
int pos = attRawName.indexOf(':');
- if (pos != -1) {
+ if (pos != -1) {
prefix = attRawName.substring(0, pos);
} else {
prefix = attRawName;
@@ -259,7 +259,7 @@
}
specified = true;
} else {
-
+
int attrCount = attributes.getLength();
for (int i = 0; i < attrCount; i++) {
if (attributes.getQName(i) == attRawName) {
@@ -267,11 +267,11 @@
break;
}
}
-
+
}
-
+
}
-
+
if (!specified) {
if (attValue != null) {
if (fNamespaces) {
@@ -283,15 +283,15 @@
attLocalpart = fSymbolTable.addSymbol(attLocalpart);
}
}
- fTempQName.setValues(attPrefix, attLocalpart, attRawName,
+ fTempQName.setValues(attPrefix, attLocalpart, attRawName,
fTempAttDecl.name.uri);
- int newAttr = attributes.addAttribute(fTempQName, attType,
+ int newAttr = attributes.addAttribute(fTempQName, attType,
attValue);
}
}
attlistIndex = fDTDGrammar.getNextAttributeDeclIndex(attlistIndex);
}
-
+
// now iterate through the expanded attributes for
// 1. if every attribute seen is declared in the DTD
// 2. check if the VC: default_fixed holds
@@ -314,19 +314,19 @@
if (!declared) {
continue;
}
-
+
String type = getAttributeTypeName(fTempAttDecl);
attributes.setType(i, type);
-
+
boolean changedByNormalization = false;
if (attributes.isSpecified(i) && type != XMLSymbols.fCDATASymbol) {
changedByNormalization = normalizeAttrValue(attributes, i);
}
} // for all attributes
-
+
} // addDTDDefaultAttrsAndValidate(int,XMLAttrList)
-
-
+
+
/**
* Normalize the attribute value of a non CDATA attributes collapsing
* sequences of space characters (x20)
@@ -343,19 +343,19 @@
int eaten = 0;
String attrValue = attributes.getValue(index);
char[] attValue = new char[attrValue.length()];
-
+
fBuffer.setLength(0);
attrValue.getChars(0, attrValue.length(), attValue, 0);
for (int i = 0; i < attValue.length; i++) {
-
+
if (attValue[i] == ' ') {
-
+
// now the tricky part
if (readingNonSpace) {
spaceStart = true;
readingNonSpace = false;
}
-
+
if (spaceStart && !leadingSpace) {
spaceStart = false;
fBuffer.append(attValue[i]);
@@ -365,7 +365,7 @@
eaten++;
}
}
-
+
} else {
readingNonSpace = true;
spaceStart = false;
@@ -374,25 +374,25 @@
count++;
}
}
-
+
// check if the last appended character is a space.
if (count > 0 && fBuffer.charAt(count - 1) == ' ') {
fBuffer.setLength(count - 1);
-
+
}
String newValue = fBuffer.toString();
attributes.setValue(index, newValue);
return !attrValue.equals(newValue);
}
-
-
-
+
+
+
/** convert attribute type from ints to strings */
private String getAttributeTypeName(XMLAttributeDecl attrDecl) {
-
+
switch (attrDecl.simpleType.type) {
case XMLSimpleType.TYPE_ENTITY: {
- return attrDecl.simpleType.list ? XMLSymbols.fENTITIESSymbol :
+ return attrDecl.simpleType.list ? XMLSymbols.fENTITIESSymbol :
XMLSymbols.fENTITYSymbol;
}
case XMLSimpleType.TYPE_ENUMERATION: {
@@ -411,11 +411,11 @@
return XMLSymbols.fIDSymbol;
}
case XMLSimpleType.TYPE_IDREF: {
- return attrDecl.simpleType.list ? XMLSymbols.fIDREFSSymbol :
+ return attrDecl.simpleType.list ? XMLSymbols.fIDREFSSymbol :
XMLSymbols.fIDREFSymbol;
}
case XMLSimpleType.TYPE_NMTOKEN: {
- return attrDecl.simpleType.list ? XMLSymbols.fNMTOKENSSymbol :
+ return attrDecl.simpleType.list ? XMLSymbols.fNMTOKENSSymbol :
XMLSymbols.fNMTOKENSymbol;
}
case XMLSimpleType.TYPE_NOTATION: {
@@ -423,27 +423,27 @@
}
}
return XMLSymbols.fCDATASymbol;
-
+
}
-
-
+
+
/** ensure element stack capacity */
private void ensureStackCapacity(int newElementDepth) {
if (newElementDepth == fElementContentState.length) {
boolean[] newStack = new boolean[newElementDepth * 2];
- System.arraycopy(this.fElementContentState, 0, newStack, 0,
+ System.arraycopy(this.fElementContentState, 0, newStack, 0,
newElementDepth);
fElementContentState = newStack;
}
}
-
-
-
+
+
+
/** Handle element
* @return true if validator is removed from the pipeline
*/
protected void handleStartElement(QName element, XMLAttributes attributes) throws XNIException {
-
+
if (fDTDGrammar == null) {
fCurrentElementIndex = -1;
fCurrentContentSpecType = -1;
@@ -456,14 +456,14 @@
//handleDTDDefaultAttrs(element,attributes);
addDTDDefaultAttrs(element, attributes);
}
-
+
fInElementContent = fCurrentContentSpecType == XMLElementDecl.TYPE_CHILDREN;
fElementDepth++;
ensureStackCapacity(fElementDepth);
fElementContentState[fElementDepth] = fInElementContent;
}
-
-
+
+
/** Handle end element. */
protected void handleEndElement(QName element) throws XNIException {
if (fDTDGrammar == null) return;
@@ -479,11 +479,11 @@
}
fInElementContent = fElementContentState[fElementDepth];
}
-
+
public boolean isInElementContent() {
return fInElementContent;
}
-
+
public boolean isIgnorableWhiteSpace(XMLString text) {
if (isInElementContent()) {
for (int i = text.offset; i < text.offset + text.length; i++) {
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/AttributeImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/AttributeImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/AttributeImpl.java Wed May 02 13:32:36 2012 +0100
@@ -48,17 +48,17 @@
//attribute value
private String fValue;
private String fNonNormalizedvalue;
-
+
//name of the attribute
private QName fQName;
//attribute type
private String fAttributeType = "CDATA";
-
-
+
+
//A flag indicating whether this attribute was actually specified in the start-tag
//of its element or was defaulted from the schema.
private boolean fIsSpecified;
-
+
public AttributeImpl(){
init();
}
@@ -67,96 +67,95 @@
fQName = new QName(name);
fValue = value;
}
-
+
public AttributeImpl(String prefix, String name, String value) {
this(prefix, null,name, value, null,null,false );
}
-
+
public AttributeImpl(String prefix, String uri, String localPart, String value, String type) {
this(prefix, uri, localPart, value, null, type, false);
}
-
+
public AttributeImpl(String prefix, String uri, String localPart, String value, String nonNormalizedvalue, String type, boolean isSpecified) {
this(new QName(uri, localPart, prefix), value, nonNormalizedvalue, type, isSpecified);
}
-
-
+
+
public AttributeImpl(QName qname, String value, String nonNormalizedvalue, String type, boolean isSpecified) {
init();
fQName = qname ;
fValue = value ;
if(type != null && !type.equals(""))
fAttributeType = type;
-
+
fNonNormalizedvalue = nonNormalizedvalue;
fIsSpecified = isSpecified ;
-
+
}
-
+
public String toString() {
if( fQName.getPrefix() != null && fQName.getPrefix().length() > 0 )
return fQName.getPrefix() + ":" + fQName.getLocalPart() + "='" + fValue + "'";
else
return fQName.getLocalPart() + "='" + fValue + "'";
}
-
+
public void setName(QName name){
fQName = name ;
}
-
+
public QName getName() {
return fQName;
}
-
+
public void setValue(String value){
fValue = value;
}
-
+
public String getValue() {
return fValue;
}
-
+
public void setNonNormalizedValue(String nonNormalizedvalue){
fNonNormalizedvalue = nonNormalizedvalue;
}
-
+
public String getNonNormalizedValue(){
return fNonNormalizedvalue ;
}
-
+
public void setAttributeType(String attributeType){
fAttributeType = attributeType ;
}
-
+
/** Gets the type of this attribute, default is "CDATA */
// We dont need to take care of default value.. implementation takes care of it.
public String getDTDType() {
return fAttributeType;
}
-
+
/** is this attribute is specified in the instance document */
-
+
public void setSpecified(boolean isSpecified){
fIsSpecified = isSpecified ;
}
-
+
public boolean isSpecified() {
return fIsSpecified ;
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write(toString());
}
-
+
protected void init(){
setEventType(XMLEvent.ATTRIBUTE);
}
-
-
-
-
+
+
+
+
}//AttributeImpl
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/CharacterEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/CharacterEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/CharacterEvent.java Wed May 02 13:32:36 2012 +0100
@@ -50,12 +50,12 @@
private boolean fIsSpace = false;
/*used to prevent scanning of data multiple times */
private boolean fCheckIfSpaceNeeded = true;
-
+
public CharacterEvent() {
fIsCData = false;
init();
}
-
+
/**
*
* @param data Character Data.
@@ -65,7 +65,7 @@
init();
fData = data;
}
-
+
/**
*
* @param data Character Data.
@@ -76,7 +76,7 @@
fData = data;
fIsCData = flag;
}
-
+
/**
*
* @param data Character Data.
@@ -89,11 +89,11 @@
fIsCData = flag;
fIsIgnorableWhitespace = isIgnorableWhiteSpace ;
}
-
+
protected void init() {
setEventType(XMLEvent.CHARACTERS);
}
-
+
/**
*
* @return return data.
@@ -101,7 +101,7 @@
public String getData() {
return fData;
}
-
+
/**
*
* @param String data
@@ -110,7 +110,7 @@
fData = data;
fCheckIfSpaceNeeded = true;
}
-
+
/**
*
* @return boolean returns true if the data is CData
@@ -118,7 +118,7 @@
public boolean isCData() {
return fIsCData;
}
-
+
/**
*
* @return String return the String representation of this event.
@@ -129,7 +129,7 @@
else
return fData;
}
-
+
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
* No indentation or whitespace should be outputted.
*
@@ -150,10 +150,10 @@
if (fIsCData) {
writer.write("");
} else {
- charEncode(writer, fData);
+ charEncode(writer, fData);
}
}
-
+
/**
* Return true if this is ignorableWhiteSpace. If
* this event is ignorableWhiteSpace its event type will
@@ -163,7 +163,7 @@
public boolean isIgnorableWhiteSpace() {
return fIsIgnorableWhitespace;
}
-
+
/**
* Returns true if this set of Characters
* is all whitespace. Whitspace inside a document
@@ -180,7 +180,7 @@
}
return fIsSpace;
}
-
+
private void checkWhiteSpace(){
//for now - remove dependancy of XMLChar
if(fData != null && fData.length() >0 ){
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/CommentEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/CommentEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/CommentEvent.java Wed May 02 13:32:36 2012 +0100
@@ -34,31 +34,31 @@
* @author Neeraj Bajaj, Sun Microsystems.
*/
public class CommentEvent extends DummyEvent implements Comment {
-
+
/* String data for this event */
private String fText ;
-
+
public CommentEvent() {
init();
}
-
+
public CommentEvent(String text) {
init();
fText = text;
}
-
+
protected void init() {
setEventType(XMLEvent.COMMENT);
}
-
+
/**
* @return String String representation of this event
*/
public String toString() {
return "";
}
-
-
+
+
/** Return the string data of the comment, returns empty string if it
* does not exist
* @return String
@@ -67,10 +67,10 @@
return fText ;
}
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write("");
- }
-
+ }
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/DTDEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/DTDEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/DTDEvent.java Wed May 02 13:32:36 2012 +0100
@@ -34,51 +34,51 @@
*
*/
public class DTDEvent extends DummyEvent implements DTD{
-
+
private String fDoctypeDeclaration;
private java.util.List fNotations;
private java.util.List fEntities;
-
+
/** Creates a new instance of DTDEvent */
public DTDEvent() {
init();
}
-
+
public DTDEvent(String doctypeDeclaration){
init();
fDoctypeDeclaration = doctypeDeclaration;
}
-
+
public void setDocumentTypeDeclaration(String doctypeDeclaration){
fDoctypeDeclaration = doctypeDeclaration;
}
-
+
public String getDocumentTypeDeclaration() {
return fDoctypeDeclaration;
}
-
+
//xxx: we can change the signature if the implementation doesn't store the entities in List Datatype.
//and then convert that DT to list format here. That way callee dont need to bother about conversion
-
+
public void setEntities(java.util.List entites){
fEntities = entites;
}
-
+
public java.util.List getEntities() {
return fEntities;
}
-
+
//xxx: we can change the signature if the implementation doesn't store the entities in List Datatype.
//and then convert that DT to list format here. That way callee dont need to bother about conversion
-
+
public void setNotations(java.util.List notations){
fNotations = notations;
}
-
+
public java.util.List getNotations() {
return fNotations;
}
-
+
/**
*Returns an implementation defined representation of the DTD.
* This method may return null if no representation is available.
@@ -87,18 +87,18 @@
public Object getProcessedDTD() {
return null;
}
-
+
protected void init(){
setEventType(XMLEvent.DTD);
}
-
+
public String toString(){
return fDoctypeDeclaration ;
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write(fDoctypeDeclaration);
- }
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/DummyEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/DummyEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/DummyEvent.java Wed May 02 13:32:36 2012 +0100
@@ -47,59 +47,59 @@
// Make sure that getLocation() never returns null. Instead, return this dummy location
// that indicates "nowhere" as effectively as possible.
private static DummyLocation nowhere = new DummyLocation();
-
+
/* Event type this event corresponds to */
private int fEventType;
protected Location fLocation = (Location) nowhere;
-
+
public DummyEvent() {
}
-
+
public DummyEvent(int i) {
fEventType = i;
}
-
+
public int getEventType() {
return fEventType;
}
-
+
protected void setEventType(int eventType){
fEventType = eventType;
}
-
-
+
+
public boolean isStartElement() {
return fEventType == XMLEvent.START_ELEMENT;
}
-
+
public boolean isEndElement() {
return fEventType == XMLEvent.END_ELEMENT;
}
-
+
public boolean isEntityReference() {
return fEventType == XMLEvent.ENTITY_REFERENCE;
}
-
+
public boolean isProcessingInstruction() {
return fEventType == XMLEvent.PROCESSING_INSTRUCTION;
}
-
+
public boolean isCharacterData() {
return fEventType == XMLEvent.CHARACTERS;
}
-
+
public boolean isStartDocument() {
return fEventType == XMLEvent.START_DOCUMENT;
}
-
+
public boolean isEndDocument() {
return fEventType == XMLEvent.END_DOCUMENT;
}
-
+
public Location getLocation(){
return fLocation;
}
-
+
void setLocation(Location loc){
if (loc == null) {
fLocation = nowhere;
@@ -107,28 +107,28 @@
fLocation = loc;
}
}
-
+
/** Returns this event as Characters, may result in
* a class cast exception if this event is not Characters.
*/
public Characters asCharacters() {
return (Characters)this;
}
-
+
/** Returns this event as an end element event, may result in
* a class cast exception if this event is not a end element.
*/
public EndElement asEndElement() {
return (EndElement)this;
}
-
+
/** Returns this event as a start element event, may result in
* a class cast exception if this event is not a start element.
*/
public StartElement asStartElement() {
return (StartElement)this;
}
-
+
/** This method is provided for implementations to provide
* optional type information about the associated event.
* It is optional and will return null if no information
@@ -138,28 +138,28 @@
//Base class will take care of providing extra information about this event.
return null;
}
-
+
/** A utility function to check if this event is an Attribute.
* @see Attribute
*/
public boolean isAttribute() {
return fEventType == XMLEvent.ATTRIBUTE;
}
-
+
/** A utility function to check if this event is Characters.
* @see Characters
*/
public boolean isCharacters() {
return fEventType == XMLEvent.CHARACTERS;
}
-
+
/** A utility function to check if this event is a Namespace.
* @see Namespace
*/
public boolean isNamespace() {
return fEventType == XMLEvent.NAMESPACE;
}
-
+
/** This method will write the XMLEvent as per the XML 1.0 specification as Unicode characters.
* No indentation or whitespace should be outputted.
*
@@ -187,13 +187,13 @@
* @throws XMLStreamException if there is a fatal error writing the event
* @throws IOException if there is an IO error
*/
- protected abstract void writeAsEncodedUnicodeEx(Writer writer)
+ protected abstract void writeAsEncodedUnicodeEx(Writer writer)
throws IOException, XMLStreamException;
/** Helper method to escape < > & for characters event and
* quotes, lt and amps for Entity
*/
- protected void charEncode(Writer writer, String data)
+ protected void charEncode(Writer writer, String data)
throws IOException
{
if (data == null || data == "") return;
@@ -228,13 +228,13 @@
}
}
// Write any pending data
- writer.write(data, start, len - start);
+ writer.write(data, start, len - start);
}
-
+
static class DummyLocation implements Location {
public DummyLocation() {
}
-
+
public int getCharacterOffset() {
return -1;
}
@@ -242,15 +242,15 @@
public int getColumnNumber() {
return -1;
}
-
+
public int getLineNumber() {
return -1;
}
-
+
public String getPublicId() {
return null;
}
-
+
public String getSystemId() {
return null;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndDocumentEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndDocumentEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndDocumentEvent.java Wed May 02 13:32:36 2012 +0100
@@ -38,24 +38,24 @@
public class EndDocumentEvent extends DummyEvent
implements EndDocument {
-
+
public EndDocumentEvent() {
init();
}
-
+
protected void init() {
setEventType(XMLStreamConstants.END_DOCUMENT);
}
-
+
public String toString() {
return "ENDDOCUMENT";
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
//end document
- }
-
-
+ }
+
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndElementEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndElementEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EndElementEvent.java Wed May 02 13:32:36 2012 +0100
@@ -44,38 +44,38 @@
public class EndElementEvent extends DummyEvent
implements EndElement {
-
+
List fNamespaces = null;
QName fQName ;
-
+
public EndElementEvent() {
init();
}
-
+
protected void init() {
setEventType(XMLEvent.END_ELEMENT);
fNamespaces = new ArrayList();
}
-
-
+
+
public EndElementEvent(String prefix, String uri, String localpart) {
this(new QName(uri,localpart,prefix));
}
-
+
public EndElementEvent(QName qname) {
this.fQName = qname;
init();
}
-
+
public QName getName() {
return fQName;
}
-
+
public void setName(QName qname) {
this.fQName = qname;
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write("");
@@ -86,8 +86,8 @@
}
writer.write(fQName.getLocalPart());
writer.write('>');
- }
-
+ }
+
/** Returns an Iterator of namespaces that have gone out
* of scope. Returns an empty iterator if no namespaces have gone
* out of scope.
@@ -99,19 +99,19 @@
fNamespaces.iterator();
return new ReadOnlyIterator();
}
-
+
void addNamespace(Namespace attr){
if(attr != null){
fNamespaces.add(attr);
}
}
-
+
public String toString() {
String s = "" + nameAsString();
s = s + ">";
return s;
}
-
+
public String nameAsString() {
if("".equals(fQName.getNamespaceURI()))
return fQName.getLocalPart();
@@ -120,5 +120,5 @@
else
return "['" + fQName.getNamespaceURI() + "']:" + fQName.getLocalPart();
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityDeclarationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -37,89 +37,89 @@
* @author Neeraj Bajaj, Sun Microsystems.
*/
public class EntityDeclarationImpl extends DummyEvent implements EntityDeclaration {
-
+
private XMLResourceIdentifier fXMLResourceIdentifier ;
private String fEntityName;
private String fReplacementText;
private String fNotationName;
-
+
/** Creates a new instance of EntityDeclarationImpl */
public EntityDeclarationImpl() {
init();
}
-
+
public EntityDeclarationImpl(String entityName , String replacementText){
this(entityName,replacementText,null);
-
+
}
-
+
public EntityDeclarationImpl(String entityName, String replacementText, XMLResourceIdentifier resourceIdentifier){
init();
fEntityName = entityName;
fReplacementText = replacementText;
fXMLResourceIdentifier = resourceIdentifier;
}
-
+
public void setEntityName(String entityName){
fEntityName = entityName;
}
-
+
public String getEntityName(){
return fEntityName;
}
-
+
public void setEntityReplacementText(String replacementText){
fReplacementText = replacementText;
}
-
+
public void setXMLResourceIdentifier(XMLResourceIdentifier resourceIdentifier){
fXMLResourceIdentifier = resourceIdentifier ;
}
-
+
public XMLResourceIdentifier getXMLResourceIdentifier(){
return fXMLResourceIdentifier;
}
-
+
public String getSystemId(){
if(fXMLResourceIdentifier != null)
return fXMLResourceIdentifier.getLiteralSystemId();
return null;
}
-
+
public String getPublicId(){
if(fXMLResourceIdentifier != null)
return fXMLResourceIdentifier.getPublicId();
-
+
return null;
}
-
+
public String getBaseURI() {
if(fXMLResourceIdentifier != null)
return fXMLResourceIdentifier.getBaseSystemId();
return null;
}
-
+
public String getName(){
return fEntityName;
}
-
+
public String getNotationName() {
return fNotationName;
}
-
+
public void setNotationName(String notationName){
fNotationName = notationName;
}
-
+
public String getReplacementText() {
return fReplacementText;
}
-
+
protected void init(){
setEventType(XMLEvent.ENTITY_DECLARATION);
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write("");
- }
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityReferenceEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityReferenceEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/EntityReferenceEvent.java Wed May 02 13:32:36 2012 +0100
@@ -38,43 +38,43 @@
implements EntityReference {
private EntityDeclaration fEntityDeclaration ;
private String fEntityName;
-
+
public EntityReferenceEvent() {
init();
}
-
+
public EntityReferenceEvent(String entityName , EntityDeclaration entityDeclaration) {
init();
fEntityName = entityName;
fEntityDeclaration = entityDeclaration ;
}
-
+
public String getName() {
return fEntityName;
}
-
+
public String toString() {
String text = fEntityDeclaration.getReplacementText();
if(text == null)
text = "";
return "&" + getName() + ";='" + text + "'";
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write('&');
writer.write(getName());
writer.write(';');
- }
-
+ }
+
public EntityDeclaration getDeclaration(){
return fEntityDeclaration ;
}
-
+
protected void init() {
setEventType(XMLEvent.ENTITY_REFERENCE);
}
-
-
+
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/NamedEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/NamedEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/NamedEvent.java Wed May 02 13:32:36 2012 +0100
@@ -32,35 +32,35 @@
*
*/
public class NamedEvent extends DummyEvent {
-
+
private QName name;
-
+
public NamedEvent() {
}
-
-
+
+
public NamedEvent(QName qname) {
this.name = qname;
}
-
-
+
+
public NamedEvent(String prefix, String uri, String localpart) {
this.name = new QName(uri, localpart, prefix);
}
-
+
public String getPrefix() {
return this.name.getPrefix();
}
-
-
+
+
public QName getName() {
return name;
}
-
+
public void setName(QName qname) {
this.name = qname;
}
-
+
public String nameAsString() {
if("".equals(name.getNamespaceURI()))
return name.getLocalPart();
@@ -69,15 +69,15 @@
else
return "['" + name.getNamespaceURI() + "']:" + name.getLocalPart();
}
-
+
public String getNamespace(){
return name.getNamespaceURI();
}
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write(nameAsString());
- }
-
+ }
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/NotationDeclarationImpl.java Wed May 02 13:32:36 2012 +0100
@@ -35,55 +35,55 @@
* @author k.venugopal@sun.com
*/
public class NotationDeclarationImpl extends DummyEvent implements NotationDeclaration {
-
+
String fName = null;
String fPublicId = null;
String fSystemId = null;
-
+
/** Creates a new instance of NotationDeclarationImpl */
public NotationDeclarationImpl() {
setEventType(XMLEvent.NOTATION_DECLARATION);
}
-
+
public NotationDeclarationImpl(String name,String publicId,String systemId){
this.fName = name;
this.fPublicId = publicId;
this.fSystemId = systemId;
setEventType(XMLEvent.NOTATION_DECLARATION);
}
-
+
public NotationDeclarationImpl(XMLNotationDecl notation){
this.fName = notation.name;
this.fPublicId = notation.publicId;
this.fSystemId = notation.systemId;
setEventType(XMLEvent.NOTATION_DECLARATION);
}
-
+
public String getName() {
return fName;
}
-
+
public String getPublicId() {
return fPublicId;
}
-
+
public String getSystemId() {
return fSystemId;
}
-
+
void setPublicId(String publicId){
this.fPublicId = publicId;
}
-
+
void setSystemId(String systemId){
this.fSystemId = systemId;
}
-
+
void setName(String name){
this.fName = name;
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write("";
@@ -91,11 +91,11 @@
else
return "?>";
}
-
- protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
+
+ protected void writeAsEncodedUnicodeEx(java.io.Writer writer)
throws java.io.IOException
{
writer.write(toString());
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/com/sun/xml/internal/stream/events/StartDocumentEvent.java
--- a/sources/jaxp_src/src/com/sun/xml/internal/stream/events/StartDocumentEvent.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/com/sun/xml/internal/stream/events/StartDocumentEvent.java Wed May 02 13:32:36 2012 +0100
@@ -38,7 +38,7 @@
public class StartDocumentEvent extends DummyEvent
implements StartDocument {
-
+
protected String fSystemId;
protected String fEncodingScheam;
protected boolean fStandalone;
@@ -50,20 +50,20 @@
public StartDocumentEvent() {
init("UTF-8","1.0",true,null);
}
-
+
public StartDocumentEvent(String encoding){
init(encoding,"1.0",true,null);
}
-
+
public StartDocumentEvent(String encoding, String version){
init(encoding,version,true,null);
}
-
+
public StartDocumentEvent(String encoding, String version, boolean standalone){
this.fStandaloneSet = true;
init(encoding,version,standalone,null);
}
-
+
public StartDocumentEvent(String encoding, String version, boolean standalone,Location loc){
this.fStandaloneSet = true;
init(encoding, version, standalone, loc);
@@ -81,32 +81,32 @@
}
this.fLocation = loc;
}
-
+
public String getSystemId() {
if(fLocation == null )
return "";
else
return fLocation.getSystemId();
}
-
-
+
+
public String getCharacterEncodingScheme() {
return fEncodingScheam;
}
-
+
public boolean isStandalone() {
return fStandalone;
}
-
+
public String getVersion() {
return fVersion;
}
-
+
public void setStandalone(boolean flag) {
fStandaloneSet = true;
fStandalone = flag;
}
-
+
public void setStandalone(String s) {
fStandaloneSet = true;
if(s == null) {
@@ -118,27 +118,27 @@
else
fStandalone = false;
}
-
+
public boolean encodingSet() {
return fEncodingSchemeSet;
}
-
+
public boolean standaloneSet() {
return fStandaloneSet;
}
-
+
public void setEncoding(String encoding) {
fEncodingScheam = encoding;
}
-
+
void setDeclaredEncoding(boolean value){
fEncodingSchemeSet = value;
}
-
+
public void setVersion(String s) {
fVersion = s;
}
-
+
void clear() {
fEncodingScheam = "UTF-8";
fStandalone = true;
@@ -146,7 +146,7 @@
fEncodingSchemeSet = false;
fStandaloneSet = false;
}
-
+
public String toString() {
String s = "AbstractMap
in order to support a getter for
- * implementation-specific properties. For example, you can get
- * the underlying OutputStream
by casting an instance
- * of this class to Map
and calling
- * getProperty(OUTPUTSTREAM_PROPERTY)
.
+ * This class implements a StAX XMLStreamWriter. It extends
+ * AbstractMap
in order to support a getter for
+ * implementation-specific properties. For example, you can get
+ * the underlying OutputStream
by casting an instance
+ * of this class to Map
and calling
+ * getProperty(OUTPUTSTREAM_PROPERTY)
.
*
* @author Neeraj Bajaj
* @author K.Venugopal
@@ -96,7 +96,7 @@
boolean fEscapeCharacters = true;
/**
- * Flag for the value of repairNamespace property
+ * Flag for the value of repairNamespace property
*/
private boolean fIsRepairingNamespace = false;
@@ -121,39 +121,39 @@
*/
private ArrayList fNamespaceDecls;
- /**
+ /**
* Namespace context encapsulating user specified context
- * and context built by the writer
+ * and context built by the writer
*/
private NamespaceContextImpl fNamespaceContext = null;
-
+
private NamespaceSupport fInternalNamespaceContext = null;
-
+
private Random fPrefixGen = null;
- /**
- * Reference to PropertyManager
+ /**
+ * Reference to PropertyManager
*/
private PropertyManager fPropertyManager = null;
- /**
- * Flag to track if start tag is opened
+ /**
+ * Flag to track if start tag is opened
*/
private boolean fStartTagOpened = false;
/**
- * Boolean flag to indicate, if instance can be reused
+ * Boolean flag to indicate, if instance can be reused
*/
private boolean fReuse;
-
+
private SymbolTable fSymbolTable = new SymbolTable();
-
+
private ElementStack fElementStack = new ElementStack(); //Change this .-Venu
-
+
final private String DEFAULT_PREFIX = fSymbolTable.addSymbol("");
-
+
private final ReadOnlyIterator fReadOnlyIterator = new ReadOnlyIterator();
-
+
/**
* In some cases, this charset encoder is used to determine if a char is
* encodable by underlying writer. For example, an 8-bit char from the
@@ -164,7 +164,7 @@
/**
* This is used to hold the namespace for attributes which happen to have
- * the same uri as the default namespace; It's added to avoid changing the
+ * the same uri as the default namespace; It's added to avoid changing the
* current impl. which has many redundant code for the repair mode
*/
HashMap fAttrNamespace = null;
@@ -181,7 +181,7 @@
// cannot call this(outputStream, null, props); for constructor,
// OutputStreamWriter charsetName cannot be null
-
+
// use default encoding
this(new OutputStreamWriter(outputStream), props);
}
@@ -233,6 +233,7 @@
fPrefixGen = new Random();
fAttributeCache = new ArrayList();
fInternalNamespaceContext = new NamespaceSupport();
+ fInternalNamespaceContext.reset();
fNamespaceContext = new NamespaceContextImpl();
fNamespaceContext.internalContext = fInternalNamespaceContext;
@@ -292,13 +293,13 @@
*/
public void setOutput(StreamResult sr, String encoding)
throws IOException {
-
+
if (sr.getOutputStream() != null) {
setOutputUsingStream(sr.getOutputStream(), encoding);
- }
+ }
else if (sr.getWriter() != null) {
setOutputUsingWriter(sr.getWriter());
- }
+ }
else if (sr.getSystemId() != null) {
setOutputUsingStream(new FileOutputStream(sr.getSystemId()),
encoding);
@@ -306,10 +307,10 @@
}
private void setOutputUsingWriter(Writer writer)
- throws IOException
+ throws IOException
{
fWriter = writer;
-
+
if (writer instanceof OutputStreamWriter) {
String charset = ((OutputStreamWriter) writer).getEncoding();
if (charset != null && !charset.equalsIgnoreCase("utf-8")) {
@@ -320,7 +321,7 @@
/**
* Utility method to create a writer when passed an OutputStream. Make
- * sure to wrap an OutputStreamWriter
using an
+ * sure to wrap an OutputStreamWriter
using an
* XMLWriter
for performance reasons.
*
* @param os Underlying OutputStream
@@ -329,7 +330,7 @@
private void setOutputUsingStream(OutputStream os, String encoding)
throws IOException {
fOutputStream = os;
-
+
if (encoding != null) {
if (encoding.equalsIgnoreCase("utf-8")) {
fWriter = new UTF8OutputStreamWriter(os);
@@ -383,6 +384,8 @@
fElementStack.clear();
fInternalNamespaceContext.reset();
fReuse = true;
+ fStartTagOpened = false;
+ fNamespaceContext.userContext = null;
}
/**
@@ -508,7 +511,7 @@
if ((tmpURI != null) && (tmpURI == uri)) {
return;
}
-
+
if(checkUserNamespaceContext(prefix,uri))
return;
QName qname = new QName();
@@ -624,16 +627,16 @@
return;
}
}
-
+
if (!prefix.equals(XMLConstants.XML_NS_PREFIX) || !namespaceURI.equals(XMLConstants.XML_NS_URI)) {
-
+
prefix = fSymbolTable.addSymbol(prefix);
namespaceURI = fSymbolTable.addSymbol(namespaceURI);
-
+
if (fInternalNamespaceContext.containsPrefixInCurrentContext(prefix)){
-
+
String tmpURI = fInternalNamespaceContext.getURI(prefix);
-
+
if (tmpURI != null && tmpURI != namespaceURI){
throw new XMLStreamException("Prefix "+prefix+" is " +
"already bound to "+tmpURI+
@@ -773,11 +776,11 @@
}
namespaceURINormalized = fSymbolTable.addSymbol(namespaceURINormalized);
-
+
if (fInternalNamespaceContext.containsPrefixInCurrentContext("")){
-
+
String tmp = fInternalNamespaceContext.getURI("");
-
+
if (tmp != null && tmp != namespaceURINormalized) {
throw new XMLStreamException(
"xmlns has been already bound to " +tmp +
@@ -982,7 +985,7 @@
try {
QName qname = null;
-
+
if (!fStartTagOpened) {
throw new IllegalStateException(
"Invalid state: start tag is not opened at writeNamespace("
@@ -991,7 +994,7 @@
+ namespaceURINormalized
+ ")");
}
-
+
// is this the default Namespace?
if (prefix == null
|| prefix.equals(XMLConstants.DEFAULT_NS_PREFIX)
@@ -1005,7 +1008,7 @@
prefix = fSymbolTable.addSymbol(prefix);
namespaceURINormalized = fSymbolTable.addSymbol(namespaceURINormalized);
-
+
if (fIsRepairingNamespace) {
String tmpURI = fInternalNamespaceContext.getURI(prefix);
@@ -1021,23 +1024,23 @@
return;
}
-
+
if (fInternalNamespaceContext.containsPrefixInCurrentContext(prefix)){
-
+
String tmp = fInternalNamespaceContext.getURI(prefix);
-
+
if (tmp != null && tmp != namespaceURINormalized) {
-
+
throw new XMLStreamException("prefix "+prefix+
" has been already bound to " +tmp +
". Rebinding it to "+ namespaceURINormalized+
" is an error");
}
}
-
+
fInternalNamespaceContext.declarePrefix(prefix, namespaceURINormalized);
writenamespace(prefix, namespaceURINormalized);
-
+
} catch (IOException e) {
throw new XMLStreamException(e);
}
@@ -1161,14 +1164,14 @@
return;
}
-
+
String streamEncoding = null;
if (fWriter instanceof OutputStreamWriter) {
- streamEncoding = ((OutputStreamWriter) fWriter).getEncoding();
- }
+ streamEncoding = ((OutputStreamWriter) fWriter).getEncoding();
+ }
else if (fWriter instanceof UTF8OutputStreamWriter) {
- streamEncoding = ((UTF8OutputStreamWriter) fWriter).getEncoding();
- }
+ streamEncoding = ((UTF8OutputStreamWriter) fWriter).getEncoding();
+ }
else if (fWriter instanceof XMLWriter) {
streamEncoding = ((OutputStreamWriter) ((XMLWriter)fWriter).getWriter()).getEncoding();
}
@@ -1184,14 +1187,14 @@
}
// If no alias matches the encoding name, then report error
if (!foundAlias) {
- throw new XMLStreamException("Underlying stream encoding '"
- + streamEncoding
+ throw new XMLStreamException("Underlying stream encoding '"
+ + streamEncoding
+ "' and input paramter for writeStartDocument() method '"
+ encoding + "' do not match.");
}
- }
-
-
+ }
+
+
fWriter.write("Private constructor to prevent instantiation.
*/
- private XMLConstants() {
- }
+ private XMLConstants() {
+ }
/**
* Namespace URI to use to represent that there is no Namespace.
@@ -124,12 +124,12 @@
* Namespaces in XML, 3. Qualified Names
*/
public static final String XMLNS_ATTRIBUTE = "xmlns";
-
+
/**
* W3C XML Schema Namespace URI.
- * + * *Defined to be " W3C XML Schema Instance Namespace URI. Defined to be " W3C XPath Datatype Namespace URI. Defined to be "http://www.w3.org/2001/XMLSchema
".
- *
+ *
* @see
* XML Schema Part 1:
@@ -140,9 +140,9 @@
/**
* http://www.w3.org/2001/XMLSchema-instance
".http://www.w3.org/2003/11/xpath-datatypes
".
W3C XPath Datatype Namespace URI.
+ * + *Defined to be "http://www.w3.org/2003/11/xpath-datatypes
".
XML Document Type Declaration Namespace URI as an arbitrary value.
- * + * *Since not formally defined by any existing standard, arbitrarily define to be "http://www.w3.org/TR/REC-xml
".
*/
public static final String XML_DTD_NS_URI = "http://www.w3.org/TR/REC-xml";
- /**
- *
RELAX NG Namespace URI.
- * - *Defined to be "http://relaxng.org/ns/structure/1.0
".
Feature for secure processing.
- * - *true
instructs the implementation to process XML securely.
- * This may set limits on XML constructs to avoid conditions such as denial of service attacks.
- * false
instructs the implementation to process XML acording the letter of the XML specifications
- * ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
- * RELAX NG Namespace URI.
+ * + *Defined to be "http://relaxng.org/ns/structure/1.0
".
Feature for secure processing.
+ * + *true
instructs the implementation to process XML securely.
+ * This may set limits on XML constructs to avoid conditions such as denial of service attacks.
+ * false
instructs the implementation to process XML acording the letter of the XML specifications
+ * ingoring security issues such as limits on XML constructs to avoid conditions such as denial of service attacks.
+ * Factory that creates new javax.xml.datatype
Object
s that map XML to/from Java Object
s.
{@link #newInstance()} is used to create a new DatatypeFactory
.
* The following implementation resolution mechanisms are used in the following order:
Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
- * - *Default value is javax.xml.datatype.DatatypeFactory
.
Default property name as defined in JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * + *Default value is javax.xml.datatype.DatatypeFactory
.
Default implementation class name as defined in - * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
- * - *Implementers should specify the name of an appropriate class - * to be instantiated if no other implementation resolution mechanism - * succeeds.
- * - *Users should not refer to this field; it is intended only to - * document a factory implementation detail. - *
- */ - public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = new String("com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl"); - + /** + *Default implementation class name as defined in + * JSR 206: Java(TM) API for XML Processing (JAXP) 1.3.
+ * + *Implementers should specify the name of an appropriate class + * to be instantiated if no other implementation resolution mechanism + * succeeds.
+ * + *Users should not refer to this field; it is intended only to + * document a factory implementation detail. + *
+ */ + public static final String DATATYPEFACTORY_IMPLEMENTATION_CLASS = new String("com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl"); + /** * http://www.w3.org/TR/xpath-datamodel/#xdtschema defines two regexps * to constrain the value space of dayTimeDuration ([^YM]*[DT].*) @@ -101,69 +101,69 @@ private static final Pattern XDTSCHEMA_DTD = Pattern.compile("[^YM]*[DT].*"); - /** - *Protected constructor to prevent instaniation outside of package.
- * - *Use {@link #newInstance()} to create a DatatypeFactory
.
Obtain a new instance of a DatatypeFactory
.
Protected constructor to prevent instaniation outside of package.
+ * + *Use {@link #newInstance()} to create a DatatypeFactory
.
Obtain a new instance of a DatatypeFactory
.
The implementation resolution mechanisms are defined in this
* Class
's documentation.
DatatypeFactory
- *
- * @throws DatatypeConfigurationException If the implementation is not
- * available or cannot be instantiated.
+ *
+ * @return New instance of a DatatypeFactory
+ *
+ * @throws DatatypeConfigurationException If the implementation is not
+ * available or cannot be instantiated.
*
* @see #newInstance(String factoryClassName, ClassLoader classLoader)
- */
- public static DatatypeFactory newInstance()
- throws DatatypeConfigurationException {
-
- try {
- return (DatatypeFactory) FactoryFinder.find(
- /* The default property name according to the JAXP spec */
- DATATYPEFACTORY_PROPERTY,
- /* The fallback implementation class name */
- DATATYPEFACTORY_IMPLEMENTATION_CLASS);
- } catch (FactoryFinder.ConfigurationError e) {
- throw new DatatypeConfigurationException(e.getMessage(), e.getException());
- }
- }
-
+ */
+ public static DatatypeFactory newInstance()
+ throws DatatypeConfigurationException {
+
+ try {
+ return (DatatypeFactory) FactoryFinder.find(
+ /* The default property name according to the JAXP spec */
+ DATATYPEFACTORY_PROPERTY,
+ /* The fallback implementation class name */
+ DATATYPEFACTORY_IMPLEMENTATION_CLASS);
+ } catch (FactoryFinder.ConfigurationError e) {
+ throw new DatatypeConfigurationException(e.getMessage(), e.getException());
+ }
+ }
+
/**
* Obtain a new instance of a DatatypeFactory
from class name.
* This function is useful when there are multiple providers in the classpath.
* It gives more control to the application as it can specify which provider
* should be loaded.
Once an application has obtained a reference to a DatatypeFactory
+ *
Once an application has obtained a reference to a DatatypeFactory
* it can use the factory to configure and obtain datatype instances.
Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems try:
** java -Djaxp.debug=1 YourProgram .... *- * + * * @param factoryClassName fully qualified factory class name that provides implementation of
javax.xml.datatype.DatatypeFactory
.
*
- * @param classLoader ClassLoader
used to load the factory class. If null
+ * @param classLoader ClassLoader
used to load the factory class. If null
* current Thread
's context classLoader is used to load the factory class.
*
* @return New instance of a DatatypeFactory
*
- * @throws DatatypeConfigurationException if factoryClassName
is null
, or
+ * @throws DatatypeConfigurationException if factoryClassName
is null
, or
* the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
@@ -172,55 +172,55 @@
*/
public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader)
throws DatatypeConfigurationException {
- try {
+ try {
return (DatatypeFactory) FactoryFinder.newInstance(factoryClassName, classLoader, false);
} catch (FactoryFinder.ConfigurationError e) {
throw new DatatypeConfigurationException(e.getMessage(), e.getException());
- }
+ }
}
-
- /**
- * Obtain a new instance of a Duration
- * specifying the Duration
as its string representation, "PnYnMnDTnHnMnS",
- * as defined in XML Schema 1.0 section 3.2.6.1.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration
as:
- * duration represents a duration of time. - * The value space of duration is a six-dimensional space where the coordinates designate the - * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. - * These components are ordered in their significance by their order of appearance i.e. as - * year, month, day, hour, minute, and second. - *+ + /** + *
Obtain a new instance of a Duration
+ * specifying the Duration
as its string representation, "PnYnMnDTnHnMnS",
+ * as defined in XML Schema 1.0 section 3.2.6.1.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration
as:
+ * duration represents a duration of time. + * The value space of duration is a six-dimensional space where the coordinates designate the + * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. + * These components are ordered in their significance by their order of appearance i.e. as + * year, month, day, hour, minute, and second. + **
All six values are set and availabe from the created {@link Duration}
- * + * *The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * - * @param lexicalRepresentationString
representation of a Duration
.
- *
- * @return New Duration
created from parsing the lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException if lexicalRepresentation
is null
.
- */
- public abstract Duration newDuration(final String lexicalRepresentation);
-
- /**
- * Obtain a new instance of a Duration
- * specifying the Duration
as milliseconds.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration
as:
- * duration represents a duration of time. - * The value space of duration is a six-dimensional space where the coordinates designate the - * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. - * These components are ordered in their significance by their order of appearance i.e. as - * year, month, day, hour, minute, and second. - *+ * + * @param lexicalRepresentation
String
representation of a Duration
.
+ *
+ * @return New Duration
created from parsing the lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException if lexicalRepresentation
is null
.
+ */
+ public abstract Duration newDuration(final String lexicalRepresentation);
+
+ /**
+ * Obtain a new instance of a Duration
+ * specifying the Duration
as milliseconds.
XML Schema Part 2: Datatypes, 3.2.6 duration, defines duration
as:
+ * duration represents a duration of time. + * The value space of duration is a six-dimensional space where the coordinates designate the + * Gregorian year, month, day, hour, minute, and second components defined in Section 5.5.3.2 of [ISO 8601], respectively. + * These components are ordered in their significance by their order of appearance i.e. as + * year, month, day, hour, minute, and second. + **
All six values are set by computing their values from the specified milliseconds
* and are availabe using the get
methods of the created {@link Duration}.
* The values conform to and are defined by:
The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., - * {@link java.util.Calendar#YEAR} = 1970, - * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, - * {@link java.util.Calendar#DATE} = 1, etc. - * This is important as there are variations in the Gregorian Calendar, - * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} - * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.
- * - * @param durationInMilliSeconds Duration in milliseconds to create. - * - * @return NewDuration
representing durationInMilliSeconds
.
- */
- public abstract Duration newDuration(final long durationInMilliSeconds);
-
- /**
- * Obtain a new instance of a Duration
- * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., + * {@link java.util.Calendar#YEAR} = 1970, + * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, + * {@link java.util.Calendar#DATE} = 1, etc. + * This is important as there are variations in the Gregorian Calendar, + * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} + * so the result of {@link Duration#getMonths()} and {@link Duration#getDays()} can be influenced.
+ * + * @param durationInMilliSeconds Duration in milliseconds to create. + * + * @return NewDuration
representing durationInMilliSeconds
.
+ */
+ public abstract Duration newDuration(final long durationInMilliSeconds);
+
+ /**
+ * Obtain a new instance of a Duration
+ * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * + * *A null
value indicates that field is not set.
false
to create a negative duration. When the length
- * of the duration is zero, this parameter will be ignored.
- * @param years of this Duration
- * @param months of this Duration
- * @param days of this Duration
- * @param hours of this Duration
- * @param minutes of this Duration
- * @param seconds of this Duration
- *
- * @return New Duration
created from the specified values.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if all the fields (years, months, ...) are null or
- * if any of the fields is negative.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- */
- public abstract Duration newDuration(
- final boolean isPositive,
- final BigInteger years,
- final BigInteger months,
- final BigInteger days,
- final BigInteger hours,
- final BigInteger minutes,
- final BigDecimal seconds);
+ *
+ * @param isPositive Set to false
to create a negative duration. When the length
+ * of the duration is zero, this parameter will be ignored.
+ * @param years of this Duration
+ * @param months of this Duration
+ * @param days of this Duration
+ * @param hours of this Duration
+ * @param minutes of this Duration
+ * @param seconds of this Duration
+ *
+ * @return New Duration
created from the specified values.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if all the fields (years, months, ...) are null or
+ * if any of the fields is negative.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ */
+ public abstract Duration newDuration(
+ final boolean isPositive,
+ final BigInteger years,
+ final BigInteger months,
+ final BigInteger days,
+ final BigInteger hours,
+ final BigInteger minutes,
+ final BigDecimal seconds);
- /**
- * Obtain a new instance of a Duration
- * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
Obtain a new instance of a Duration
+ * specifying the Duration
as isPositive, years, months, days, hours, minutes, seconds.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * + * * @param isPositive Set tofalse
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
* @param years of this Duration
@@ -296,112 +296,112 @@
* @param hours of this Duration
* @param minutes of this Duration
* @param seconds of this Duration
- *
- * @return New Duration
created from the specified values.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields is negative.
- *
- * @see #newDuration(
- * boolean isPositive,
- * BigInteger years,
- * BigInteger months,
- * BigInteger days,
- * BigInteger hours,
- * BigInteger minutes,
- * BigDecimal seconds)
- */
- public Duration newDuration(
- final boolean isPositive,
- final int years,
- final int months,
- final int days,
- final int hours,
- final int minutes,
- final int seconds) {
-
- // years may not be set
- BigInteger realYears = (years != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) years) : null;
-
- // months may not be set
- BigInteger realMonths = (months != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) months) : null;
+ *
+ * @return New Duration
created from the specified values.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields is negative.
+ *
+ * @see #newDuration(
+ * boolean isPositive,
+ * BigInteger years,
+ * BigInteger months,
+ * BigInteger days,
+ * BigInteger hours,
+ * BigInteger minutes,
+ * BigDecimal seconds)
+ */
+ public Duration newDuration(
+ final boolean isPositive,
+ final int years,
+ final int months,
+ final int days,
+ final int hours,
+ final int minutes,
+ final int seconds) {
+
+ // years may not be set
+ BigInteger realYears = (years != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) years) : null;
+
+ // months may not be set
+ BigInteger realMonths = (months != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) months) : null;
- // days may not be set
- BigInteger realDays = (days != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) days) : null;
+ // days may not be set
+ BigInteger realDays = (days != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) days) : null;
- // hours may not be set
- BigInteger realHours = (hours != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) hours) : null;
+ // hours may not be set
+ BigInteger realHours = (hours != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) hours) : null;
- // minutes may not be set
- BigInteger realMinutes = (minutes != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) minutes) : null;
-
- // seconds may not be set
- BigDecimal realSeconds = (seconds != DatatypeConstants.FIELD_UNDEFINED) ? BigDecimal.valueOf((long) seconds) : null;
+ // minutes may not be set
+ BigInteger realMinutes = (minutes != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) minutes) : null;
+
+ // seconds may not be set
+ BigDecimal realSeconds = (seconds != DatatypeConstants.FIELD_UNDEFINED) ? BigDecimal.valueOf((long) seconds) : null;
- return newDuration(
- isPositive,
- realYears,
- realMonths,
- realDays,
- realHours,
- realMinutes,
- realSeconds
- );
- }
-
- /**
- * Create a Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
- * "PnDTnHnMnS",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
Create a Duration
of type xdt:dayTimeDuration
by parsing its String
representation,
+ * "PnDTnHnMnS",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
All four values are set and availabe from the created {@link Duration}
- * + * *The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * - * @param lexicalRepresentation Lexical representation of a duration. - * - * @return NewDuration
created using the specified lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
- public Duration newDurationDayTime(final String lexicalRepresentation) {
- // lexicalRepresentation must be non-null
- if (lexicalRepresentation == null) {
- throw new NullPointerException(
+ *
+ * @param lexicalRepresentation Lexical representation of a duration.
+ *
+ * @return New Duration
created using the specified lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of days and time.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ public Duration newDurationDayTime(final String lexicalRepresentation) {
+ // lexicalRepresentation must be non-null
+ if (lexicalRepresentation == null) {
+ throw new NullPointerException(
"Trying to create an xdt:dayTimeDuration with an invalid"
+ " lexical representation of \"null\"");
- }
+ }
- // test lexicalRepresentation against spec regex
- Matcher matcher = XDTSCHEMA_DTD.matcher(lexicalRepresentation);
- if (!matcher.matches()) {
- throw new IllegalArgumentException(
+ // test lexicalRepresentation against spec regex
+ Matcher matcher = XDTSCHEMA_DTD.matcher(lexicalRepresentation);
+ if (!matcher.matches()) {
+ throw new IllegalArgumentException(
"Trying to create an xdt:dayTimeDuration with an invalid"
+ " lexical representation of \"" + lexicalRepresentation
+ "\", data model requires years and months only.");
- }
+ }
- return newDuration(lexicalRepresentation);
- }
+ return newDuration(lexicalRepresentation);
+ }
- /**
- * Create a Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
Create a Duration
of type xdt:dayTimeDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
All four values are set by computing their values from the specified milliseconds
* and are availabe using the get
methods of the created {@link Duration}.
* The values conform to and are defined by:
The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., - * {@link java.util.Calendar#YEAR} = 1970, - * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, - * {@link java.util.Calendar#DATE} = 1, etc. - * This is important as there are variations in the Gregorian Calendar, - * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} - * so the result of {@link Duration#getDays()} can be influenced.
- * + * + *The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., + * {@link java.util.Calendar#YEAR} = 1970, + * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, + * {@link java.util.Calendar#DATE} = 1, etc. + * This is important as there are variations in the Gregorian Calendar, + * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} + * so the result of {@link Duration#getDays()} can be influenced.
+ * *Any remaining milliseconds after determining the day, hour, minute and second are discarded.
- * - * @param durationInMilliseconds Milliseconds ofDuration
to create.
- *
- * @return New Duration
created with the specified durationInMilliseconds
.
- *
- * @see
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
- */
- public Duration newDurationDayTime(final long durationInMilliseconds) {
-
- return newDuration(durationInMilliseconds);
- }
-
- /**
- * Create a Duration
of type xdt:dayTimeDuration
using the specified
- * day
, hour
, minute
and second
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
Duration
to create.
+ *
+ * @return New Duration
created with the specified durationInMilliseconds
.
+ *
+ * @see
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration
+ */
+ public Duration newDurationDayTime(final long durationInMilliseconds) {
+
+ return newDuration(durationInMilliseconds);
+ }
+
+ /**
+ * Create a Duration
of type xdt:dayTimeDuration
using the specified
+ * day
, hour
, minute
and second
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * + * *A null
value indicates that field is not set.
false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration
.
- * @param hour Hour of Duration
.
- * @param minute Minute of Duration
.
- * @param second Second of Duration
.
- *
- * @return New Duration
created with the specified day
, hour
, minute
- * and second
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if all the fields (day, hour, ...) are null or
- * if any of the fields is negative.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- */
- public Duration newDurationDayTime(
- final boolean isPositive,
- final BigInteger day,
- final BigInteger hour,
- final BigInteger minute,
- final BigInteger second) {
-
- return newDuration(
- isPositive,
- null, // years
- null, // months
- day,
- hour,
- minute,
- (second != null)? new BigDecimal(second):null
- );
- }
-
- /**
- * Create a Duration
of type xdt:dayTimeDuration
using the specified
- * day
, hour
, minute
and second
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
- * whose lexical representation contains only day, hour, minute, and second components.
- * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
Duration
.
+ * @param hour Hour of Duration
.
+ * @param minute Minute of Duration
.
+ * @param second Second of Duration
.
+ *
+ * @return New Duration
created with the specified day
, hour
, minute
+ * and second
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if all the fields (day, hour, ...) are null or
+ * if any of the fields is negative.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ */
+ public Duration newDurationDayTime(
+ final boolean isPositive,
+ final BigInteger day,
+ final BigInteger hour,
+ final BigInteger minute,
+ final BigInteger second) {
+
+ return newDuration(
+ isPositive,
+ null, // years
+ null, // months
+ day,
+ hour,
+ minute,
+ (second != null)? new BigDecimal(second):null
+ );
+ }
+
+ /**
+ * Create a Duration
of type xdt:dayTimeDuration
using the specified
+ * day
, hour
, minute
and second
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:dayTimeDuration.
The datatype xdt:dayTimeDuration
is a subtype of xs:duration
+ * whose lexical representation contains only day, hour, minute, and second components.
+ * This datatype resides in the namespace http://www.w3.org/2003/11/xpath-datatypes
.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * + * * @param isPositive Set tofalse
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param day Day of Duration
.
- * @param hour Hour of Duration
.
- * @param minute Minute of Duration
.
- * @param second Second of Duration
.
- *
- * @return New Duration
created with the specified day
, hour
, minute
- * and second
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields (day, hour, ...) is negative.
- */
- public Duration newDurationDayTime(
- final boolean isPositive,
- final int day,
- final int hour,
- final int minute,
- final int second) {
-
- return newDurationDayTime(
- isPositive,
- BigInteger.valueOf((long) day),
- BigInteger.valueOf((long) hour),
- BigInteger.valueOf((long) minute),
- BigInteger.valueOf((long) second)
- );
- }
+ * @param day Day of Duration
.
+ * @param hour Hour of Duration
.
+ * @param minute Minute of Duration
.
+ * @param second Second of Duration
.
+ *
+ * @return New Duration
created with the specified day
, hour
, minute
+ * and second
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields (day, hour, ...) is negative.
+ */
+ public Duration newDurationDayTime(
+ final boolean isPositive,
+ final int day,
+ final int hour,
+ final int minute,
+ final int second) {
- /**
- * Create a Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
- * "PnYnM",
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
Create a Duration
of type xdt:yearMonthDuration
by parsing its String
representation,
+ * "PnYnM",
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
Both values are set and availabe from the created {@link Duration}
- * + * *The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * - * @param lexicalRepresentation Lexical representation of a duration. - * - * @return NewDuration
created using the specified lexicalRepresentation
.
- *
- * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- * @throws NullPointerException If lexicalRepresentation
is null
.
- */
+ *
+ * @param lexicalRepresentation Lexical representation of a duration.
+ *
+ * @return New Duration
created using the specified lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If lexicalRepresentation
is not a valid representation of a Duration
expressed only in terms of years and months.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
public Duration newDurationYearMonth(
final String lexicalRepresentation) {
@@ -569,18 +569,18 @@
+ "\", data model requires days and times only.");
}
- return newDuration(lexicalRepresentation);
+ return newDuration(lexicalRepresentation);
}
- /**
- * Create a Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration
is a subtype of xs:duration
- * whose lexical representation contains only year and month components.
- * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
Create a Duration
of type xdt:yearMonthDuration
using the specified milliseconds as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The datatype xdt:yearMonthDuration
is a subtype of xs:duration
+ * whose lexical representation contains only year and month components.
+ * This datatype resides in the namespace {@link javax.xml.XMLConstants#W3C_XPATH_DATATYPE_NS_URI}.
Both values are set by computing their values from the specified milliseconds
* and are availabe using the get
methods of the created {@link Duration}.
* The values conform to and are defined by:
The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., - * {@link java.util.Calendar#YEAR} = 1970, - * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, - * {@link java.util.Calendar#DATE} = 1, etc. - * This is important as there are variations in the Gregorian Calendar, - * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} - * so the result of {@link Duration#getMonths()} can be influenced.
- * + * + *The default start instance is defined by {@link GregorianCalendar}'s use of the start of the epoch: i.e., + * {@link java.util.Calendar#YEAR} = 1970, + * {@link java.util.Calendar#MONTH} = {@link java.util.Calendar#JANUARY}, + * {@link java.util.Calendar#DATE} = 1, etc. + * This is important as there are variations in the Gregorian Calendar, + * e.g. leap years have different days in the month = {@link java.util.Calendar#FEBRUARY} + * so the result of {@link Duration#getMonths()} can be influenced.
+ * *Any remaining milliseconds after determining the year and month are discarded.
- * - * @param durationInMilliseconds Milliseconds ofDuration
to create.
- *
- * @return New Duration
created using the specified durationInMilliseconds
.
- */
+ *
+ * @param durationInMilliseconds Milliseconds of Duration
to create.
+ *
+ * @return New Duration
created using the specified durationInMilliseconds
.
+ */
public Duration newDurationYearMonth(
final long durationInMilliseconds) {
@@ -624,95 +624,95 @@
return newDurationYearMonth(isPositive, years, months);
}
- /**
- * Create a Duration
of type xdt:yearMonthDuration
using the specified
- * year
and month
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
Create a Duration
of type xdt:yearMonthDuration
using the specified
+ * year
and month
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
The XML Schema specification states that values can be of an arbitrary size. * Implementations may chose not to or be incapable of supporting arbitrarily large and/or small values. * An {@link UnsupportedOperationException} will be thrown with a message indicating implementation limits * if implementation capacities are exceeded.
- * + * *A null
value indicates that field is not set.
false
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration
.
- * @param month Month of Duration
.
- *
- * @return New Duration
created using the specified year
and month
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if all of the fields (year, month) are null or
- * if any of the fields is negative.
- * @throws UnsupportedOperationException If implementation cannot support requested values.
- */
- public Duration newDurationYearMonth(
- final boolean isPositive,
- final BigInteger year,
- final BigInteger month) {
-
- return newDuration(
- isPositive,
- year,
- month,
- null, // days
- null, // hours
- null, // minutes
- null // seconds
- );
- }
+ * @param year Year of Duration
.
+ * @param month Month of Duration
.
+ *
+ * @return New Duration
created using the specified year
and month
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if all of the fields (year, month) are null or
+ * if any of the fields is negative.
+ * @throws UnsupportedOperationException If implementation cannot support requested values.
+ */
+ public Duration newDurationYearMonth(
+ final boolean isPositive,
+ final BigInteger year,
+ final BigInteger month) {
- /**
- * Create a Duration
of type xdt:yearMonthDuration
using the specified
- * year
and month
as defined in
- *
- * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
Create a Duration
of type xdt:yearMonthDuration
using the specified
+ * year
and month
as defined in
+ *
+ * XQuery 1.0 and XPath 2.0 Data Model, xdt:yearMonthDuration.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * + * * @param isPositive Set tofalse
to create a negative duration. When the length
* of the duration is zero, this parameter will be ignored.
- * @param year Year of Duration
.
- * @param month Month of Duration
.
- *
- * @return New Duration
created using the specified year
and month
.
- *
- * @throws IllegalArgumentException If the values are not a valid representation of a
- * Duration
: if any of the fields (year, month) is negative.
- */
- public Duration newDurationYearMonth(
- final boolean isPositive,
- final int year,
- final int month) {
-
- return newDurationYearMonth(
- isPositive,
- BigInteger.valueOf((long) year),
- BigInteger.valueOf((long) month));
- }
+ * @param year Year of Duration
.
+ * @param month Month of Duration
.
+ *
+ * @return New Duration
created using the specified year
and month
.
+ *
+ * @throws IllegalArgumentException If the values are not a valid representation of a
+ * Duration
: if any of the fields (year, month) is negative.
+ */
+ public Duration newDurationYearMonth(
+ final boolean isPositive,
+ final int year,
+ final int month) {
- /**
- * Create a new instance of an XMLGregorianCalendar
.
Create a new instance of an XMLGregorianCalendar
.
All date/time datatype fields set to {@link DatatypeConstants#FIELD_UNDEFINED} or null.
- * + * * @return NewXMLGregorianCalendar
with all date/time datatype fields set to
* {@link DatatypeConstants#FIELD_UNDEFINED} or null.
- */
- public abstract XMLGregorianCalendar newXMLGregorianCalendar();
-
- /**
- * Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
- * - *Parsing the lexical string representation is defined in + */ + public abstract XMLGregorianCalendar newXMLGregorianCalendar(); + + /** + *
Create a new XMLGregorianCalendar by parsing the String as a lexical representation.
+ * + *Parsing the lexical string representation is defined in * XML Schema 1.0 Part 2, Section 3.2.[7-14].1, * Lexical Representation.
- * + * *The string representation may not have any leading and trailing whitespaces.
- * + * *The parsing is done field by field so that * the following holds for any lexically correct String x:
*@@ -721,344 +721,344 @@ *Except for the noted lexical/canonical representation mismatches * listed in * XML Schema 1.0 errata, Section 3.2.7.2.
- * - * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes. - * - * @returnXMLGregorianCalendar
created from thelexicalRepresentation
. - * - * @throws IllegalArgumentException If thelexicalRepresentation
is not a validXMLGregorianCalendar
. - * @throws NullPointerException IflexicalRepresentation
isnull
. - */ - public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation); - - /** - *Create an
- * - *XMLGregorianCalendar
from a {@link GregorianCalendar}.
- * Field by Field Conversion from - * {@link GregorianCalendar} to an {@link XMLGregorianCalendar} - * | - *|
---|---|
java.util.GregorianCalendar field |
- * javax.xml.datatype.XMLGregorianCalendar field |
- *
ERA == GregorianCalendar.BC ? -YEAR : YEAR |
- * {@link XMLGregorianCalendar#setYear(int year)} | - *
MONTH + 1 |
- * {@link XMLGregorianCalendar#setMonth(int month)} | - *
DAY_OF_MONTH |
- * {@link XMLGregorianCalendar#setDay(int day)} | - *
HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND |
- * {@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)} | - *
- * (ZONE_OFFSET + DST_OFFSET) / (60*1000) - * (in minutes) - * |
- * {@link XMLGregorianCalendar#setTimezone(int offset)}* - * | - *
*conversion loss of information. It is not possible to represent
- * a java.util.GregorianCalendar
daylight savings timezone id in the
- * XML Schema 1.0 date/time datatype representation.
To compute the return value's TimeZone
field,
- *
this.getTimezone() != FIELD_UNDEFINED
,
- * create a java.util.TimeZone
with a custom timezone id
- * using the this.getTimezone()
.GregorianCalendar
default timezone value
- * for the host is defined as specified by
- * java.util.TimeZone.getDefault()
.java.util.GregorianCalendar
used to create XMLGregorianCalendar
- *
- * @return XMLGregorianCalendar
created from java.util.GregorianCalendar
- *
- * @throws NullPointerException If cal
is null
.
- */
- public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
+ *
+ * @param lexicalRepresentation Lexical representation of one the eight XML Schema date/time datatypes.
+ *
+ * @return XMLGregorianCalendar
created from the lexicalRepresentation
.
+ *
+ * @throws IllegalArgumentException If the lexicalRepresentation
is not a valid XMLGregorianCalendar
.
+ * @throws NullPointerException If lexicalRepresentation
is null
.
+ */
+ public abstract XMLGregorianCalendar newXMLGregorianCalendar(final String lexicalRepresentation);
- /**
- * Constructor allowing for complete value spaces allowed by
- * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
- * builtin datatypes. Note that year
parameter supports
- * arbitrarily large numbers and fractionalSecond has infinite
- * precision.
Create an XMLGregorianCalendar
from a {@link GregorianCalendar}.
+ * Field by Field Conversion from + * {@link GregorianCalendar} to an {@link XMLGregorianCalendar} + * | + *|
---|---|
java.util.GregorianCalendar field |
+ * javax.xml.datatype.XMLGregorianCalendar field |
+ *
ERA == GregorianCalendar.BC ? -YEAR : YEAR |
+ * {@link XMLGregorianCalendar#setYear(int year)} | + *
MONTH + 1 |
+ * {@link XMLGregorianCalendar#setMonth(int month)} | + *
DAY_OF_MONTH |
+ * {@link XMLGregorianCalendar#setDay(int day)} | + *
HOUR_OF_DAY, MINUTE, SECOND, MILLISECOND |
+ * {@link XMLGregorianCalendar#setTime(int hour, int minute, int second, BigDecimal fractional)} | + *
+ * (ZONE_OFFSET + DST_OFFSET) / (60*1000) + * (in minutes) + * |
+ * {@link XMLGregorianCalendar#setTimezone(int offset)}* + * | + *
*conversion loss of information. It is not possible to represent
+ * a java.util.GregorianCalendar
daylight savings timezone id in the
+ * XML Schema 1.0 date/time datatype representation.
To compute the return value's TimeZone
field,
+ *
this.getTimezone() != FIELD_UNDEFINED
,
+ * create a java.util.TimeZone
with a custom timezone id
+ * using the this.getTimezone()
.GregorianCalendar
default timezone value
+ * for the host is defined as specified by
+ * java.util.TimeZone.getDefault()
.java.util.GregorianCalendar
used to create XMLGregorianCalendar
+ *
+ * @return XMLGregorianCalendar
created from java.util.GregorianCalendar
+ *
+ * @throws NullPointerException If cal
is null
.
+ */
+ public abstract XMLGregorianCalendar newXMLGregorianCalendar(final GregorianCalendar cal);
+
+ /**
+ * Constructor allowing for complete value spaces allowed by
+ * W3C XML Schema 1.0 recommendation for xsd:dateTime and related
+ * builtin datatypes. Note that year
parameter supports
+ * arbitrarily large numbers and fractionalSecond has infinite
+ * precision.
A null
value indicates that field is not set.
XMLGregorianCalendar
to be created.
- * @param month of XMLGregorianCalendar
to be created.
- * @param day of XMLGregorianCalendar
to be created.
- * @param hour of XMLGregorianCalendar
to be created.
- * @param minute of XMLGregorianCalendar
to be created.
- * @param second of XMLGregorianCalendar
to be created.
- * @param fractionalSecond of XMLGregorianCalendar
to be created.
- * @param timezone of XMLGregorianCalendar
to be created.
- *
- * @return XMLGregorianCalendar
created from specified values.
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- */
- public abstract XMLGregorianCalendar newXMLGregorianCalendar(
- final BigInteger year,
- final int month,
- final int day,
- final int hour,
- final int minute,
- final int second,
- final BigDecimal fractionalSecond,
- final int timezone);
-
- /**
- * Constructor of value spaces that a
- * java.util.GregorianCalendar
instance would need to convert to an
- * XMLGregorianCalendar
instance.
XMLGregorianCalendar eon
and
- * fractionalSecond
are set to null
XMLGregorianCalendar
to be created.
+ * @param month of XMLGregorianCalendar
to be created.
+ * @param day of XMLGregorianCalendar
to be created.
+ * @param hour of XMLGregorianCalendar
to be created.
+ * @param minute of XMLGregorianCalendar
to be created.
+ * @param second of XMLGregorianCalendar
to be created.
+ * @param fractionalSecond of XMLGregorianCalendar
to be created.
+ * @param timezone of XMLGregorianCalendar
to be created.
+ *
+ * @return XMLGregorianCalendar
created from specified values.
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ */
+ public abstract XMLGregorianCalendar newXMLGregorianCalendar(
+ final BigInteger year,
+ final int month,
+ final int day,
+ final int hour,
+ final int minute,
+ final int second,
+ final BigDecimal fractionalSecond,
+ final int timezone);
+
+ /**
+ * Constructor of value spaces that a
+ * java.util.GregorianCalendar
instance would need to convert to an
+ * XMLGregorianCalendar
instance.
XMLGregorianCalendar eon
and
+ * fractionalSecond
are set to null
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * - * @param year ofXMLGregorianCalendar
to be created.
- * @param month of XMLGregorianCalendar
to be created.
- * @param day of XMLGregorianCalendar
to be created.
- * @param hour of XMLGregorianCalendar
to be created.
- * @param minute of XMLGregorianCalendar
to be created.
- * @param second of XMLGregorianCalendar
to be created.
- * @param millisecond of XMLGregorianCalendar
to be created.
- * @param timezone of XMLGregorianCalendar
to be created.
- *
- * @return XMLGregorianCalendar
created from specified values.
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- */
- public XMLGregorianCalendar newXMLGregorianCalendar(
- final int year,
- final int month,
- final int day,
- final int hour,
- final int minute,
- final int second,
- final int millisecond,
- final int timezone) {
-
- // year may be undefined
- BigInteger realYear = (year != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) year) : null;
-
- // millisecond may be undefined
- // millisecond must be >= 0 millisecond <= 1000
- BigDecimal realMillisecond = null; // undefined value
- if (millisecond != DatatypeConstants.FIELD_UNDEFINED) {
- if (millisecond < 0 || millisecond > 1000) {
- throw new IllegalArgumentException(
- "javax.xml.datatype.DatatypeFactory#newXMLGregorianCalendar("
- + "int year, int month, int day, int hour, int minute, int second, int millisecond, int timezone)"
- + "with invalid millisecond: " + millisecond
- );
- }
-
- realMillisecond = BigDecimal.valueOf((long) millisecond).movePointLeft(3);
- }
-
- return newXMLGregorianCalendar(
- realYear,
- month,
- day,
- hour,
- minute,
- second,
- realMillisecond,
- timezone
- );
- }
+ *
+ * @param year of XMLGregorianCalendar
to be created.
+ * @param month of XMLGregorianCalendar
to be created.
+ * @param day of XMLGregorianCalendar
to be created.
+ * @param hour of XMLGregorianCalendar
to be created.
+ * @param minute of XMLGregorianCalendar
to be created.
+ * @param second of XMLGregorianCalendar
to be created.
+ * @param millisecond of XMLGregorianCalendar
to be created.
+ * @param timezone of XMLGregorianCalendar
to be created.
+ *
+ * @return XMLGregorianCalendar
created from specified values.
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendar(
+ final int year,
+ final int month,
+ final int day,
+ final int hour,
+ final int minute,
+ final int second,
+ final int millisecond,
+ final int timezone) {
+
+ // year may be undefined
+ BigInteger realYear = (year != DatatypeConstants.FIELD_UNDEFINED) ? BigInteger.valueOf((long) year) : null;
- /**
- * Create a Java representation of XML Schema builtin datatype date
or g*
.
For example, an instance of gYear
can be created invoking this factory
- * with month
and day
parameters set to
- * {@link DatatypeConstants#FIELD_UNDEFINED}.
Create a Java representation of XML Schema builtin datatype date
or g*
.
For example, an instance of gYear
can be created invoking this factory
+ * with month
and day
parameters set to
+ * {@link DatatypeConstants#FIELD_UNDEFINED}.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * - * @param year ofXMLGregorianCalendar
to be created.
- * @param month of XMLGregorianCalendar
to be created.
- * @param day of XMLGregorianCalendar
to be created.
- * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
- * @return XMLGregorianCalendar
created from parameter values.
- *
- * @see DatatypeConstants#FIELD_UNDEFINED
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- */
- public XMLGregorianCalendar newXMLGregorianCalendarDate(
- final int year,
- final int month,
- final int day,
- final int timezone) {
-
- return newXMLGregorianCalendar(
- year,
- month,
- day,
- DatatypeConstants.FIELD_UNDEFINED, // hour
- DatatypeConstants.FIELD_UNDEFINED, // minute
- DatatypeConstants.FIELD_UNDEFINED, // second
- DatatypeConstants.FIELD_UNDEFINED, // millisecond
- timezone);
- }
-
- /**
- * Create a Java instance of XML Schema builtin datatype time
.
XMLGregorianCalendar
to be created.
+ * @param month of XMLGregorianCalendar
to be created.
+ * @param day of XMLGregorianCalendar
to be created.
+ * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
+ *
+ * @return XMLGregorianCalendar
created from parameter values.
+ *
+ * @see DatatypeConstants#FIELD_UNDEFINED
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendarDate(
+ final int year,
+ final int month,
+ final int day,
+ final int timezone) {
+
+ return newXMLGregorianCalendar(
+ year,
+ month,
+ day,
+ DatatypeConstants.FIELD_UNDEFINED, // hour
+ DatatypeConstants.FIELD_UNDEFINED, // minute
+ DatatypeConstants.FIELD_UNDEFINED, // second
+ DatatypeConstants.FIELD_UNDEFINED, // millisecond
+ timezone);
+ }
+
+ /**
+ * Create a Java instance of XML Schema builtin datatype time
.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * - * @param hours number of hours - * @param minutes number of minutes - * @param seconds number of seconds - * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set. - * - * @returnXMLGregorianCalendar
created from parameter values.
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- *
- * @see DatatypeConstants#FIELD_UNDEFINED
- */
- public XMLGregorianCalendar newXMLGregorianCalendarTime(
- final int hours,
- final int minutes,
- final int seconds,
- final int timezone) {
-
- return newXMLGregorianCalendar(
- DatatypeConstants.FIELD_UNDEFINED, // Year
- DatatypeConstants.FIELD_UNDEFINED, // Month
- DatatypeConstants.FIELD_UNDEFINED, // Day
- hours,
- minutes,
- seconds,
- DatatypeConstants.FIELD_UNDEFINED, //Millisecond
- timezone);
- }
-
- /**
- * Create a Java instance of XML Schema builtin datatype time.
- * + * + * @param hours number of hours + * @param minutes number of minutes + * @param seconds number of seconds + * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set. + * + * @returnXMLGregorianCalendar
created from parameter values.
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ *
+ * @see DatatypeConstants#FIELD_UNDEFINED
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendarTime(
+ final int hours,
+ final int minutes,
+ final int seconds,
+ final int timezone) {
+
+ return newXMLGregorianCalendar(
+ DatatypeConstants.FIELD_UNDEFINED, // Year
+ DatatypeConstants.FIELD_UNDEFINED, // Month
+ DatatypeConstants.FIELD_UNDEFINED, // Day
+ hours,
+ minutes,
+ seconds,
+ DatatypeConstants.FIELD_UNDEFINED, //Millisecond
+ timezone);
+ }
+
+ /**
+ * Create a Java instance of XML Schema builtin datatype time.
+ * *A null
value indicates that field is not set.
A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * - * @param hours number of hours - * @param minutes number of minutes - * @param seconds number of seconds - * @param fractionalSecond value ofnull
indicates that this optional field is not set.
- * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
- *
- * @return XMLGregorianCalendar
created from parameter values.
- *
- * @see DatatypeConstants#FIELD_UNDEFINED
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- */
- public XMLGregorianCalendar newXMLGregorianCalendarTime(
- final int hours,
- final int minutes,
- final int seconds,
- final BigDecimal fractionalSecond,
- final int timezone) {
-
- return newXMLGregorianCalendar(
- null, // year
- DatatypeConstants.FIELD_UNDEFINED, // month
- DatatypeConstants.FIELD_UNDEFINED, // day
- hours,
- minutes,
- seconds,
- fractionalSecond,
- timezone);
- }
+ *
+ * @param hours number of hours
+ * @param minutes number of minutes
+ * @param seconds number of seconds
+ * @param fractionalSecond value of null
indicates that this optional field is not set.
+ * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
+ *
+ * @return XMLGregorianCalendar
created from parameter values.
+ *
+ * @see DatatypeConstants#FIELD_UNDEFINED
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendarTime(
+ final int hours,
+ final int minutes,
+ final int seconds,
+ final BigDecimal fractionalSecond,
+ final int timezone) {
- /**
- * Create a Java instance of XML Schema builtin datatype time.
- * + return newXMLGregorianCalendar( + null, // year + DatatypeConstants.FIELD_UNDEFINED, // month + DatatypeConstants.FIELD_UNDEFINED, // day + hours, + minutes, + seconds, + fractionalSecond, + timezone); + } + + /** + *Create a Java instance of XML Schema builtin datatype time.
+ * *A {@link DatatypeConstants#FIELD_UNDEFINED} value indicates that field is not set.
- * - * @param hours number of hours - * @param minutes number of minutes - * @param seconds number of seconds - * @param milliseconds number of milliseconds - * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set. - * - * @returnXMLGregorianCalendar
created from parameter values.
- *
- * @see DatatypeConstants#FIELD_UNDEFINED
- *
- * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
- * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
- * or if the composite values constitute an invalid XMLGregorianCalendar
instance
- * as determined by {@link XMLGregorianCalendar#isValid()}.
- */
- public XMLGregorianCalendar newXMLGregorianCalendarTime(
- final int hours,
- final int minutes,
- final int seconds,
- final int milliseconds,
- final int timezone) {
-
- // millisecond may be undefined
- // millisecond must be >= 0 millisecond <= 1000
- BigDecimal realMilliseconds = null; // undefined value
- if (milliseconds != DatatypeConstants.FIELD_UNDEFINED) {
- if (milliseconds < 0 || milliseconds > 1000) {
- throw new IllegalArgumentException(
- "javax.xml.datatype.DatatypeFactory#newXMLGregorianCalendarTime("
- + "int hours, int minutes, int seconds, int milliseconds, int timezone)"
- + "with invalid milliseconds: " + milliseconds
- );
- }
-
- realMilliseconds = BigDecimal.valueOf((long) milliseconds).movePointLeft(3);
- }
-
- return newXMLGregorianCalendarTime(
- hours,
- minutes,
- seconds,
- realMilliseconds,
- timezone
- );
- }
+ *
+ * @param hours number of hours
+ * @param minutes number of minutes
+ * @param seconds number of seconds
+ * @param milliseconds number of milliseconds
+ * @param timezone offset in minutes. {@link DatatypeConstants#FIELD_UNDEFINED} indicates optional field is not set.
+ *
+ * @return XMLGregorianCalendar
created from parameter values.
+ *
+ * @see DatatypeConstants#FIELD_UNDEFINED
+ *
+ * @throws IllegalArgumentException If any individual parameter's value is outside the maximum value constraint for the field
+ * as determined by the Date/Time Data Mapping table in {@link XMLGregorianCalendar}
+ * or if the composite values constitute an invalid XMLGregorianCalendar
instance
+ * as determined by {@link XMLGregorianCalendar#isValid()}.
+ */
+ public XMLGregorianCalendar newXMLGregorianCalendarTime(
+ final int hours,
+ final int minutes,
+ final int seconds,
+ final int milliseconds,
+ final int timezone) {
+
+ // millisecond may be undefined
+ // millisecond must be >= 0 millisecond <= 1000
+ BigDecimal realMilliseconds = null; // undefined value
+ if (milliseconds != DatatypeConstants.FIELD_UNDEFINED) {
+ if (milliseconds < 0 || milliseconds > 1000) {
+ throw new IllegalArgumentException(
+ "javax.xml.datatype.DatatypeFactory#newXMLGregorianCalendarTime("
+ + "int hours, int minutes, int seconds, int milliseconds, int timezone)"
+ + "with invalid milliseconds: " + milliseconds
+ );
+ }
+
+ realMilliseconds = BigDecimal.valueOf((long) milliseconds).movePointLeft(3);
+ }
+
+ return newXMLGregorianCalendarTime(
+ hours,
+ minutes,
+ seconds,
+ realMilliseconds,
+ timezone
+ );
+ }
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/datatype/FactoryFinder.java
--- a/sources/jaxp_src/src/javax/xml/datatype/FactoryFinder.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/datatype/FactoryFinder.java Wed May 02 13:32:36 2012 +0100
@@ -37,30 +37,30 @@
/**
* Implements pluggable Datatypes.
- * + * *This class is duplicated for each JAXP subpackage so keep it in * sync. It is package private for secure class loading.
* * @author Santiago.PericasGeertsen@sun.com */ class FactoryFinder { - + /** * Internal debug flag. */ private static boolean debug = false; - + /** * Cache for properties in java.home/lib/jaxp.properties */ static Properties cacheProps = new Properties(); - + /** - * Flag indicating if properties from java.home/lib/jaxp.properties + * Flag indicating if properties from java.home/lib/jaxp.properties * have been cached. */ - static boolean firstTime = true; - + static volatile boolean firstTime = true; + /** * Security support class use to check access control before * getting certain system resources. @@ -75,29 +75,29 @@ String val = ss.getSystemProperty("jaxp.debug"); // Allow simply setting the prop to turn on debug debug = val != null && !"false".equals(val); - } + } catch (SecurityException se) { debug = false; } } - + private static void dPrint(String msg) { if (debug) { System.err.println("JAXP: " + msg); } } - + /** * Attempt to load a class using the class loader supplied. If that fails * and fall back is enabled, the current (i.e. bootstrap) class loader is - * tried. - * + * tried. + * * If the class loader supplied isnull
, first try using the
* context class loader followed by the current (i.e. bootstrap) class
- * loader.
+ * loader.
*/
static private Class getProviderClass(String className, ClassLoader cl,
- boolean doFallback) throws ClassNotFoundException
+ boolean doFallback) throws ClassNotFoundException
{
try {
if (cl == null) {
@@ -108,7 +108,7 @@
else {
return cl.loadClass(className);
}
- }
+ }
else {
return cl.loadClass(className);
}
@@ -117,15 +117,15 @@
if (doFallback) {
// Use current class loader - should always be bootstrap CL
return Class.forName(className, true, FactoryFinder.class.getClassLoader());
- }
+ }
else {
throw e1;
}
- }
+ }
}
-
+
/**
- * Create an instance of a class. Delegates to method
+ * Create an instance of a class. Delegates to method
* getProviderClass()
in order to load the class.
*
* @param className Name of the concrete class corresponding to the
@@ -136,30 +136,30 @@
*
* @param doFallback True if the current ClassLoader should be tried as
* a fallback if the class is not found using cl
- */
+ */
static Object newInstance(String className, ClassLoader cl, boolean doFallback)
throws ConfigurationError
{
try {
- Class providerClass = getProviderClass(className, cl, doFallback);
+ Class providerClass = getProviderClass(className, cl, doFallback);
Object instance = providerClass.newInstance();
if (debug) { // Extra check to avoid computing cl strings
dPrint("created new instance of " + providerClass +
" using ClassLoader: " + cl);
}
return instance;
- }
+ }
catch (ClassNotFoundException x) {
throw new ConfigurationError(
"Provider " + className + " not found", x);
- }
+ }
catch (Exception x) {
throw new ConfigurationError(
"Provider " + className + " could not be instantiated: " + x,
x);
}
}
-
+
/**
* Finds the implementation Class object in the specified order. Main
* entry point.
@@ -174,17 +174,17 @@
*/
static Object find(String factoryId, String fallbackClassName)
throws ConfigurationError
- {
+ {
dPrint("find factoryId =" + factoryId);
-
+
// Use the system property first
try {
String systemProp = ss.getSystemProperty(factoryId);
- if (systemProp != null) {
+ if (systemProp != null) {
dPrint("found system property, value=" + systemProp);
return newInstance(systemProp, null, true);
}
- }
+ }
catch (SecurityException se) {
if (debug) se.printStackTrace();
}
@@ -206,13 +206,13 @@
}
}
}
- factoryClassName = cacheProps.getProperty(factoryId);
+ factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
return newInstance(factoryClassName, null, true);
}
- }
+ }
catch (Exception ex) {
if (debug) ex.printStackTrace();
}
@@ -230,26 +230,26 @@
dPrint("loaded from fallback value: " + fallbackClassName);
return newInstance(fallbackClassName, null, true);
}
-
+
/*
* Try to find provider using Jar Service Provider Mechanism
*
* @return instance of provider class if found or null
*/
private static Object findJarServiceProvider(String factoryId)
- throws ConfigurationError
+ throws ConfigurationError
{
String serviceId = "META-INF/services/" + factoryId;
InputStream is = null;
-
+
// First try the Context ClassLoader
ClassLoader cl = ss.getContextClassLoader();
if (cl != null) {
is = ss.getResourceAsStream(cl, serviceId);
-
+
// If no provider found then try the current ClassLoader
if (is == null) {
- cl = FactoryFinder.class.getClassLoader();
+ cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
}
} else {
@@ -257,24 +257,24 @@
cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
}
-
+
if (is == null) {
// No provider found
return null;
}
-
+
if (debug) { // Extra check to avoid computing cl strings
dPrint("found jar resource=" + serviceId + " using ClassLoader: " + cl);
}
-
+
BufferedReader rd;
try {
rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- }
+ }
catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -285,24 +285,24 @@
// No provider found
return null;
}
-
+
if (factoryClassName != null && !"".equals(factoryClassName)) {
dPrint("found in resource, value=" + factoryClassName);
-
+
// Note: here we do not want to fall back to the current
// ClassLoader because we want to avoid the case where the
// resource file was found using one ClassLoader and the
// provider class was instantiated using a different one.
return newInstance(factoryClassName, cl, false);
}
-
+
// No provider found
return null;
}
-
+
static class ConfigurationError extends Error {
private Exception exception;
-
+
/**
* Construct a new instance with the specified detail string and
* exception.
@@ -311,7 +311,7 @@
super(msg);
this.exception = x;
}
-
+
Exception getException() {
return exception;
}
@@ -323,5 +323,5 @@
return exception;
}
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/datatype/SecuritySupport.java
--- a/sources/jaxp_src/src/javax/xml/datatype/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/datatype/SecuritySupport.java Wed May 02 13:32:36 2012 +0100
@@ -39,22 +39,22 @@
*/
class SecuritySupport {
-
+
ClassLoader getContextClassLoader() {
- return (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader cl = null;
- try {
- cl = Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) { }
- return cl;
- }
- });
+ return (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader cl = null;
+ try {
+ cl = Thread.currentThread().getContextClassLoader();
+ } catch (SecurityException ex) { }
+ return cl;
+ }
+ });
}
String getSystemProperty(final String propName) {
- return (String)
+ return (String)
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty(propName);
@@ -65,16 +65,16 @@
FileInputStream getFileInputStream(final File file)
throws FileNotFoundException
{
- try {
+ try {
return (FileInputStream)
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws FileNotFoundException {
return new FileInputStream(file);
}
});
- } catch (PrivilegedActionException e) {
- throw (FileNotFoundException)e.getException();
- }
+ } catch (PrivilegedActionException e) {
+ throw (FileNotFoundException)e.getException();
+ }
}
InputStream getResourceAsStream(final ClassLoader cl,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/parsers/DocumentBuilderFactory.java
--- a/sources/jaxp_src/src/javax/xml/parsers/DocumentBuilderFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/parsers/DocumentBuilderFactory.java Wed May 02 13:32:36 2012 +0100
@@ -39,7 +39,7 @@
*/
public abstract class DocumentBuilderFactory {
-
+
/** The default property name according to the JAXP spec */
private static final String DEFAULT_PROPERTY_NAME = "javax.xml.parsers.DocumentBuilderFactory";
@@ -49,9 +49,9 @@
private boolean expandEntityRef = true;
private boolean ignoreComments = false;
private boolean coalescing = false;
-
+
private boolean canonicalState = false;
-
+
/**
* Protected constructor to prevent instantiation. * Use {@link #newInstance()}.
@@ -77,7 +77,7 @@ * format and contains the fully qualified name of the * implementation class with the key being the system property defined * above. - * + * * The jaxp.properties file is read only once by the JAXP implementation * and it's values are then cached for future use. If the file does not exist * when the first attempt is made to read from it, no further attempts are @@ -99,18 +99,18 @@ * Once an application has obtained a reference to a *DocumentBuilderFactory
it can use the factory to
* configure and obtain parser instances.
- *
- *
+ *
+ *
* Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems loading {@link DocumentBuilder}s, try:
** java -Djaxp.debug=1 YourProgram .... *- * + * * @return New instance of a
DocumentBuilderFactory
*
* @throws FactoryConfigurationError if the implementation is not
@@ -136,29 +136,29 @@
* It gives more control to the application as it can specify which provider
* should be loaded.
*
- * Once an application has obtained a reference to a DocumentBuilderFactory
+ *
Once an application has obtained a reference to a DocumentBuilderFactory
* it can use the factory to configure and obtain parser instances.
Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems try:
** java -Djaxp.debug=1 YourProgram .... *- * + * * @param factoryClassName fully qualified factory class name that provides implementation of
javax.xml.parsers.DocumentBuilderFactory
.
*
- * @param classLoader ClassLoader
used to load the factory class. If null
+ * @param classLoader ClassLoader
used to load the factory class. If null
* current Thread
's context classLoader is used to load the factory class.
*
* @return New instance of a DocumentBuilderFactory
*
- * @throws FactoryConfigurationError if factoryClassName
is null
, or
- * the factory class cannot be loaded, instantiated.
+ * @throws FactoryConfigurationError if factoryClassName
is null
, or
+ * the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
*
@@ -171,7 +171,7 @@
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
- }
+ }
}
/**
@@ -183,11 +183,11 @@
* @throws ParserConfigurationException if a DocumentBuilder
* cannot be created which satisfies the configuration requested.
*/
-
+
public abstract DocumentBuilder newDocumentBuilder()
throws ParserConfigurationException;
-
-
+
+
/**
* Specifies that the parser produced by this code will
* provide support for XML namespaces. By default the value of this is set
@@ -196,7 +196,7 @@
* @param awareness true if the parser produced will provide support
* for XML namespaces; false otherwise.
*/
-
+
public void setNamespaceAware(boolean awareness) {
this.namespaceAware = awareness;
}
@@ -205,7 +205,7 @@
* Specifies that the parser produced by this code will
* validate documents as they are parsed. By default the value of this
* is set to false
.
- *
+ *
* * Note that "the validation" here means * a validating @@ -213,7 +213,7 @@ * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) *
- * + * *
* To use modern schema languages such as W3C XML Schema or
* RELAX NG instead of DTD, you can configure your parser to be
@@ -221,11 +221,11 @@
* method false
, then use the {@link #setSchema(Schema)}
* method to associate a schema to a parser.
*
Specifies that the parser produced by this code will
* ignore comments. By default the value of this is set to false
*
.
boolean
value to ignore comments during processing
*/
-
+
public void setIgnoringComments(boolean ignoreComments) {
this.ignoreComments = ignoreComments;
}
@@ -284,7 +284,7 @@
* to Text nodes and append it to the adjacent (if any)
* text node; false otherwise.
*/
-
+
public void setCoalescing(boolean coalescing) {
this.coalescing = coalescing;
}
@@ -296,7 +296,7 @@
* @return true if the factory is configured to produce parsers which
* are namespace aware; false otherwise.
*/
-
+
public boolean isNamespaceAware() {
return namespaceAware;
}
@@ -308,7 +308,7 @@
* @return true if the factory is configured to produce parsers
* which validate the XML content during parse; false otherwise.
*/
-
+
public boolean isValidating() {
return validating;
}
@@ -321,7 +321,7 @@
* which ignore ignorable whitespace in element content;
* false otherwise.
*/
-
+
public boolean isIgnoringElementContentWhitespace() {
return whitespace;
}
@@ -333,7 +333,7 @@
* @return true if the factory is configured to produce parsers
* which expand entity reference nodes; false otherwise.
*/
-
+
public boolean isExpandEntityReferences() {
return expandEntityRef;
}
@@ -345,7 +345,7 @@
* @return true if the factory is configured to produce parsers
* which ignores comments; false otherwise.
*/
-
+
public boolean isIgnoringComments() {
return ignoreComments;
}
@@ -359,7 +359,7 @@
* which converts CDATA nodes to Text nodes and appends it to
* the adjacent (if any) Text node; false otherwise.
*/
-
+
public boolean isCoalescing() {
return coalescing;
}
@@ -390,67 +390,67 @@
*/
public abstract Object getAttribute(String name)
throws IllegalArgumentException;
-
- /**
- * Set a feature for this DocumentBuilderFactory
and DocumentBuilder
s created by this factory.
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * A {@link ParserConfigurationException} is thrown if this DocumentBuilderFactory
or the
- * DocumentBuilder
s it creates cannot support the feature.
- * It is possible for a DocumentBuilderFactory
to expose a feature value but be unable to change its state.
- *
- * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is:
- *true
: the implementation will limit XML processing to conform to implementation limits.
- * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
- * If XML processing is limited for security reasons, it will be reported via a call to the registered
- * {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
- * See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
- * false
: the implementation will processing XML according to the XML specifications without
- * regard to possible implementation limits.
- * true
or false
.
- *
- * @throws ParserConfigurationException if this DocumentBuilderFactory
or the DocumentBuilder
s
- * it creates cannot support this feature.
+
+ /**
+ * Set a feature for this DocumentBuilderFactory
and DocumentBuilder
s created by this factory.
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * A {@link ParserConfigurationException} is thrown if this DocumentBuilderFactory
or the
+ * DocumentBuilder
s it creates cannot support the feature.
+ * It is possible for a DocumentBuilderFactory
to expose a feature value but be unable to change its state.
+ *
+ * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. + * When the feature is:
+ *true
: the implementation will limit XML processing to conform to implementation limits.
+ * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
+ * If XML processing is limited for security reasons, it will be reported via a call to the registered
+ * {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
+ * See {@link DocumentBuilder#setErrorHandler(org.xml.sax.ErrorHandler errorHandler)}.
+ * false
: the implementation will processing XML according to the XML specifications without
+ * regard to possible implementation limits.
+ * true
or false
.
+ *
+ * @throws ParserConfigurationException if this DocumentBuilderFactory
or the DocumentBuilder
s
+ * it creates cannot support this feature.
* @throws NullPointerException If the name
parameter is null.
- */
- public abstract void setFeature(String name, boolean value)
- throws ParserConfigurationException;
+ */
+ public abstract void setFeature(String name, boolean value)
+ throws ParserConfigurationException;
- /**
- * Get the state of the named feature.
- * - *
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * An {@link ParserConfigurationException} is thrown if this DocumentBuilderFactory
or the
- * DocumentBuilder
s it creates cannot support the feature.
- * It is possible for an DocumentBuilderFactory
to expose a feature value but be unable to change its state.
- *
DocumentBuilderFactory
- * or the DocumentBuilder
s it creates cannot support this feature.
- */
- public abstract boolean getFeature(String name)
- throws ParserConfigurationException;
-
-
+ /**
+ * Get the state of the named feature.
+ * + *
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * An {@link ParserConfigurationException} is thrown if this DocumentBuilderFactory
or the
+ * DocumentBuilder
s it creates cannot support the feature.
+ * It is possible for an DocumentBuilderFactory
to expose a feature value but be unable to change its state.
+ *
DocumentBuilderFactory
+ * or the DocumentBuilder
s it creates cannot support this feature.
+ */
+ public abstract boolean getFeature(String name)
+ throws ParserConfigurationException;
+
+
/** Get current state of canonicalization.
* * @return current state canonicalization control @@ -460,8 +460,8 @@ return canonicalState; } */ - - + + /** * Gets the {@link Schema} object specified through * the {@link #setSchema(Schema schema)} method. @@ -487,7 +487,7 @@ ); } - + /*Set canonicalization control to true
or
* false.
Set the {@link Schema} to be used by parsers created * from this factory. - * + * *
* When a {@link Schema} is non-null, a parser will use a validator * created from it to validate documents before it passes information * down to the application. - * + * *
When errors are found by the validator, the parser is responsible * to report them to the user-specified {@link org.xml.sax.ErrorHandler} * (or if the error handler is not set, ignore them or throw them), just @@ -516,20 +516,20 @@ * is set, it must receive those errors, and if not, they must be * treated according to the implementation specific * default error handling rules. - * + * *
* A validator may modify the outcome of a parse (for example by * adding default values that were missing in documents), and a parser * is responsible to make sure that the application will receive - * modified DOM trees. - * + * modified DOM trees. + * *
- * Initialy, null is set as the {@link Schema}. - * + * Initialy, null is set as the {@link Schema}. + * *
* This processing will take effect even if
* the {@link #isValidating()} method returns false
.
- *
+ *
*
It is an error to use
* the http://java.sun.com/xml/jaxp/properties/schemaSource
* property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
@@ -537,7 +537,7 @@
* Such configuration will cause a {@link ParserConfigurationException}
* exception when the {@link #newDocumentBuilder()} is invoked.
@@ -564,18 +564,18 @@ + "\"" ); } - + - + /** *
Set state of XInclude processing.
- * + * *If XInclude markup is found in the document instance, should it be * processed as specified in * XML Inclusions (XInclude) Version 1.0.
- * + * *XInclude processing defaults to false
.
true
or
* false
*
@@ -594,7 +594,7 @@
/**
* Get state of XInclude processing.
- * + * * @return current state of XInclude processing * * @throws UnsupportedOperationException When implementation does not diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/parsers/FactoryConfigurationError.java --- a/sources/jaxp_src/src/javax/xml/parsers/FactoryConfigurationError.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/parsers/FactoryConfigurationError.java Wed May 02 13:32:36 2012 +0100 @@ -37,7 +37,7 @@ public class FactoryConfigurationError extends Error { private static final long serialVersionUID = -827108682472263355L; - + /** *Exception
that represents the error.
*/
@@ -59,7 +59,7 @@
*
* @param msg The error message for the exception.
*/
-
+
public FactoryConfigurationError(String msg) {
super(msg);
this.exception = null;
@@ -73,7 +73,7 @@
* @param e The exception to be encapsulated in a
* FactoryConfigurationError.
*/
-
+
public FactoryConfigurationError(Exception e) {
super(e.toString());
this.exception = e;
@@ -87,7 +87,7 @@
* FactoryConfigurationError
* @param msg The detail message.
*/
-
+
public FactoryConfigurationError(Exception e, String msg) {
super(msg);
this.exception = e;
@@ -97,30 +97,30 @@
/**
* Return the message (if any) for this error . If there is no
* message for the exception and there is an encapsulated
- * exception then the message of that exception, if it exists will be
+ * exception then the message of that exception, if it exists will be
* returned. Else the name of the encapsulated exception will be
* returned.
*
* @return The error message.
*/
-
+
public String getMessage () {
String message = super.getMessage ();
-
+
if (message == null && exception != null) {
return exception.getMessage();
}
return message;
}
-
+
/**
* Return the actual exception (if any) that caused this exception to
* be raised.
*
* @return The encapsulated exception, or null if there is none.
*/
-
+
public Exception getException () {
return exception;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/parsers/FactoryFinder.java
--- a/sources/jaxp_src/src/javax/xml/parsers/FactoryFinder.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/parsers/FactoryFinder.java Wed May 02 13:32:36 2012 +0100
@@ -25,42 +25,40 @@
package javax.xml.parsers;
+import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
-
-import java.util.Properties;
-import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
-import java.net.URL;
+import java.util.Properties;
/**
* Implements pluggable Datatypes.
- * + * *This class is duplicated for each JAXP subpackage so keep it in * sync. It is package private for secure class loading.
* * @author Santiago.PericasGeertsen@sun.com + * @author Huizhe.Wang@oracle.com */ class FactoryFinder { - + /** * Internal debug flag. */ private static boolean debug = false; - + /** * Cache for properties in java.home/lib/jaxp.properties */ static Properties cacheProps = new Properties(); - + /** - * Flag indicating if properties from java.home/lib/jaxp.properties + * Flag indicating if properties from java.home/lib/jaxp.properties * have been cached. */ - static boolean firstTime = true; - + static volatile boolean firstTime = true; + /** * Security support class use to check access control before * getting certain system resources. @@ -75,40 +73,46 @@ String val = ss.getSystemProperty("jaxp.debug"); // Allow simply setting the prop to turn on debug debug = val != null && !"false".equals(val); - } + } catch (SecurityException se) { debug = false; } } - + private static void dPrint(String msg) { if (debug) { System.err.println("JAXP: " + msg); } } - + /** * Attempt to load a class using the class loader supplied. If that fails * and fall back is enabled, the current (i.e. bootstrap) class loader is - * tried. - * + * tried. + * * If the class loader supplied isnull
, first try using the
* context class loader followed by the current (i.e. bootstrap) class
- * loader.
+ * loader.
+ *
+ * Use bootstrap classLoader if cl = null and useBSClsLoader is true
*/
static private Class getProviderClass(String className, ClassLoader cl,
- boolean doFallback) throws ClassNotFoundException
+ boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException
{
try {
if (cl == null) {
- cl = ss.getContextClassLoader();
- if (cl == null) {
- throw new ClassNotFoundException();
+ if (useBSClsLoader) {
+ return Class.forName(className, true, FactoryFinder.class.getClassLoader());
+ } else {
+ cl = ss.getContextClassLoader();
+ if (cl == null) {
+ throw new ClassNotFoundException();
+ }
+ else {
+ return cl.loadClass(className);
+ }
}
- else {
- return cl.loadClass(className);
- }
- }
+ }
else {
return cl.loadClass(className);
}
@@ -117,49 +121,71 @@
if (doFallback) {
// Use current class loader - should always be bootstrap CL
return Class.forName(className, true, FactoryFinder.class.getClassLoader());
- }
+ }
else {
throw e1;
}
- }
+ }
}
-
+
/**
- * Create an instance of a class. Delegates to method
+ * Create an instance of a class. Delegates to method
* getProviderClass()
in order to load the class.
*
* @param className Name of the concrete class corresponding to the
* service provider
*
- * @param cl ClassLoader to use to load the class, null means to use
- * the bootstrap ClassLoader
+ * @param cl ClassLoader
used to load the factory class. If null
+ * current Thread
's context classLoader is used to load the factory class.
*
* @param doFallback True if the current ClassLoader should be tried as
* a fallback if the class is not found using cl
- */
+ */
static Object newInstance(String className, ClassLoader cl, boolean doFallback)
throws ConfigurationError
{
+ return newInstance(className, cl, doFallback, false);
+ }
+
+ /**
+ * Create an instance of a class. Delegates to method
+ * getProviderClass()
in order to load the class.
+ *
+ * @param className Name of the concrete class corresponding to the
+ * service provider
+ *
+ * @param cl ClassLoader
used to load the factory class. If null
+ * current Thread
's context classLoader is used to load the factory class.
+ *
+ * @param doFallback True if the current ClassLoader should be tried as
+ * a fallback if the class is not found using cl
+ *
+ * @param useBSClsLoader True if cl=null actually meant bootstrap classLoader. This parameter
+ * is needed since DocumentBuilderFactory/SAXParserFactory defined null as context classLoader.
+ */
+ static Object newInstance(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader)
+ throws ConfigurationError
+ {
try {
- Class providerClass = getProviderClass(className, cl, doFallback);
+ Class providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
Object instance = providerClass.newInstance();
if (debug) { // Extra check to avoid computing cl strings
dPrint("created new instance of " + providerClass +
" using ClassLoader: " + cl);
}
return instance;
- }
+ }
catch (ClassNotFoundException x) {
throw new ConfigurationError(
"Provider " + className + " not found", x);
- }
+ }
catch (Exception x) {
throw new ConfigurationError(
"Provider " + className + " could not be instantiated: " + x,
x);
}
}
-
+
/**
* Finds the implementation Class object in the specified order. Main
* entry point.
@@ -174,17 +200,17 @@
*/
static Object find(String factoryId, String fallbackClassName)
throws ConfigurationError
- {
+ {
dPrint("find factoryId =" + factoryId);
-
+
// Use the system property first
try {
String systemProp = ss.getSystemProperty(factoryId);
- if (systemProp != null) {
+ if (systemProp != null) {
dPrint("found system property, value=" + systemProp);
return newInstance(systemProp, null, true);
}
- }
+ }
catch (SecurityException se) {
if (debug) se.printStackTrace();
}
@@ -206,13 +232,13 @@
}
}
}
- factoryClassName = cacheProps.getProperty(factoryId);
+ factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
return newInstance(factoryClassName, null, true);
}
- }
+ }
catch (Exception ex) {
if (debug) ex.printStackTrace();
}
@@ -230,51 +256,54 @@
dPrint("loaded from fallback value: " + fallbackClassName);
return newInstance(fallbackClassName, null, true);
}
-
+
/*
* Try to find provider using Jar Service Provider Mechanism
*
* @return instance of provider class if found or null
*/
private static Object findJarServiceProvider(String factoryId)
- throws ConfigurationError
+ throws ConfigurationError
{
String serviceId = "META-INF/services/" + factoryId;
InputStream is = null;
-
+
// First try the Context ClassLoader
ClassLoader cl = ss.getContextClassLoader();
+ boolean useBSClsLoader = false;
if (cl != null) {
is = ss.getResourceAsStream(cl, serviceId);
-
+
// If no provider found then try the current ClassLoader
if (is == null) {
- cl = FactoryFinder.class.getClassLoader();
+ cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
+ useBSClsLoader = true;
}
} else {
// No Context ClassLoader, try the current ClassLoader
cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
+ useBSClsLoader = true;
}
-
+
if (is == null) {
// No provider found
return null;
}
-
+
if (debug) { // Extra check to avoid computing cl strings
dPrint("found jar resource=" + serviceId + " using ClassLoader: " + cl);
}
-
+
BufferedReader rd;
try {
rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- }
+ }
catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -285,24 +314,24 @@
// No provider found
return null;
}
-
+
if (factoryClassName != null && !"".equals(factoryClassName)) {
dPrint("found in resource, value=" + factoryClassName);
-
+
// Note: here we do not want to fall back to the current
// ClassLoader because we want to avoid the case where the
// resource file was found using one ClassLoader and the
// provider class was instantiated using a different one.
- return newInstance(factoryClassName, cl, false);
+ return newInstance(factoryClassName, cl, false, useBSClsLoader);
}
-
+
// No provider found
return null;
}
-
+
static class ConfigurationError extends Error {
private Exception exception;
-
+
/**
* Construct a new instance with the specified detail string and
* exception.
@@ -311,7 +340,7 @@
super(msg);
this.exception = x;
}
-
+
Exception getException() {
return exception;
}
@@ -323,5 +352,5 @@
return exception;
}
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/parsers/SAXParserFactory.java
--- a/sources/jaxp_src/src/javax/xml/parsers/SAXParserFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/parsers/SAXParserFactory.java Wed May 02 13:32:36 2012 +0100
@@ -49,17 +49,17 @@
* Should Parsers be validating?
*/ private boolean validating = false; - + /** *Should Parsers be namespace aware?
*/ private boolean namespaceAware = false; - + /** *Protected constructor to force use of {@link #newInstance()}.
*/ protected SAXParserFactory () { - + } /** @@ -79,7 +79,7 @@ * format and contains the fully qualified name of the * implementation class with the key being the system property defined * above. - * + * * The jaxp.properties file is read only once by the JAXP implementation * and it's values are then cached for future use. If the file does not exist * when the first attempt is made to read from it, no further attempts are @@ -101,20 +101,20 @@ * Once an application has obtained a reference to a *SAXParserFactory
it can use the factory to
* configure and obtain parser instances.
- *
- *
- *
+ *
+ *
+ *
* Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems loading {@link DocumentBuilder}s, try:
** java -Djaxp.debug=1 YourProgram .... *- * - * + * + * * @return A new instance of a SAXParserFactory. * * @throws FactoryConfigurationError if the implementation is @@ -138,31 +138,31 @@ *
Obtain a new instance of a SAXParserFactory
from class name.
* This function is useful when there are multiple providers in the classpath.
* It gives more control to the application as it can specify which provider
- * should be loaded.
Once an application has obtained a reference to a SAXParserFactory
+ *
Once an application has obtained a reference to a SAXParserFactory
* it can use the factory to configure and obtain parser instances.
Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems, try:
** java -Djaxp.debug=1 YourProgram .... *- * + * * @param factoryClassName fully qualified factory class name that provides implementation of
javax.xml.parsers.SAXParserFactory
.
*
- * @param classLoader ClassLoader
used to load the factory class. If null
+ * @param classLoader ClassLoader
used to load the factory class. If null
* current Thread
's context classLoader is used to load the factory class.
*
* @return New instance of a SAXParserFactory
*
- * @throws FactoryConfigurationError if factoryClassName
is null
, or
- * the factory class cannot be loaded, instantiated.
+ * @throws FactoryConfigurationError if factoryClassName
is null
, or
+ * the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
*
@@ -175,9 +175,9 @@
} catch (FactoryFinder.ConfigurationError e) {
throw new FactoryConfigurationError(e.getException(),
e.getMessage());
- }
+ }
}
-
+
/**
* Creates a new instance of a SAXParser using the currently * configured factory parameters.
@@ -188,11 +188,11 @@ * be created which satisfies the requested configuration. * @throws SAXException for SAX errors. */ - + public abstract SAXParser newSAXParser() throws ParserConfigurationException, SAXException; - + /** * Specifies that the parser produced by this code will * provide support for XML namespaces. By default the value of this is set @@ -201,7 +201,7 @@ * @param awareness true if the parser produced by this code will * provide support for XML namespaces; false otherwise. */ - + public void setNamespaceAware(boolean awareness) { this.namespaceAware = awareness; } @@ -210,7 +210,7 @@ * Specifies that the parser produced by this code will * validate documents as they are parsed. By default the value of this is * set tofalse
.
- *
+ *
* * Note that "the validation" here means * a validating @@ -218,7 +218,7 @@ * In other words, it essentially just controls the DTD validation. * (except the legacy two properties defined in JAXP 1.2.) *
- * + * ** To use modern schema languages such as W3C XML Schema or * RELAX NG instead of DTD, you can configure your parser to be @@ -230,7 +230,7 @@ * @param validating true if the parser produced by this code will * validate documents as they are parsed; false otherwise. */ - + public void setValidating(boolean validating) { this.validating = validating; } @@ -242,7 +242,7 @@ * @return true if the factory is configured to produce * parsers which are namespace aware; false otherwise. */ - + public boolean isNamespaceAware() { return namespaceAware; } @@ -254,7 +254,7 @@ * @return true if the factory is configured to produce parsers which validate * the XML content during parse; false otherwise. */ - + public boolean isValidating() { return validating; } @@ -266,25 +266,25 @@ * A list of the core features and properties can be found at * http://www.saxproject.org/
* - *All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is
- *true
: the implementation will limit XML processing to conform to implementation limits.
- * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
- * If XML processing is limited for security reasons, it will be reported via a call to the registered
- * {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
- * See {@link SAXParser} parse
methods for handler specification.
- * false
, the implementation will processing XML according to the XML specifications without
- * regard to possible implementation limits.
- * All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. + * When the feature is
+ *true
: the implementation will limit XML processing to conform to implementation limits.
+ * Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources.
+ * If XML processing is limited for security reasons, it will be reported via a call to the registered
+ * {@link org.xml.sax.ErrorHandler#fatalError(SAXParseException exception)}.
+ * See {@link SAXParser} parse
methods for handler specification.
+ * false
, the implementation will processing XML according to the XML specifications without
+ * regard to possible implementation limits.
+ * Get current state of canonicalization.
* * @return current state canonicalization control @@ -330,21 +330,21 @@ return canonicalState; } */ - + /** * Gets the {@link Schema} object specified through * the {@link #setSchema(Schema schema)} method. - * - * + * + * * @throws UnsupportedOperationException When implementation does not * override this method - * + * * @return * the {@link Schema} object that was last set through * the {@link #setSchema(Schema)} method, or null * if the method was not invoked since a {@link SAXParserFactory} * is created. - * + * * @since 1.5 */ public Schema getSchema() { @@ -356,7 +356,7 @@ + "\"" ); } - + /**Set canonicalization control to true
or
* false.
Set the {@link Schema} to be used by parsers created * from this factory.
- * + * *When a {@link Schema} is non-null, a parser will use a validator * created from it to validate documents before it passes information * down to the application.
- * + * *When warnings/errors/fatal errors are found by the validator, the parser must - * handle them as if those errors were found by the parser itself. + * handle them as if those errors were found by the parser itself. * In other words, if the user-specified {@link org.xml.sax.ErrorHandler} * is set, it must receive those errors, and if not, they must be * treated according to the implementation specific * default error handling rules. - * + * *
A validator may modify the SAX event stream (for example by * adding default values that were missing in documents), and a parser * is responsible to make sure that the application will receive - * those modified event stream.
- * - *Initialy, null
is set as the {@link Schema}.
Initialy, null
is set as the {@link Schema}.
This processing will take effect even if
* the {@link #isValidating()} method returns false
.
- *
+ *
*
It is an error to use
* the http://java.sun.com/xml/jaxp/properties/schemaSource
* property and/or the http://java.sun.com/xml/jaxp/properties/schemaLanguage
* property in conjunction with a non-null {@link Schema} object.
* Such configuration will cause a {@link SAXException}
* exception when those properties are set on a {@link SAXParser}.
* A parser must be able to work with any {@link Schema} @@ -407,12 +407,12 @@ * to use implementation-specific custom mechanisms * as long as they yield the result described in the specification. *
- * + * * @param schemaSchema
to use, null
to remove a schema.
- *
+ *
* @throws UnsupportedOperationException When implementation does not
* override this method
- *
+ *
* @since 1.5
*/
public void setSchema(Schema schema) {
@@ -427,19 +427,19 @@
/**
* Set state of XInclude processing.
- * + * *If XInclude markup is found in the document instance, should it be * processed as specified in * XML Inclusions (XInclude) Version 1.0.
- * + * *XInclude processing defaults to false
.
true
or
* false
- *
+ *
* @throws UnsupportedOperationException When implementation does not
* override this method
- *
+ *
* @since 1.5
*/
public void setXIncludeAware(final boolean state) {
@@ -452,12 +452,12 @@
/**
* Get state of XInclude processing.
- * + * * @return current state of XInclude processing - * + * * @throws UnsupportedOperationException When implementation does not * override this method - * + * * @since 1.5 */ public boolean isXIncludeAware() { @@ -470,4 +470,3 @@ ); } } - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/parsers/SecuritySupport.java --- a/sources/jaxp_src/src/javax/xml/parsers/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/parsers/SecuritySupport.java Wed May 02 13:32:36 2012 +0100 @@ -39,26 +39,26 @@ */ class SecuritySupport { - + ClassLoader getContextClassLoader() throws SecurityException{ - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return (ClassLoader) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { ClassLoader cl = null; //try { cl = Thread.currentThread().getContextClassLoader(); //} catch (SecurityException ex) { } - + if (cl == null) cl = ClassLoader.getSystemClassLoader(); - + return cl; } }); } String getSystemProperty(final String propName) { - return (String) + return (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(propName); @@ -69,16 +69,16 @@ FileInputStream getFileInputStream(final File file) throws FileNotFoundException { - try { + try { return (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws FileNotFoundException { return new FileInputStream(file); } }); - } catch (PrivilegedActionException e) { - throw (FileNotFoundException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (FileNotFoundException)e.getException(); + } } InputStream getResourceAsStream(final ClassLoader cl, diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/FactoryFinder.java --- a/sources/jaxp_src/src/javax/xml/stream/FactoryFinder.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/FactoryFinder.java Wed May 02 13:32:36 2012 +0100 @@ -58,7 +58,7 @@ * Flag indicating if properties from java.home/lib/jaxp.properties * have been cached. */ - static boolean firstTime = true; + static volatile boolean firstTime = true; /** * Security support class use to check access control before diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/Location.java --- a/sources/jaxp_src/src/javax/xml/stream/Location.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/Location.java Wed May 02 13:32:36 2012 +0100 @@ -75,4 +75,3 @@ */ public String getSystemId(); } - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/SecuritySupport.java --- a/sources/jaxp_src/src/javax/xml/stream/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/SecuritySupport.java Wed May 02 13:32:36 2012 +0100 @@ -39,26 +39,26 @@ */ class SecuritySupport { - + ClassLoader getContextClassLoader() throws SecurityException{ - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { + return (ClassLoader) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { ClassLoader cl = null; //try { cl = Thread.currentThread().getContextClassLoader(); //} catch (SecurityException ex) { } - + if (cl == null) cl = ClassLoader.getSystemClassLoader(); - + return cl; } }); } String getSystemProperty(final String propName) { - return (String) + return (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(propName); @@ -69,16 +69,16 @@ FileInputStream getFileInputStream(final File file) throws FileNotFoundException { - try { + try { return (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws FileNotFoundException { return new FileInputStream(file); } }); - } catch (PrivilegedActionException e) { - throw (FileNotFoundException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (FileNotFoundException)e.getException(); + } } InputStream getResourceAsStream(final ClassLoader cl, diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLEventFactory.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLEventFactory.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLEventFactory.java Wed May 02 13:32:36 2012 +0100 @@ -50,10 +50,10 @@ protected XMLEventFactory(){} /** - * Create a new instance of the factory + * Create a new instance of the factory * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ - public static XMLEventFactory newInstance() + public static XMLEventFactory newInstance() throws FactoryConfigurationError { return (XMLEventFactory) FactoryFinder.find( @@ -62,28 +62,28 @@ } /** - * Create a new instance of the factory. - * This static method creates a new factory instance. - * This method uses the following ordered lookup procedure to determine - * the XMLEventFactory implementation class to load: - * Use the javax.xml.stream.XMLEventFactory system property. - * Use the properties file "lib/stax.properties" in the JRE directory. - * This configuration file is in standard java.util.Properties format - * and contains the fully qualified name of the implementation class - * with the key being the system property defined above. - * Use the Services API (as detailed in the JAR specification), if available, - * to determine the classname. The Services API will look for a classname - * in the file META-INF/services/javax.xml.stream.XMLEventFactory in jars - * available to the runtime. - * Platform default XMLEventFactory instance. - * - * Once an application has obtained a reference to a XMLEventFactory it - * can use the factory to configure and obtain stream instances. - * - * Note that this is a new method that replaces the deprecated newInstance() method. - * No changes in behavior are defined by this replacement method relative to + * Create a new instance of the factory. + * This static method creates a new factory instance. + * This method uses the following ordered lookup procedure to determine + * the XMLEventFactory implementation class to load: + * Use the javax.xml.stream.XMLEventFactory system property. + * Use the properties file "lib/stax.properties" in the JRE directory. + * This configuration file is in standard java.util.Properties format + * and contains the fully qualified name of the implementation class + * with the key being the system property defined above. + * Use the Services API (as detailed in the JAR specification), if available, + * to determine the classname. The Services API will look for a classname + * in the file META-INF/services/javax.xml.stream.XMLEventFactory in jars + * available to the runtime. + * Platform default XMLEventFactory instance. + * + * Once an application has obtained a reference to a XMLEventFactory it + * can use the factory to configure and obtain stream instances. + * + * Note that this is a new method that replaces the deprecated newInstance() method. + * No changes in behavior are defined by this replacement method relative to * the deprecated method. - * + * * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ public static XMLEventFactory newFactory() @@ -95,14 +95,14 @@ } /** - * Create a new instance of the factory + * Create a new instance of the factory * * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use * @return the factory implementation * @throws FactoryConfigurationError if an instance of this factory cannot be loaded - * + * * @deprecated This method has been deprecated to maintain API consistency. * All newInstance methods have been replaced with corresponding * newFactory methods. The replacement {@link @@ -122,14 +122,14 @@ } /** - * Create a new instance of the factory. - * If the classLoader argument is null, then the ContextClassLoader is used. - * - * Note that this is a new method that replaces the deprecated - * newInstance(String factoryId, ClassLoader classLoader) method. - * No changes in behavior are defined by this replacement method relative + * Create a new instance of the factory. + * If the classLoader argument is null, then the ContextClassLoader is used. + * + * Note that this is a new method that replaces the deprecated + * newInstance(String factoryId, ClassLoader classLoader) method. + * No changes in behavior are defined by this replacement method relative * to the deprecated method. - * + * * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use @@ -151,7 +151,7 @@ /** * This method allows setting of the Location on each event that * is created by this factory. The values are copied by value into - * the events created by this factory. To reset the location + * the events created by this factory. To reset the location * information set the location to null. * @param location the location to set on each event created */ @@ -201,13 +201,13 @@ /** * Create a new StartElement. Namespaces can be added to this StartElement * by passing in an Iterator that walks over a set of Namespace interfaces. - * Attributes can be added to this StartElement by passing an iterator + * Attributes can be added to this StartElement by passing an iterator * that walks over a set of Attribute interfaces. * * @param name the qualified name of the attribute, may not be null - * @param attributes an optional unordered set of objects that + * @param attributes an optional unordered set of objects that * implement Attribute to add to the new StartElement, may be null - * @param namespaces an optional unordered set of objects that + * @param namespaces an optional unordered set of objects that * implement Namespace to add to the new StartElement, may be null * @return an instance of the requested StartElement */ @@ -231,15 +231,15 @@ /** * Create a new StartElement. Namespaces can be added to this StartElement * by passing in an Iterator that walks over a set of Namespace interfaces. - * Attributes can be added to this StartElement by passing an iterator + * Attributes can be added to this StartElement by passing an iterator * that walks over a set of Attribute interfaces. * * @param namespaceUri the uri of the QName of the new StartElement * @param localName the local name of the QName of the new StartElement * @param prefix the prefix of the QName of the new StartElement - * @param attributes an unordered set of objects that implement + * @param attributes an unordered set of objects that implement * Attribute to add to the new StartElement - * @param namespaces an unordered set of objects that implement + * @param namespaces an unordered set of objects that implement * Namespace to add to the new StartElement * @return an instance of the requested StartElement */ @@ -252,15 +252,15 @@ /** * Create a new StartElement. Namespaces can be added to this StartElement * by passing in an Iterator that walks over a set of Namespace interfaces. - * Attributes can be added to this StartElement by passing an iterator + * Attributes can be added to this StartElement by passing an iterator * that walks over a set of Attribute interfaces. * * @param namespaceUri the uri of the QName of the new StartElement * @param localName the local name of the QName of the new StartElement * @param prefix the prefix of the QName of the new StartElement - * @param attributes an unordered set of objects that implement + * @param attributes an unordered set of objects that implement * Attribute to add to the new StartElement, may be null - * @param namespaces an unordered set of objects that implement + * @param namespaces an unordered set of objects that implement * Namespace to add to the new StartElement, may be null * @param context the namespace context of this element * @return an instance of the requested StartElement @@ -276,11 +276,11 @@ /** * Create a new EndElement * @param name the qualified name of the EndElement - * @param namespaces an optional unordered set of objects that + * @param namespaces an optional unordered set of objects that * implement Namespace that have gone out of scope, may be null * @return an instance of the requested EndElement */ - public abstract EndElement createEndElement(QName name, + public abstract EndElement createEndElement(QName name, Iterator namespaces); /** @@ -290,7 +290,7 @@ * @param prefix the prefix of the QName of the new StartElement * @return an instance of the requested EndElement */ - public abstract EndElement createEndElement(String prefix, + public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName); /** @@ -298,11 +298,11 @@ * @param namespaceUri the uri of the QName of the new StartElement * @param localName the local name of the QName of the new StartElement * @param prefix the prefix of the QName of the new StartElement - * @param namespaces an unordered set of objects that implement + * @param namespaces an unordered set of objects that implement * Namespace that have gone out of scope, may be null * @return an instance of the requested EndElement */ - public abstract EndElement createEndElement(String prefix, + public abstract EndElement createEndElement(String prefix, String namespaceUri, String localName, Iterator namespaces); @@ -335,13 +335,13 @@ */ public abstract Characters createIgnorableSpace(String content); - /** + /** * Creates a new instance of a StartDocument event * @return a StartDocument event */ public abstract StartDocument createStartDocument(); - /** + /** * Creates a new instance of a StartDocument event * * @param encoding the encoding style @@ -353,7 +353,7 @@ String version, boolean standalone); - /** + /** * Creates a new instance of a StartDocument event * * @param encoding the encoding style @@ -363,7 +363,7 @@ public abstract StartDocument createStartDocument(String encoding, String version); - /** + /** * Creates a new instance of a StartDocument event * * @param encoding the encoding style @@ -410,7 +410,3 @@ */ public abstract DTD createDTD(String dtd); } - - - - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLEventReader.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLEventReader.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLEventReader.java Wed May 02 13:32:36 2012 +0100 @@ -35,7 +35,7 @@ /** * * This is the top level interface for parsing XML Events. It provides - * the ability to peek at the next event and returns configuration + * the ability to peek at the next event and returns configuration * information through the property interface. * * @version 1.0 diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLInputFactory.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLInputFactory.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLInputFactory.java Wed May 02 13:32:36 2012 +0100 @@ -33,8 +33,8 @@ /** * Defines an abstract implementation of a factory for getting streams. - * - * The following table defines the standard properties of this specification. + * + * The following table defines the standard properties of this specification. * Each property varies in the level of support required by each implementation. * The level of support required is described in the 'Required' column. * @@ -80,41 +80,41 @@ */ public abstract class XMLInputFactory { - /** - * The property used to turn on/off namespace support, + /** + * The property used to turn on/off namespace support, * this is to support XML 1.0 documents, * only the true setting must be supported */ public static final String IS_NAMESPACE_AWARE= "javax.xml.stream.isNamespaceAware"; - /** - * The property used to turn on/off implementation specific validation + /** + * The property used to turn on/off implementation specific validation */ public static final String IS_VALIDATING= "javax.xml.stream.isValidating"; - - /** - * The property that requires the parser to coalesce adjacent character data sections + + /** + * The property that requires the parser to coalesce adjacent character data sections */ public static final String IS_COALESCING= "javax.xml.stream.isCoalescing"; - - /** - * Requires the parser to replace internal - * entity references with their replacement + + /** + * Requires the parser to replace internal + * entity references with their replacement * text and report them as characters */ public static final String IS_REPLACING_ENTITY_REFERENCES= "javax.xml.stream.isReplacingEntityReferences"; - - /** + + /** * The property that requires the parser to resolve external parsed entities */ public static final String IS_SUPPORTING_EXTERNAL_ENTITIES= "javax.xml.stream.isSupportingExternalEntities"; - /** + /** * The property that requires the parser to support DTDs */ public static final String SUPPORT_DTD= @@ -122,7 +122,7 @@ /** * The property used to - * set/get the implementation of the XMLReporter interface + * set/get the implementation of the XMLReporter interface */ public static final String REPORTER= "javax.xml.stream.reporter"; @@ -132,7 +132,7 @@ */ public static final String RESOLVER= "javax.xml.stream.resolver"; - + /** * The property used to set/get the implementation of the allocator */ @@ -156,28 +156,28 @@ } /** - * Create a new instance of the factory. - * This static method creates a new factory instance. - * This method uses the following ordered lookup procedure to determine - * the XMLInputFactory implementation class to load: - * Use the javax.xml.stream.XMLInputFactory system property. - * Use the properties file "lib/stax.properties" in the JRE directory. - * This configuration file is in standard java.util.Properties format - * and contains the fully qualified name of the implementation class - * with the key being the system property defined above. - * Use the Services API (as detailed in the JAR specification), if available, - * to determine the classname. The Services API will look for a classname - * in the file META-INF/services/javax.xml.stream.XMLInputFactory in jars - * available to the runtime. - * Platform default XMLInputFactory instance. - * - * Once an application has obtained a reference to a XMLInputFactory it - * can use the factory to configure and obtain stream instances. - * - * Note that this is a new method that replaces the deprecated newInstance() method. - * No changes in behavior are defined by this replacement method relative to + * Create a new instance of the factory. + * This static method creates a new factory instance. + * This method uses the following ordered lookup procedure to determine + * the XMLInputFactory implementation class to load: + * Use the javax.xml.stream.XMLInputFactory system property. + * Use the properties file "lib/stax.properties" in the JRE directory. + * This configuration file is in standard java.util.Properties format + * and contains the fully qualified name of the implementation class + * with the key being the system property defined above. + * Use the Services API (as detailed in the JAR specification), if available, + * to determine the classname. The Services API will look for a classname + * in the file META-INF/services/javax.xml.stream.XMLInputFactory in jars + * available to the runtime. + * Platform default XMLInputFactory instance. + * + * Once an application has obtained a reference to a XMLInputFactory it + * can use the factory to configure and obtain stream instances. + * + * Note that this is a new method that replaces the deprecated newInstance() method. + * No changes in behavior are defined by this replacement method relative to * the deprecated method. - * + * * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ public static XMLInputFactory newFactory() @@ -189,7 +189,7 @@ } /** - * Create a new instance of the factory + * Create a new instance of the factory * * @param factoryId Name of the factory to find, same as * a property name @@ -216,14 +216,14 @@ } /** - * Create a new instance of the factory. - * If the classLoader argument is null, then the ContextClassLoader is used. - * - * Note that this is a new method that replaces the deprecated - * newInstance(String factoryId, ClassLoader classLoader) method. - * No changes in behavior are defined by this replacement method relative + * Create a new instance of the factory. + * If the classLoader argument is null, then the ContextClassLoader is used. + * + * Note that this is a new method that replaces the deprecated + * newInstance(String factoryId, ClassLoader classLoader) method. + * No changes in behavior are defined by this replacement method relative * to the deprecated method. - * + * * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use @@ -245,34 +245,34 @@ /** * Create a new XMLStreamReader from a reader * @param reader the XML data to read from - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) + public abstract XMLStreamReader createXMLStreamReader(java.io.Reader reader) throws XMLStreamException; /** * Create a new XMLStreamReader from a JAXP source. This method is optional. * @param source the source to read from - * @throws UnsupportedOperationException if this method is not + * @throws UnsupportedOperationException if this method is not * supported by this XMLInputFactory - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLStreamReader createXMLStreamReader(Source source) + public abstract XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException; /** * Create a new XMLStreamReader from a java.io.InputStream * @param stream the InputStream to read from - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) + public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream) throws XMLStreamException; /** * Create a new XMLStreamReader from a java.io.InputStream * @param stream the InputStream to read from * @param encoding the character encoding of the stream - * @throws XMLStreamException + * @throws XMLStreamException */ public abstract XMLStreamReader createXMLStreamReader(java.io.InputStream stream, String encoding) throws XMLStreamException; @@ -296,16 +296,16 @@ /** * Create a new XMLEventReader from a reader * @param reader the XML data to read from - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) + public abstract XMLEventReader createXMLEventReader(java.io.Reader reader) throws XMLStreamException; /** * Create a new XMLEventReader from a reader - * @param systemId the system ID of the input + * @param systemId the system ID of the input * @param reader the XML data to read from - * @throws XMLStreamException + * @throws XMLStreamException */ public abstract XMLEventReader createXMLEventReader(String systemId, java.io.Reader reader) throws XMLStreamException; @@ -313,46 +313,46 @@ /** * Create a new XMLEventReader from an XMLStreamReader. After being used * to construct the XMLEventReader instance returned from this method - * the XMLStreamReader must not be used. + * the XMLStreamReader must not be used. * @param reader the XMLStreamReader to read from (may not be modified) * @return a new XMLEventReader - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) + public abstract XMLEventReader createXMLEventReader(XMLStreamReader reader) throws XMLStreamException; /** * Create a new XMLEventReader from a JAXP source. * Support of this method is optional. * @param source the source to read from - * @throws UnsupportedOperationException if this method is not + * @throws UnsupportedOperationException if this method is not * supported by this XMLInputFactory */ - public abstract XMLEventReader createXMLEventReader(Source source) + public abstract XMLEventReader createXMLEventReader(Source source) throws XMLStreamException; /** * Create a new XMLEventReader from a java.io.InputStream * @param stream the InputStream to read from - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) + public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream) throws XMLStreamException; /** * Create a new XMLEventReader from a java.io.InputStream * @param stream the InputStream to read from * @param encoding the character encoding of the stream - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) + public abstract XMLEventReader createXMLEventReader(java.io.InputStream stream, String encoding) throws XMLStreamException; /** * Create a new XMLEventReader from a java.io.InputStream * @param systemId the system ID of the stream * @param stream the InputStream to read from - * @throws XMLStreamException + * @throws XMLStreamException */ public abstract XMLEventReader createXMLEventReader(String systemId, java.io.InputStream stream) throws XMLStreamException; @@ -361,41 +361,41 @@ * Create a filtered reader that wraps the filter around the reader * @param reader the reader to filter * @param filter the filter to apply to the reader - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) + public abstract XMLStreamReader createFilteredReader(XMLStreamReader reader, StreamFilter filter) throws XMLStreamException; /** * Create a filtered event reader that wraps the filter around the event reader * @param reader the event reader to wrap * @param filter the filter to apply to the event reader - * @throws XMLStreamException + * @throws XMLStreamException */ - public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) + public abstract XMLEventReader createFilteredReader(XMLEventReader reader, EventFilter filter) throws XMLStreamException; /** - * The resolver that will be set on any XMLStreamReader or XMLEventReader created + * The resolver that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. */ public abstract XMLResolver getXMLResolver(); /** - * The resolver that will be set on any XMLStreamReader or XMLEventReader created + * The resolver that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. * @param resolver the resolver to use to resolve references */ public abstract void setXMLResolver(XMLResolver resolver); /** - * The reporter that will be set on any XMLStreamReader or XMLEventReader created + * The reporter that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. */ public abstract XMLReporter getXMLReporter(); /** - * The reporter that will be set on any XMLStreamReader or XMLEventReader created + * The reporter that will be set on any XMLStreamReader or XMLEventReader created * by this factory instance. * @param reporter the resolver to use to report non fatal errors */ @@ -409,8 +409,8 @@ * @param value The value of the property * @throws java.lang.IllegalArgumentException if the property is not supported */ - public abstract void setProperty(java.lang.String name, Object value) - throws java.lang.IllegalArgumentException; + public abstract void setProperty(java.lang.String name, Object value) + throws java.lang.IllegalArgumentException; /** * Get the value of a feature/property from the underlying implementation @@ -418,8 +418,8 @@ * @return The value of the property * @throws IllegalArgumentException if the property is not supported */ - public abstract Object getProperty(java.lang.String name) - throws java.lang.IllegalArgumentException; + public abstract Object getProperty(java.lang.String name) + throws java.lang.IllegalArgumentException; /** @@ -442,4 +442,3 @@ public abstract XMLEventAllocator getEventAllocator(); } - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLOutputFactory.java Wed May 02 13:32:36 2012 +0100 @@ -31,10 +31,10 @@ import javax.xml.transform.Result; /** - * Defines an abstract implementation of a factory for + * Defines an abstract implementation of a factory for * getting XMLEventWriters and XMLStreamWriters. * - * The following table defines the standard properties of this specification. + * The following table defines the standard properties of this specification. * Each property varies in the level of support required by each implementation. * The level of support required is described in the 'Required' column. * @@ -62,13 +62,13 @@ * *The property can be set with the following code line:
* setProperty("javax.xml.stream.isRepairingNamespaces",new Boolean(true|false));
This property specifies that the writer default namespace prefix declarations. + * + *
This property specifies that the writer default namespace prefix declarations. * The default value is false.
* *If a writer isRepairingNamespaces it will create a namespace declaration * on the current StartElement for - * any attribute that does not + * any attribute that does not * currently have a namespace declaration in scope. If the StartElement * has a uri but no prefix specified a prefix will be assigned, if the prefix * has not been declared in a parent of the current StartElement it will be declared @@ -76,30 +76,30 @@ * and the default namespace matches the URI of the attribute or StartElement * QName no prefix will be assigned.
* - *If an element or attribute name has a prefix, but is not - * bound to any namespace URI, then the prefix will be removed - * during serialization.
+ *If an element or attribute name has a prefix, but is not + * bound to any namespace URI, then the prefix will be removed + * during serialization.
* - *If element and/or attribute names in the same start or - * empty-element tag are bound to different namespace URIs and - * are using the same prefix then the element or the first - * occurring attribute retains the original prefix and the - * following attributes have their prefixes replaced with a - * new prefix that is bound to the namespace URIs of those + *
If element and/or attribute names in the same start or + * empty-element tag are bound to different namespace URIs and + * are using the same prefix then the element or the first + * occurring attribute retains the original prefix and the + * following attributes have their prefixes replaced with a + * new prefix that is bound to the namespace URIs of those * attributes.
* - *If an element or attribute name uses a prefix that is - * bound to a different URI than that inherited from the - * namespace context of the parent of that element and there - * is no namespace declaration in the context of the current + *
If an element or attribute name uses a prefix that is + * bound to a different URI than that inherited from the + * namespace context of the parent of that element and there + * is no namespace declaration in the context of the current * element then such a namespace declaration is added.
* - *If an element or attribute name is bound to a prefix and - * there is a namespace declaration that binds that prefix - * to a different URI then that namespace declaration is - * either removed if the correct mapping is inherited from - * the parent context of that element, or changed to the - * namespace URI of the element or attribute using that prefix.
+ *If an element or attribute name is bound to a prefix and + * there is a namespace declaration that binds that prefix + * to a different URI then that namespace declaration is + * either removed if the correct mapping is inherited from + * the parent context of that element, or changed to the + * namespace URI of the element or attribute using that prefix.
* * @version 1.2 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. @@ -109,8 +109,8 @@ * @since 1.6 */ public abstract class XMLOutputFactory { - /** - * Property used to set prefix defaulting on the output side + /** + * Property used to set prefix defaulting on the output side */ public static final String IS_REPAIRING_NAMESPACES= "javax.xml.stream.isRepairingNamespaces"; @@ -123,7 +123,7 @@ * Create a new instance of the factory. * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ - public static XMLOutputFactory newInstance() + public static XMLOutputFactory newInstance() throws FactoryConfigurationError { return (XMLOutputFactory) FactoryFinder.find("javax.xml.stream.XMLOutputFactory", @@ -131,28 +131,28 @@ } /** - * Create a new instance of the factory. - * This static method creates a new factory instance. This method uses the - * following ordered lookup procedure to determine the XMLOutputFactory - * implementation class to load: - * Use the javax.xml.stream.XMLOutputFactory system property. - * Use the properties file "lib/stax.properties" in the JRE directory. - * This configuration file is in standard java.util.Properties format - * and contains the fully qualified name of the implementation class - * with the key being the system property defined above. - * Use the Services API (as detailed in the JAR specification), if available, - * to determine the classname. The Services API will look for a classname - * in the file META-INF/services/javax.xml.stream.XMLOutputFactory in jars - * available to the runtime. - * Platform default XMLOutputFactory instance. - * - * Once an application has obtained a reference to a XMLOutputFactory it - * can use the factory to configure and obtain stream instances. - * - * Note that this is a new method that replaces the deprecated newInstance() method. - * No changes in behavior are defined by this replacement method relative to the + * Create a new instance of the factory. + * This static method creates a new factory instance. This method uses the + * following ordered lookup procedure to determine the XMLOutputFactory + * implementation class to load: + * Use the javax.xml.stream.XMLOutputFactory system property. + * Use the properties file "lib/stax.properties" in the JRE directory. + * This configuration file is in standard java.util.Properties format + * and contains the fully qualified name of the implementation class + * with the key being the system property defined above. + * Use the Services API (as detailed in the JAR specification), if available, + * to determine the classname. The Services API will look for a classname + * in the file META-INF/services/javax.xml.stream.XMLOutputFactory in jars + * available to the runtime. + * Platform default XMLOutputFactory instance. + * + * Once an application has obtained a reference to a XMLOutputFactory it + * can use the factory to configure and obtain stream instances. + * + * Note that this is a new method that replaces the deprecated newInstance() method. + * No changes in behavior are defined by this replacement method relative to the * deprecated method. - * + * * @throws FactoryConfigurationError if an instance of this factory cannot be loaded */ public static XMLOutputFactory newFactory() @@ -163,7 +163,7 @@ } /** - * Create a new instance of the factory. + * Create a new instance of the factory. * * @param factoryId Name of the factory to find, same as * a property name @@ -189,16 +189,16 @@ } /** - * Create a new instance of the factory. - * If the classLoader argument is null, then the ContextClassLoader is used. - * - * Note that this is a new method that replaces the deprecated - * newInstance(String factoryId, ClassLoader classLoader) method. - * - * No changes in behavior are defined by this replacement method relative + * Create a new instance of the factory. + * If the classLoader argument is null, then the ContextClassLoader is used. + * + * Note that this is a new method that replaces the deprecated + * newInstance(String factoryId, ClassLoader classLoader) method. + * + * No changes in behavior are defined by this replacement method relative * to the deprecated method. * - * + * * @param factoryId Name of the factory to find, same as * a property name * @param classLoader classLoader to use @@ -243,9 +243,9 @@ /** * Create a new XMLStreamWriter that writes to a JAXP result. This method is optional. * @param result the result to write to - * @throws UnsupportedOperationException if this method is not + * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory - * @throws XMLStreamException + * @throws XMLStreamException */ public abstract XMLStreamWriter createXMLStreamWriter(Result result) throws XMLStreamException; @@ -253,9 +253,9 @@ /** * Create a new XMLEventWriter that writes to a JAXP result. This method is optional. * @param result the result to write to - * @throws UnsupportedOperationException if this method is not + * @throws UnsupportedOperationException if this method is not * supported by this XMLOutputFactory - * @throws XMLStreamException + * @throws XMLStreamException */ public abstract XMLEventWriter createXMLEventWriter(Result result) throws XMLStreamException; @@ -285,13 +285,13 @@ public abstract XMLEventWriter createXMLEventWriter(java.io.Writer stream) throws XMLStreamException; /** - * Allows the user to set specific features/properties on the underlying implementation. + * Allows the user to set specific features/properties on the underlying implementation. * @param name The name of the property * @param value The value of the property * @throws java.lang.IllegalArgumentException if the property is not supported */ - public abstract void setProperty(java.lang.String name, - Object value) + public abstract void setProperty(java.lang.String name, + Object value) throws IllegalArgumentException; /** @@ -311,11 +311,3 @@ */ public abstract boolean isPropertySupported(String name); } - - - - - - - - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLReporter.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLReporter.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLReporter.java Wed May 02 13:32:36 2012 +0100 @@ -63,4 +63,3 @@ public void report(String message, String errorType, Object relatedInformation, Location location) throws XMLStreamException; } - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLResolver.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLResolver.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLResolver.java Wed May 02 13:32:36 2012 +0100 @@ -29,9 +29,9 @@ package javax.xml.stream; /** - * This interface is used to resolve resources during an XML parse. If an application wishes to + * This interface is used to resolve resources during an XML parse. If an application wishes to * perform custom entity resolution it must register an instance of this interface with - * the XMLInputFactory using the setXMLResolver method. + * the XMLInputFactory using the setXMLResolver method. * * @version 1.0 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. @@ -58,4 +58,3 @@ String namespace) throws XMLStreamException; } - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/stream/XMLStreamConstants.java --- a/sources/jaxp_src/src/javax/xml/stream/XMLStreamConstants.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/stream/XMLStreamConstants.java Wed May 02 13:32:36 2012 +0100 @@ -125,6 +125,3 @@ */ public static final int ENTITY_DECLARATION=15; } - - - diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/transform/FactoryFinder.java --- a/sources/jaxp_src/src/javax/xml/transform/FactoryFinder.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/transform/FactoryFinder.java Wed May 02 13:32:36 2012 +0100 @@ -25,42 +25,41 @@ package javax.xml.transform; +import java.io.BufferedReader; import java.io.File; -import java.io.FileInputStream; - -import java.util.Properties; -import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.net.URL; +import java.lang.reflect.Method; +import java.util.Properties; /** *Implements pluggable Datatypes.
- * + * *This class is duplicated for each JAXP subpackage so keep it in * sync. It is package private for secure class loading.
* * @author Santiago.PericasGeertsen@sun.com + * @author Huizhe.Wang@oracle.com */ class FactoryFinder { - + /** * Internal debug flag. */ private static boolean debug = false; - + /** * Cache for properties in java.home/lib/jaxp.properties */ static Properties cacheProps = new Properties(); - + /** - * Flag indicating if properties from java.home/lib/jaxp.properties + * Flag indicating if properties from java.home/lib/jaxp.properties * have been cached. */ - static boolean firstTime = true; - + static volatile boolean firstTime = true; + /** * Security support class use to check access control before * getting certain system resources. @@ -75,40 +74,46 @@ String val = ss.getSystemProperty("jaxp.debug"); // Allow simply setting the prop to turn on debug debug = val != null && !"false".equals(val); - } + } catch (SecurityException se) { debug = false; } } - + private static void dPrint(String msg) { if (debug) { System.err.println("JAXP: " + msg); } } - + /** * Attempt to load a class using the class loader supplied. If that fails * and fall back is enabled, the current (i.e. bootstrap) class loader is - * tried. - * + * tried. + * * If the class loader supplied isnull
, first try using the
* context class loader followed by the current (i.e. bootstrap) class
- * loader.
+ * loader.
+ *
+ * Use bootstrap classLoader if cl = null and useBSClsLoader is true
*/
static private Class getProviderClass(String className, ClassLoader cl,
- boolean doFallback) throws ClassNotFoundException
+ boolean doFallback, boolean useBSClsLoader) throws ClassNotFoundException
{
try {
if (cl == null) {
- cl = ss.getContextClassLoader();
- if (cl == null) {
- throw new ClassNotFoundException();
+ if (useBSClsLoader) {
+ return Class.forName(className, true, FactoryFinder.class.getClassLoader());
+ } else {
+ cl = ss.getContextClassLoader();
+ if (cl == null) {
+ throw new ClassNotFoundException();
+ }
+ else {
+ return cl.loadClass(className);
+ }
}
- else {
- return cl.loadClass(className);
- }
- }
+ }
else {
return cl.loadClass(className);
}
@@ -117,49 +122,101 @@
if (doFallback) {
// Use current class loader - should always be bootstrap CL
return Class.forName(className, true, FactoryFinder.class.getClassLoader());
- }
+ }
else {
throw e1;
}
- }
+ }
}
-
+
/**
- * Create an instance of a class. Delegates to method
+ * Create an instance of a class. Delegates to method
+ * getProviderClass()
in order to load the class.
+ *
+ * @param className Name of the concrete class corresponding to the
+ * service provider
+ *
+ * @param cl ClassLoader
used to load the factory class. If null
+ * current Thread
's context classLoader is used to load the factory class.
+ *
+ * @param doFallback True if the current ClassLoader should be tried as
+ * a fallback if the class is not found using cl
+ */
+ static Object newInstance(String className, ClassLoader cl, boolean doFallback)
+ throws ConfigurationError
+ {
+ return newInstance(className, cl, doFallback, false, false);
+ }
+
+ /**
+ * Create an instance of a class. Delegates to method
* getProviderClass()
in order to load the class.
*
* @param className Name of the concrete class corresponding to the
* service provider
*
- * @param cl ClassLoader to use to load the class, null means to use
- * the bootstrap ClassLoader
+ * @param cl ClassLoader
used to load the factory class. If null
+ * current Thread
's context classLoader is used to load the factory class.
*
* @param doFallback True if the current ClassLoader should be tried as
* a fallback if the class is not found using cl
- */
- static Object newInstance(String className, ClassLoader cl, boolean doFallback)
+ *
+ * @param useBSClsLoader True if cl=null actually meant bootstrap classLoader. This parameter
+ * is needed since DocumentBuilderFactory/SAXParserFactory defined null as context classLoader.
+ *
+ * @param useServicesMechanism True use services mechanism
+ */
+ static Object newInstance(String className, ClassLoader cl, boolean doFallback, boolean useBSClsLoader, boolean useServicesMechanism)
throws ConfigurationError
{
try {
- Class providerClass = getProviderClass(className, cl, doFallback);
- Object instance = providerClass.newInstance();
+ Class providerClass = getProviderClass(className, cl, doFallback, useBSClsLoader);
+ Object instance = null;
+ if (!useServicesMechanism) {
+ instance = newInstanceNoServiceLoader(providerClass);
+ }
+ if (instance == null) {
+ instance = providerClass.newInstance();
+ }
if (debug) { // Extra check to avoid computing cl strings
dPrint("created new instance of " + providerClass +
" using ClassLoader: " + cl);
}
return instance;
- }
+ }
catch (ClassNotFoundException x) {
throw new ConfigurationError(
"Provider " + className + " not found", x);
- }
+ }
catch (Exception x) {
throw new ConfigurationError(
"Provider " + className + " could not be instantiated: " + x,
x);
}
}
-
+ /**
+ * Try to construct using newTransformerFactoryNoServiceLoader
+ * method if available.
+ */
+ private static Object newInstanceNoServiceLoader(
+ Class> providerClass
+ ) {
+ // Retain maximum compatibility if no security manager.
+ if (System.getSecurityManager() == null) {
+ return null;
+ }
+ try {
+ Method creationMethod =
+ providerClass.getDeclaredMethod(
+ "newTransformerFactoryNoServiceLoader"
+ );
+ return creationMethod.invoke(null, null);
+ } catch (NoSuchMethodException exc) {
+ return null;
+ } catch (Exception exc) {
+ return null;
+ }
+ }
/**
* Finds the implementation Class object in the specified order. Main
* entry point.
@@ -174,17 +231,16 @@
*/
static Object find(String factoryId, String fallbackClassName)
throws ConfigurationError
- {
+ {
dPrint("find factoryId =" + factoryId);
-
// Use the system property first
try {
String systemProp = ss.getSystemProperty(factoryId);
- if (systemProp != null) {
+ if (systemProp != null) {
dPrint("found system property, value=" + systemProp);
- return newInstance(systemProp, null, true);
+ return newInstance(systemProp, null, true, false, true);
}
- }
+ }
catch (SecurityException se) {
if (debug) se.printStackTrace();
}
@@ -206,13 +262,13 @@
}
}
}
- factoryClassName = cacheProps.getProperty(factoryId);
+ factoryClassName = cacheProps.getProperty(factoryId);
if (factoryClassName != null) {
dPrint("found in $java.home/jaxp.properties, value=" + factoryClassName);
- return newInstance(factoryClassName, null, true);
+ return newInstance(factoryClassName, null, true, false, true);
}
- }
+ }
catch (Exception ex) {
if (debug) ex.printStackTrace();
}
@@ -228,53 +284,56 @@
}
dPrint("loaded from fallback value: " + fallbackClassName);
- return newInstance(fallbackClassName, null, true);
+ return newInstance(fallbackClassName, null, true, false, true);
}
-
+
/*
* Try to find provider using Jar Service Provider Mechanism
*
* @return instance of provider class if found or null
*/
private static Object findJarServiceProvider(String factoryId)
- throws ConfigurationError
+ throws ConfigurationError
{
String serviceId = "META-INF/services/" + factoryId;
InputStream is = null;
-
+
// First try the Context ClassLoader
ClassLoader cl = ss.getContextClassLoader();
+ boolean useBSClsLoader = false;
if (cl != null) {
is = ss.getResourceAsStream(cl, serviceId);
-
+
// If no provider found then try the current ClassLoader
if (is == null) {
- cl = FactoryFinder.class.getClassLoader();
+ cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
- }
+ useBSClsLoader = true;
+ }
} else {
// No Context ClassLoader, try the current ClassLoader
cl = FactoryFinder.class.getClassLoader();
is = ss.getResourceAsStream(cl, serviceId);
+ useBSClsLoader = true;
}
-
+
if (is == null) {
// No provider found
return null;
}
-
+
if (debug) { // Extra check to avoid computing cl strings
dPrint("found jar resource=" + serviceId + " using ClassLoader: " + cl);
}
-
+
BufferedReader rd;
try {
rd = new BufferedReader(new InputStreamReader(is, "UTF-8"));
- }
+ }
catch (java.io.UnsupportedEncodingException e) {
rd = new BufferedReader(new InputStreamReader(is));
}
-
+
String factoryClassName = null;
try {
// XXX Does not handle all possible input as specified by the
@@ -285,24 +344,24 @@
// No provider found
return null;
}
-
+
if (factoryClassName != null && !"".equals(factoryClassName)) {
dPrint("found in resource, value=" + factoryClassName);
-
+
// Note: here we do not want to fall back to the current
// ClassLoader because we want to avoid the case where the
// resource file was found using one ClassLoader and the
// provider class was instantiated using a different one.
- return newInstance(factoryClassName, cl, false);
+ return newInstance(factoryClassName, cl, false, useBSClsLoader, true);
}
-
+
// No provider found
return null;
}
-
+
static class ConfigurationError extends Error {
private Exception exception;
-
+
/**
* Construct a new instance with the specified detail string and
* exception.
@@ -311,7 +370,7 @@
super(msg);
this.exception = x;
}
-
+
Exception getException() {
return exception;
}
@@ -323,5 +382,5 @@
return exception;
}
}
-
+
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/transform/SecuritySupport.java
--- a/sources/jaxp_src/src/javax/xml/transform/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/transform/SecuritySupport.java Wed May 02 13:32:36 2012 +0100
@@ -39,7 +39,7 @@
*/
class SecuritySupport {
-
+
ClassLoader getContextClassLoader() throws SecurityException{
return (ClassLoader)
AccessController.doPrivileged(new PrivilegedAction() {
@@ -56,7 +56,7 @@
}
String getSystemProperty(final String propName) {
- return (String)
+ return (String)
AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
return System.getProperty(propName);
@@ -67,16 +67,16 @@
FileInputStream getFileInputStream(final File file)
throws FileNotFoundException
{
- try {
+ try {
return (FileInputStream)
AccessController.doPrivileged(new PrivilegedExceptionAction() {
public Object run() throws FileNotFoundException {
return new FileInputStream(file);
}
});
- } catch (PrivilegedActionException e) {
- throw (FileNotFoundException)e.getException();
- }
+ } catch (PrivilegedActionException e) {
+ throw (FileNotFoundException)e.getException();
+ }
}
InputStream getResourceAsStream(final ClassLoader cl,
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/transform/TransformerFactory.java
--- a/sources/jaxp_src/src/javax/xml/transform/TransformerFactory.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/transform/TransformerFactory.java Wed May 02 13:32:36 2012 +0100
@@ -35,14 +35,14 @@
* This property names a concrete subclass of the
* TransformerFactory
abstract class. If the property is not
* defined, a platform default is be used.
- *
+ *
* @author Jeff Suttor
* @author Neeraj Bajaj
*
* @since 1.5
*/
public abstract class TransformerFactory {
-
+
/**
* Default constructor is protected on purpose.
*/
@@ -67,7 +67,7 @@
* format and contains the fully qualified name of the
* implementation class with the key being the system property defined
* above.
- *
+ *
* The jaxp.properties file is read only once by the JAXP implementation
* and it's values are then cached for future use. If the file does not exist
* when the first attempt is made to read from it, no further attempts are
@@ -124,22 +124,22 @@
* Setting the jaxp.debug
system property will cause
* this method to print a lot of debug messages
* to System.err
about what it is doing and where it is looking at.
If you have problems try:
** java -Djaxp.debug=1 YourProgram .... *- * - * @param factoryClassName fully qualified factory class name that provides implementation of
javax.xml.transform.TransformerFactory
.
*
- * @param classLoader ClassLoader
used to load the factory class. If null
+ * @param factoryClassName fully qualified factory class name that provides implementation of javax.xml.transform.TransformerFactory
.
+ *
+ * @param classLoader ClassLoader
used to load the factory class. If null
* current Thread
's context classLoader is used to load the factory class.
*
* @return new TransformerFactory instance, never null.
*
- * @throws TransformerFactoryConfigurationError
- * if factoryClassName
is null
, or
- * the factory class cannot be loaded, instantiated.
+ * @throws TransformerFactoryConfigurationError
+ * if factoryClassName
is null
, or
+ * the factory class cannot be loaded, instantiated.
*
* @see #newInstance()
*
@@ -154,7 +154,7 @@
throw new TransformerFactoryConfigurationError(
e.getException(),
e.getMessage());
- }
+ }
}
/**
* Process the Source
into a Transformer
@@ -180,7 +180,7 @@
* @throws TransformerConfigurationException Thrown if there are errors when
* parsing the Source
or it is not possible to create a
* Transformer
instance.
- *
+ *
* @see
* XSL Transformations (XSLT) Version 1.0
*/
@@ -237,11 +237,11 @@
*
* @return A Source
Object
suitable for passing
* to the TransformerFactory
.
- *
+ *
* @throws TransformerConfigurationException An Exception
* is thrown if an error occurings during parsing of the
* source
.
- *
+ *
* @see
* Associating Style Sheets with XML documents Version 1.0
*/
@@ -271,60 +271,60 @@
//======= CONFIGURATION METHODS =======
- /**
- *
Set a feature for this TransformerFactory
and Transformer
s
- * or Template
s created by this factory.
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * An {@link TransformerConfigurationException} is thrown if this TransformerFactory
or the
- * Transformer
s or Template
s it creates cannot support the feature.
- * It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
- *
All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. - * When the feature is:
- *true
: the implementation will limit XML processing to conform to implementation limits
- * and behave in a secure fashion as defined by the implementation.
- * Examples include resolving user defined style sheets and functions.
- * If XML processing is limited for security reasons, it will be reported via a call to the registered
- * {@link ErrorListener#fatalError(TransformerException exception)}.
- * See {@link #setErrorListener(ErrorListener listener)}.
- * false
: the implementation will processing XML according to the XML specifications without
- * regard to possible implementation limits.
- * true
or false
.
- *
- * @throws TransformerConfigurationException if this TransformerFactory
- * or the Transformer
s or Template
s it creates cannot support this feature.
+ /**
+ * Set a feature for this TransformerFactory
and Transformer
s
+ * or Template
s created by this factory.
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * An {@link TransformerConfigurationException} is thrown if this TransformerFactory
or the
+ * Transformer
s or Template
s it creates cannot support the feature.
+ * It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
+ *
All implementations are required to support the {@link javax.xml.XMLConstants#FEATURE_SECURE_PROCESSING} feature. + * When the feature is:
+ *true
: the implementation will limit XML processing to conform to implementation limits
+ * and behave in a secure fashion as defined by the implementation.
+ * Examples include resolving user defined style sheets and functions.
+ * If XML processing is limited for security reasons, it will be reported via a call to the registered
+ * {@link ErrorListener#fatalError(TransformerException exception)}.
+ * See {@link #setErrorListener(ErrorListener listener)}.
+ * false
: the implementation will processing XML according to the XML specifications without
+ * regard to possible implementation limits.
+ * true
or false
.
+ *
+ * @throws TransformerConfigurationException if this TransformerFactory
+ * or the Transformer
s or Template
s it creates cannot support this feature.
* @throws NullPointerException If the name
parameter is null.
- */
- public abstract void setFeature(String name, boolean value)
- throws TransformerConfigurationException;
+ */
+ public abstract void setFeature(String name, boolean value)
+ throws TransformerConfigurationException;
/**
* Look up the value of a feature.
*
- *
- * Feature names are fully qualified {@link java.net.URI}s.
- * Implementations may define their own features.
- * false
is returned if this TransformerFactory
or the
- * Transformer
s or Template
s it creates cannot support the feature.
- * It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
- *
+ * Feature names are fully qualified {@link java.net.URI}s.
+ * Implementations may define their own features.
+ * false
is returned if this TransformerFactory
or the
+ * Transformer
s or Template
s it creates cannot support the feature.
+ * It is possible for an TransformerFactory
to expose a feature value but be unable to change its state.
+ *
true
or false
.
- *
+ *
* @throws NullPointerException If the name
parameter is null.
*/
public abstract boolean getFeature(String name);
@@ -338,7 +338,7 @@
*
* @param name The name of the attribute.
* @param value The value of the attribute.
- *
+ *
* @throws IllegalArgumentException When implementation does not
* recognize the attribute.
*/
@@ -367,7 +367,7 @@
* ErrorListener
listener is null
.
*
* @param listener The new error listener.
- *
+ *
* @throws IllegalArgumentException When listener
is
* null
*/
@@ -381,4 +381,3 @@
public abstract ErrorListener getErrorListener();
}
-
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/transform/TransformerFactoryConfigurationError.java
--- a/sources/jaxp_src/src/javax/xml/transform/TransformerFactoryConfigurationError.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/transform/TransformerFactoryConfigurationError.java Wed May 02 13:32:36 2012 +0100
@@ -33,7 +33,7 @@
*/
public class TransformerFactoryConfigurationError extends Error {
private static final long serialVersionUID = -6527718720676281516L;
-
+
/**
* Exception
for the
* TransformerFactoryConfigurationError
.
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/validation/SchemaFactoryFinder.java
--- a/sources/jaxp_src/src/javax/xml/validation/SchemaFactoryFinder.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/javax/xml/validation/SchemaFactoryFinder.java Wed May 02 13:32:36 2012 +0100
@@ -43,6 +43,7 @@
* Implementation of {@link SchemaFactory#newInstance(String)}.
*
* @author Kohsuke Kawaguchi
+ * @version $Revision: 1.8 $, $Date: 2010-11-01 04:36:13 $
* @since 1.5
*/
class SchemaFactoryFinder {
@@ -61,7 +62,7 @@
/**
* First time requires initialization overhead.
*/ - private static boolean firstTime = true; + private static volatile boolean firstTime = true; static { // Use try/catch block to support applets @@ -166,7 +167,7 @@ String r = ss.getSystemProperty(propertyName); if(r!=null) { debugPrintln("The value is '"+r+"'"); - sf = createInstance(r); + sf = createInstance(r, true); if(sf!=null) return sf; } else debugPrintln("The property is undefined."); @@ -201,7 +202,7 @@ debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties"); if (factoryClassName != null) { - sf = createInstance(factoryClassName); + sf = createInstance(factoryClassName, true); if(sf != null){ return sf; } @@ -254,7 +255,7 @@ // platform default if(schemaLanguage.equals("http://www.w3.org/2001/XMLSchema")) { debugPrintln("attempting to use the platform default XML Schema validator"); - return createInstance("com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory"); + return createInstance("com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory", true); } debugPrintln("all things were tried, but none was found. bailing out."); @@ -294,6 +295,10 @@ * if it fails. Error messages will be printed by this method. */ SchemaFactory createInstance( String className ) { + return createInstance( className, false ); + } + + SchemaFactory createInstance( String className, boolean useServicesMechanism ) { SchemaFactory schemaFactory = null; debugPrintln("createInstance(" + className + ")"); @@ -308,7 +313,12 @@ // instantiate Class as a SchemaFactory try { - schemaFactory = (SchemaFactory) clazz.newInstance(); + if (!useServicesMechanism) { + schemaFactory = (SchemaFactory) newInstanceNoServiceLoader(clazz); + } + if (schemaFactory == null) { + schemaFactory = (SchemaFactory) clazz.newInstance(); + } } catch (ClassCastException classCastException) { debugPrintln("could not instantiate " + clazz.getName()); if (debug) { @@ -331,6 +341,29 @@ return schemaFactory; } + /** + * Try to construct using newTransformerFactoryNoServiceLoader + * method if available. + */ + private static Object newInstanceNoServiceLoader( + Class> providerClass + ) { + // Retain maximum compatibility if no security manager. + if (System.getSecurityManager() == null) { + return null; + } + try { + Method creationMethod = + providerClass.getDeclaredMethod( + "newXMLSchemaFactoryNoServiceLoader" + ); + return creationMethod.invoke(null, null); + } catch (NoSuchMethodException exc) { + return null; + } catch (Exception exc) { + return null; + } + } /** Iterator that lazily computes one value and returns it. */ private static abstract class SingleIterator implements Iterator { diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/validation/SecuritySupport.java --- a/sources/jaxp_src/src/javax/xml/validation/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/validation/SecuritySupport.java Wed May 02 13:32:36 2012 +0100 @@ -41,7 +41,7 @@ */ class SecuritySupport { - + ClassLoader getContextClassLoader() { return (ClassLoader) AccessController.doPrivileged(new PrivilegedAction() { @@ -58,7 +58,7 @@ } String getSystemProperty(final String propName) { - return (String) + return (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(propName); @@ -69,31 +69,31 @@ FileInputStream getFileInputStream(final File file) throws FileNotFoundException { - try { + try { return (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws FileNotFoundException { return new FileInputStream(file); } }); - } catch (PrivilegedActionException e) { - throw (FileNotFoundException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (FileNotFoundException)e.getException(); + } } InputStream getURLInputStream(final URL url) throws IOException { - try { + try { return (InputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException { return url.openStream(); } }); - } catch (PrivilegedActionException e) { - throw (IOException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (IOException)e.getException(); + } } URL getResourceAsURL(final ClassLoader cl, @@ -133,7 +133,7 @@ throw (IOException)e.getException(); } } - + InputStream getResourceAsStream(final ClassLoader cl, final String name) { diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/xpath/SecuritySupport.java --- a/sources/jaxp_src/src/javax/xml/xpath/SecuritySupport.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/xpath/SecuritySupport.java Wed May 02 13:32:36 2012 +0100 @@ -40,22 +40,22 @@ */ class SecuritySupport { - + ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { } - return cl; - } - }); + return (ClassLoader) + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + ClassLoader cl = null; + try { + cl = Thread.currentThread().getContextClassLoader(); + } catch (SecurityException ex) { } + return cl; + } + }); } String getSystemProperty(final String propName) { - return (String) + return (String) AccessController.doPrivileged(new PrivilegedAction() { public Object run() { return System.getProperty(propName); @@ -66,31 +66,31 @@ FileInputStream getFileInputStream(final File file) throws FileNotFoundException { - try { + try { return (FileInputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws FileNotFoundException { return new FileInputStream(file); } }); - } catch (PrivilegedActionException e) { - throw (FileNotFoundException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (FileNotFoundException)e.getException(); + } } InputStream getURLInputStream(final URL url) throws IOException { - try { + try { return (InputStream) AccessController.doPrivileged(new PrivilegedExceptionAction() { public Object run() throws IOException { return url.openStream(); } }); - } catch (PrivilegedActionException e) { - throw (IOException)e.getException(); - } + } catch (PrivilegedActionException e) { + throw (IOException)e.getException(); + } } URL getResourceAsURL(final ClassLoader cl, @@ -130,7 +130,7 @@ throw (IOException)e.getException(); } } - + InputStream getResourceAsStream(final ClassLoader cl, final String name) { diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/javax/xml/xpath/XPathFactoryFinder.java --- a/sources/jaxp_src/src/javax/xml/xpath/XPathFactoryFinder.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/javax/xml/xpath/XPathFactoryFinder.java Wed May 02 13:32:36 2012 +0100 @@ -44,6 +44,7 @@ * Implementation of {@link XPathFactory#newInstance(String)}. * * @author Kohsuke Kawaguchi + * @version $Revision: 1.7 $, $Date: 2010-11-01 04:36:14 $ * @since 1.5 */ class XPathFactoryFinder { @@ -68,7 +69,7 @@ /** *First time requires initialization overhead.
*/ - private static boolean firstTime = true; + private volatile static boolean firstTime = true; /** *Conditional debug printing.
@@ -163,7 +164,7 @@ String r = ss.getSystemProperty(propertyName); if(r!=null) { debugPrintln("The value is '"+r+"'"); - xpathFactory = createInstance(r); + xpathFactory = createInstance(r, true); if(xpathFactory != null) return xpathFactory; } else debugPrintln("The property is undefined."); @@ -198,7 +199,7 @@ debugPrintln("found " + factoryClassName + " in $java.home/jaxp.properties"); if (factoryClassName != null) { - xpathFactory = createInstance(factoryClassName); + xpathFactory = createInstance(factoryClassName, true); if(xpathFactory != null){ return xpathFactory; } @@ -231,7 +232,7 @@ // platform default if(uri.equals(XPathFactory.DEFAULT_OBJECT_MODEL_URI)) { debugPrintln("attempting to use the platform default W3C DOM XPath lib"); - return createInstance("com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"); + return createInstance("com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl", true); } debugPrintln("all things were tried, but none was found. bailing out."); @@ -271,6 +272,9 @@ * if it fails. Error messages will be printed by this method. */ XPathFactory createInstance( String className ) { + return createInstance( className, false ); + } + XPathFactory createInstance( String className, boolean useServicesMechanism ) { XPathFactory xPathFactory = null; debugPrintln("createInstance(" + className + ")"); @@ -285,7 +289,12 @@ // instantiate Class as a XPathFactory try { + if (!useServicesMechanism) { + xPathFactory = (XPathFactory) newInstanceNoServiceLoader(clazz); + } + if (xPathFactory == null) { xPathFactory = (XPathFactory) clazz.newInstance(); + } } catch (ClassCastException classCastException) { debugPrintln("could not instantiate " + clazz.getName()); if (debug) { @@ -308,6 +317,29 @@ return xPathFactory; } + /** + * Try to construct using newXPathFactoryNoServiceLoader + * method if available. + */ + private static Object newInstanceNoServiceLoader( + Class> providerClass + ) { + // Retain maximum compatibility if no security manager. + if (System.getSecurityManager() == null) { + return null; + } + try { + Method creationMethod = + providerClass.getDeclaredMethod( + "newXPathFactoryNoServiceLoader" + ); + return creationMethod.invoke(null, null); + } catch (NoSuchMethodException exc) { + return null; + } catch (Exception exc) { + return null; + } + } /** *Look up a value in a property file.
@@ -432,7 +464,7 @@ String factoryClassName = props.getProperty(keyName); if(factoryClassName != null){ debugPrintln("found "+keyName+" = " + factoryClassName); - return createInstance(factoryClassName); + return createInstance(factoryClassName, true); } else { debugPrintln(keyName+" is not in the property file"); return null; diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/org/w3c/dom/DOMImplementationSource.java --- a/sources/jaxp_src/src/org/w3c/dom/DOMImplementationSource.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/org/w3c/dom/DOMImplementationSource.java Wed May 02 13:32:36 2012 +0100 @@ -42,45 +42,45 @@ package org.w3c.dom; /** - * This interface permits a DOM implementer to supply one or more - * implementations, based upon requested features and versions, as specified + * This interface permits a DOM implementer to supply one or more + * implementations, based upon requested features and versions, as specified * in DOM * Features. Each implementedDOMImplementationSource
object is
- * listed in the binding-specific list of available sources so that its
+ * listed in the binding-specific list of available sources so that its
* DOMImplementation
objects are made available.
* See also the Document Object Model (DOM) Level 3 Core Specification.
* @since DOM Level 3
*/
public interface DOMImplementationSource {
/**
- * A method to request the first DOM implementation that supports the
- * specified features.
- * @param features A string that specifies which features and versions
- * are required. This is a space separated list in which each feature
- * is specified by its name optionally followed by a space and a
- * version number. This method returns the first item of the list
- * returned by getDOMImplementationList
. As an example,
- * the string "XML 3.0 Traversal +Events 2.0"
will
- * request a DOM implementation that supports the module "XML" for its
- * 3.0 version, a module that support of the "Traversal" module for
- * any version, and the module "Events" for its 2.0 version. The
- * module "Events" must be accessible using the method
- * Node.getFeature()
and
- * DOMImplementation.getFeature()
.
- * @return The first DOM implementation that support the desired
+ * A method to request the first DOM implementation that supports the
+ * specified features.
+ * @param features A string that specifies which features and versions
+ * are required. This is a space separated list in which each feature
+ * is specified by its name optionally followed by a space and a
+ * version number. This method returns the first item of the list
+ * returned by getDOMImplementationList
. As an example,
+ * the string "XML 3.0 Traversal +Events 2.0"
will
+ * request a DOM implementation that supports the module "XML" for its
+ * 3.0 version, a module that support of the "Traversal" module for
+ * any version, and the module "Events" for its 2.0 version. The
+ * module "Events" must be accessible using the method
+ * Node.getFeature()
and
+ * DOMImplementation.getFeature()
.
+ * @return The first DOM implementation that support the desired
* features, or null
if this source has none.
*/
public DOMImplementation getDOMImplementation(String features);
/**
- * A method to request a list of DOM implementations that support the
+ * A method to request a list of DOM implementations that support the
* specified features and versions, as specified in .
- * @param features A string that specifies which features and versions
- * are required. This is a space separated list in which each feature
- * is specified by its name optionally followed by a space and a
- * version number. This is something like: "XML 3.0 Traversal +Events
+ * @param features A string that specifies which features and versions
+ * are required. This is a space separated list in which each feature
+ * is specified by its name optionally followed by a space and a
+ * version number. This is something like: "XML 3.0 Traversal +Events
* 2.0"
- * @return A list of DOM implementations that support the desired
+ * @return A list of DOM implementations that support the desired
* features.
*/
public DOMImplementationList getDOMImplementationList(String features);
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/org/w3c/dom/bootstrap/DOMImplementationRegistry.java
--- a/sources/jaxp_src/src/org/w3c/dom/bootstrap/DOMImplementationRegistry.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/org/w3c/dom/bootstrap/DOMImplementationRegistry.java Wed May 02 13:32:36 2012 +0100
@@ -87,31 +87,31 @@
* DOMImplementationSource class names.
*/
public static final String PROPERTY =
- "org.w3c.dom.DOMImplementationSourceList";
-
+ "org.w3c.dom.DOMImplementationSourceList";
+
/**
* Default columns per line.
*/
private static final int DEFAULT_LINE_LENGTH = 80;
-
+
/**
* The list of DOMImplementationSources.
*/
private Vector sources;
-
+
/**
* Default class name.
*/
- private static final String FALLBACK_CLASS =
+ private static final String FALLBACK_CLASS =
"com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl";
/**
* Private constructor.
* @param srcs Vector List of DOMImplementationSources
*/
private DOMImplementationRegistry(final Vector srcs) {
- sources = srcs;
+ sources = srcs;
}
-
+
/**
* Obtain a new instance of a DOMImplementationRegistry
.
*
@@ -121,7 +121,7 @@
* first checking the value of the Java system property
* org.w3c.dom.DOMImplementationSourceList
and
* the service provider whose contents are at
- * "META_INF/services/org.w3c.dom.DOMImplementationSourceList
".
+ * "META_INF/services/org.w3c.dom.DOMImplementationSourceList
".
* The value of this property is a white-space separated list of
* names of availables classes implementing the
* DOMImplementationSource
interface. Each class listed
@@ -140,50 +140,50 @@
* DOMImplementationSource
*/
public static DOMImplementationRegistry newInstance()
- throws
- ClassNotFoundException,
- InstantiationException,
- IllegalAccessException,
- ClassCastException {
- Vector sources = new Vector();
-
- ClassLoader classLoader = getClassLoader();
- // fetch system property:
- String p = getSystemProperty(PROPERTY);
-
- //
- // if property is not specified then use contents of
+ throws
+ ClassNotFoundException,
+ InstantiationException,
+ IllegalAccessException,
+ ClassCastException {
+ Vector sources = new Vector();
+
+ ClassLoader classLoader = getClassLoader();
+ // fetch system property:
+ String p = getSystemProperty(PROPERTY);
+
+ //
+ // if property is not specified then use contents of
// META_INF/org.w3c.dom.DOMImplementationSourceList from classpath
- if (p == null) {
- p = getServiceValue(classLoader);
- }
+ if (p == null) {
+ p = getServiceValue(classLoader);
+ }
if (p == null) {
- //
- // DOM Implementations can modify here to add *additional* fallback
- // mechanisms to access a list of default DOMImplementationSources.
+ //
+ // DOM Implementations can modify here to add *additional* fallback
+ // mechanisms to access a list of default DOMImplementationSources.
//fall back to JAXP implementation class com.sun.org.apache.xerces.internal.dom.DOMXSImplementationSourceImpl
p = FALLBACK_CLASS;
}
- if (p != null) {
- StringTokenizer st = new StringTokenizer(p);
- while (st.hasMoreTokens()) {
- String sourceName = st.nextToken();
- // Use context class loader, falling back to Class.forName
- // if and only if this fails...
- Class sourceClass = null;
- if (classLoader != null) {
- sourceClass = classLoader.loadClass(sourceName);
- } else {
- sourceClass = Class.forName(sourceName);
- }
- DOMImplementationSource source =
- (DOMImplementationSource) sourceClass.newInstance();
- sources.addElement(source);
- }
- }
- return new DOMImplementationRegistry(sources);
+ if (p != null) {
+ StringTokenizer st = new StringTokenizer(p);
+ while (st.hasMoreTokens()) {
+ String sourceName = st.nextToken();
+ // Use context class loader, falling back to Class.forName
+ // if and only if this fails...
+ Class sourceClass = null;
+ if (classLoader != null) {
+ sourceClass = classLoader.loadClass(sourceName);
+ } else {
+ sourceClass = Class.forName(sourceName);
+ }
+ DOMImplementationSource source =
+ (DOMImplementationSource) sourceClass.newInstance();
+ sources.addElement(source);
+ }
+ }
+ return new DOMImplementationRegistry(sources);
}
-
+
/**
* Return the first implementation that has the desired
* features, or null
if none is found.
@@ -197,19 +197,19 @@
* or null
if none found.
*/
public DOMImplementation getDOMImplementation(final String features) {
- int size = sources.size();
- String name = null;
- for (int i = 0; i < size; i++) {
- DOMImplementationSource source =
- (DOMImplementationSource) sources.elementAt(i);
- DOMImplementation impl = source.getDOMImplementation(features);
- if (impl != null) {
- return impl;
- }
- }
- return null;
+ int size = sources.size();
+ String name = null;
+ for (int i = 0; i < size; i++) {
+ DOMImplementationSource source =
+ (DOMImplementationSource) sources.elementAt(i);
+ DOMImplementation impl = source.getDOMImplementation(features);
+ if (impl != null) {
+ return impl;
+ }
+ }
+ return null;
}
-
+
/**
* Return a list of implementations that support the
* desired features.
@@ -222,51 +222,51 @@
* @return A list of DOMImplementations that support the desired features.
*/
public DOMImplementationList getDOMImplementationList(final String features) {
- final Vector implementations = new Vector();
- int size = sources.size();
- for (int i = 0; i < size; i++) {
- DOMImplementationSource source =
- (DOMImplementationSource) sources.elementAt(i);
- DOMImplementationList impls =
- source.getDOMImplementationList(features);
- for (int j = 0; j < impls.getLength(); j++) {
- DOMImplementation impl = impls.item(j);
- implementations.addElement(impl);
- }
- }
- return new DOMImplementationList() {
- public DOMImplementation item(final int index) {
- if (index >= 0 && index < implementations.size()) {
- try {
- return (DOMImplementation)
- implementations.elementAt(index);
- } catch (ArrayIndexOutOfBoundsException e) {
- return null;
- }
- }
- return null;
- }
-
- public int getLength() {
- return implementations.size();
- }
- };
+ final Vector implementations = new Vector();
+ int size = sources.size();
+ for (int i = 0; i < size; i++) {
+ DOMImplementationSource source =
+ (DOMImplementationSource) sources.elementAt(i);
+ DOMImplementationList impls =
+ source.getDOMImplementationList(features);
+ for (int j = 0; j < impls.getLength(); j++) {
+ DOMImplementation impl = impls.item(j);
+ implementations.addElement(impl);
+ }
+ }
+ return new DOMImplementationList() {
+ public DOMImplementation item(final int index) {
+ if (index >= 0 && index < implementations.size()) {
+ try {
+ return (DOMImplementation)
+ implementations.elementAt(index);
+ } catch (ArrayIndexOutOfBoundsException e) {
+ return null;
+ }
+ }
+ return null;
+ }
+
+ public int getLength() {
+ return implementations.size();
+ }
+ };
}
-
+
/**
* Register an implementation.
*
* @param s The source to be registered, may not be null
*/
public void addSource(final DOMImplementationSource s) {
- if (s == null) {
- throw new NullPointerException();
- }
- if (!sources.contains(s)) {
- sources.addElement(s);
- }
+ if (s == null) {
+ throw new NullPointerException();
+ }
+ if (!sources.contains(s)) {
+ sources.addElement(s);
+ }
}
-
+
/**
*
* Gets a class loader.
@@ -274,20 +274,20 @@
* @return A class loader, possibly null
*/
private static ClassLoader getClassLoader() {
- try {
- ClassLoader contextClassLoader = getContextClassLoader();
-
- if (contextClassLoader != null) {
- return contextClassLoader;
- }
- } catch (Exception e) {
- // Assume that the DOM application is in a JRE 1.1, use the
- // current ClassLoader
- return DOMImplementationRegistry.class.getClassLoader();
- }
- return DOMImplementationRegistry.class.getClassLoader();
+ try {
+ ClassLoader contextClassLoader = getContextClassLoader();
+
+ if (contextClassLoader != null) {
+ return contextClassLoader;
+ }
+ } catch (Exception e) {
+ // Assume that the DOM application is in a JRE 1.1, use the
+ // current ClassLoader
+ return DOMImplementationRegistry.class.getClassLoader();
+ }
+ return DOMImplementationRegistry.class.getClassLoader();
}
-
+
/**
* This method attempts to return the first line of the resource
* META_INF/services/org.w3c.dom.DOMImplementationSourceList
@@ -297,52 +297,52 @@
* @return first line of resource, or null
*/
private static String getServiceValue(final ClassLoader classLoader) {
- String serviceId = "META-INF/services/" + PROPERTY;
- // try to find services in CLASSPATH
- try {
- InputStream is = getResourceAsStream(classLoader, serviceId);
-
- if (is != null) {
- BufferedReader rd;
- try {
- rd =
- new BufferedReader(new InputStreamReader(is, "UTF-8"),
- DEFAULT_LINE_LENGTH);
- } catch (java.io.UnsupportedEncodingException e) {
- rd =
- new BufferedReader(new InputStreamReader(is),
- DEFAULT_LINE_LENGTH);
- }
- String serviceValue = rd.readLine();
- rd.close();
- if (serviceValue != null && serviceValue.length() > 0) {
- return serviceValue;
- }
- }
- } catch (Exception ex) {
- return null;
- }
- return null;
+ String serviceId = "META-INF/services/" + PROPERTY;
+ // try to find services in CLASSPATH
+ try {
+ InputStream is = getResourceAsStream(classLoader, serviceId);
+
+ if (is != null) {
+ BufferedReader rd;
+ try {
+ rd =
+ new BufferedReader(new InputStreamReader(is, "UTF-8"),
+ DEFAULT_LINE_LENGTH);
+ } catch (java.io.UnsupportedEncodingException e) {
+ rd =
+ new BufferedReader(new InputStreamReader(is),
+ DEFAULT_LINE_LENGTH);
+ }
+ String serviceValue = rd.readLine();
+ rd.close();
+ if (serviceValue != null && serviceValue.length() > 0) {
+ return serviceValue;
+ }
+ }
+ } catch (Exception ex) {
+ return null;
+ }
+ return null;
}
-
+
/**
* A simple JRE (Java Runtime Environment) 1.1 test
*
- * @return true
if JRE 1.1
+ * @return true
if JRE 1.1
*/
private static boolean isJRE11() {
- try {
- Class c = Class.forName("java.security.AccessController");
- // java.security.AccessController existed since 1.2 so, if no
- // exception was thrown, the DOM application is running in a JRE
- // 1.2 or higher
- return false;
- } catch (Exception ex) {
- // ignore
- }
- return true;
+ try {
+ Class c = Class.forName("java.security.AccessController");
+ // java.security.AccessController existed since 1.2 so, if no
+ // exception was thrown, the DOM application is running in a JRE
+ // 1.2 or higher
+ return false;
+ } catch (Exception ex) {
+ // ignore
+ }
+ return true;
}
-
+
/**
* This method returns the ContextClassLoader or null
if
* running in a JRE 1.1
@@ -350,73 +350,73 @@
* @return The Context Classloader
*/
private static ClassLoader getContextClassLoader() {
- return isJRE11()
- ? null
- : (ClassLoader)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- ClassLoader classLoader = null;
- try {
- classLoader =
- Thread.currentThread().getContextClassLoader();
- } catch (SecurityException ex) {
- }
- return classLoader;
- }
- });
+ return isJRE11()
+ ? null
+ : (ClassLoader)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ ClassLoader classLoader = null;
+ try {
+ classLoader =
+ Thread.currentThread().getContextClassLoader();
+ } catch (SecurityException ex) {
+ }
+ return classLoader;
+ }
+ });
}
-
+
/**
* This method returns the system property indicated by the specified name
* after checking access control privileges. For a JRE 1.1, this check is
* not done.
- *
- * @param name the name of the system property
+ *
+ * @param name the name of the system property
* @return the system property
*/
private static String getSystemProperty(final String name) {
- return isJRE11()
- ? (String) System.getProperty(name)
- : (String) AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- return System.getProperty(name);
- }
- });
+ return isJRE11()
+ ? (String) System.getProperty(name)
+ : (String) AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ return System.getProperty(name);
+ }
+ });
}
-
+
/**
* This method returns an Inputstream for the reading resource
* META_INF/services/org.w3c.dom.DOMImplementationSourceList after checking
* access control privileges. For a JRE 1.1, this check is not done.
*
- * @param classLoader classLoader
- * @param name the resource
+ * @param classLoader classLoader
+ * @param name the resource
* @return an Inputstream for the resource specified
*/
private static InputStream getResourceAsStream(final ClassLoader classLoader,
- final String name) {
- if (isJRE11()) {
- InputStream ris;
- if (classLoader == null) {
- ris = ClassLoader.getSystemResourceAsStream(name);
- } else {
- ris = classLoader.getResourceAsStream(name);
- }
- return ris;
- } else {
- return (InputStream)
- AccessController.doPrivileged(new PrivilegedAction() {
- public Object run() {
- InputStream ris;
- if (classLoader == null) {
- ris =
- ClassLoader.getSystemResourceAsStream(name);
- } else {
- ris = classLoader.getResourceAsStream(name);
- }
- return ris;
- }
- });
- }
+ final String name) {
+ if (isJRE11()) {
+ InputStream ris;
+ if (classLoader == null) {
+ ris = ClassLoader.getSystemResourceAsStream(name);
+ } else {
+ ris = classLoader.getResourceAsStream(name);
+ }
+ return ris;
+ } else {
+ return (InputStream)
+ AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run() {
+ InputStream ris;
+ if (classLoader == null) {
+ ris =
+ ClassLoader.getSystemResourceAsStream(name);
+ } else {
+ ris = classLoader.getResourceAsStream(name);
+ }
+ return ris;
+ }
+ });
+ }
}
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/org/xml/sax/SAXException.java
--- a/sources/jaxp_src/src/org/xml/sax/SAXException.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/org/xml/sax/SAXException.java Wed May 02 13:32:36 2012 +0100
@@ -67,22 +67,22 @@
*/
public SAXException ()
{
- super();
- this.exception = null;
+ super();
+ this.exception = null;
}
-
-
+
+
/**
* Create a new SAXException.
*
* @param message The error or warning message.
*/
public SAXException (String message) {
- super(message);
- this.exception = null;
+ super(message);
+ this.exception = null;
}
-
-
+
+
/**
* Create a new SAXException wrapping an existing exception.
*
@@ -94,11 +94,11 @@
*/
public SAXException (Exception e)
{
- super();
- this.exception = e;
+ super();
+ this.exception = e;
}
-
-
+
+
/**
* Create a new SAXException from an existing exception.
*
@@ -110,11 +110,11 @@
*/
public SAXException (String message, Exception e)
{
- super(message);
- this.exception = e;
+ super(message);
+ this.exception = e;
}
-
-
+
+
/**
* Return a detail message for this exception.
*
@@ -126,16 +126,16 @@
*/
public String getMessage ()
{
- String message = super.getMessage();
-
- if (message == null && exception != null) {
- return exception.getMessage();
- } else {
- return message;
- }
+ String message = super.getMessage();
+
+ if (message == null && exception != null) {
+ return exception.getMessage();
+ } else {
+ return message;
+ }
}
-
-
+
+
/**
* Return the embedded exception, if any.
*
@@ -143,7 +143,7 @@
*/
public Exception getException ()
{
- return exception;
+ return exception;
}
/**
@@ -162,15 +162,15 @@
*/
public String toString ()
{
- if (exception != null) {
- return super.toString() + "\n" + exception.toString();
- } else {
- return super.toString();
- }
+ if (exception != null) {
+ return super.toString() + "\n" + exception.toString();
+ } else {
+ return super.toString();
+ }
}
-
-
-
+
+
+
//////////////////////////////////////////////////////////////////////
// Internal state.
//////////////////////////////////////////////////////////////////////
@@ -178,10 +178,10 @@
/**
* @serial The embedded exception if tunnelling, or null.
- */
+ */
private Exception exception;
-
- // Added serialVersionUID to preserve binary compatibility
+
+ // Added serialVersionUID to preserve binary compatibility
static final long serialVersionUID = 583241635256073760L;
}
diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/org/xml/sax/SAXParseException.java
--- a/sources/jaxp_src/src/org/xml/sax/SAXParseException.java Tue Feb 21 23:55:29 2012 +0000
+++ b/sources/jaxp_src/src/org/xml/sax/SAXParseException.java Wed May 02 13:32:36 2012 +0100
@@ -44,12 +44,12 @@
* in the original XML document, as if it came from a {@link Locator}
* object. Note that although the application
* will receive a SAXParseException as the argument to the handlers
- * in the {@link org.xml.sax.ErrorHandler ErrorHandler} interface,
- * the application is not actually required to throw the exception;
- * instead, it can simply read the information in it and take a
+ * in the {@link org.xml.sax.ErrorHandler ErrorHandler} interface,
+ * the application is not actually required to throw the exception;
+ * instead, it can simply read the information in it and take a
* different action.
Since this exception is a subclass of {@link org.xml.sax.SAXException + *
Since this exception is a subclass of {@link org.xml.sax.SAXException * SAXException}, it inherits the ability to wrap another exception.
* * @since SAX 1.0 @@ -60,8 +60,8 @@ * @see org.xml.sax.ErrorHandler */ public class SAXParseException extends SAXException { - - + + ////////////////////////////////////////////////////////////////////// // Constructors. ////////////////////////////////////////////////////////////////////// @@ -80,16 +80,16 @@ * @see org.xml.sax.Locator */ public SAXParseException (String message, Locator locator) { - super(message); - if (locator != null) { - init(locator.getPublicId(), locator.getSystemId(), - locator.getLineNumber(), locator.getColumnNumber()); - } else { - init(null, null, -1, -1); - } + super(message); + if (locator != null) { + init(locator.getPublicId(), locator.getSystemId(), + locator.getLineNumber(), locator.getColumnNumber()); + } else { + init(null, null, -1, -1); + } } - - + + /** * Wrap an existing exception in a SAXParseException. * @@ -106,17 +106,17 @@ * @see org.xml.sax.Locator */ public SAXParseException (String message, Locator locator, - Exception e) { - super(message, e); - if (locator != null) { - init(locator.getPublicId(), locator.getSystemId(), - locator.getLineNumber(), locator.getColumnNumber()); - } else { - init(null, null, -1, -1); - } + Exception e) { + super(message, e); + if (locator != null) { + init(locator.getPublicId(), locator.getSystemId(), + locator.getLineNumber(), locator.getColumnNumber()); + } else { + init(null, null, -1, -1); + } } - - + + /** * Create a new SAXParseException. * @@ -139,13 +139,13 @@ * cause the error or warning. */ public SAXParseException (String message, String publicId, String systemId, - int lineNumber, int columnNumber) + int lineNumber, int columnNumber) { - super(message); - init(publicId, systemId, lineNumber, columnNumber); + super(message); + init(publicId, systemId, lineNumber, columnNumber); } - - + + /** * Create a new SAXParseException with an embedded exception. * @@ -171,10 +171,10 @@ * @param e Another exception to embed in this one. */ public SAXParseException (String message, String publicId, String systemId, - int lineNumber, int columnNumber, Exception e) + int lineNumber, int columnNumber, Exception e) { - super(message, e); - init(publicId, systemId, lineNumber, columnNumber); + super(message, e); + init(publicId, systemId, lineNumber, columnNumber); } @@ -189,15 +189,15 @@ * @param columnNumber The column number of the error, or -1. */ private void init (String publicId, String systemId, - int lineNumber, int columnNumber) + int lineNumber, int columnNumber) { - this.publicId = publicId; - this.systemId = systemId; - this.lineNumber = lineNumber; - this.columnNumber = columnNumber; + this.publicId = publicId; + this.systemId = systemId; + this.lineNumber = lineNumber; + this.columnNumber = columnNumber; } - - + + /** * Get the public identifier of the entity where the exception occurred. * @@ -207,10 +207,10 @@ */ public String getPublicId () { - return this.publicId; + return this.publicId; } - - + + /** * Get the system identifier of the entity where the exception occurred. * @@ -223,10 +223,10 @@ */ public String getSystemId () { - return this.systemId; + return this.systemId; } - - + + /** * The line number of the end of the text where the exception occurred. * @@ -238,10 +238,10 @@ */ public int getLineNumber () { - return this.lineNumber; + return this.lineNumber; } - - + + /** * The column number of the end of the text where the exception occurred. * @@ -253,9 +253,9 @@ */ public int getColumnNumber () { - return this.columnNumber; + return this.columnNumber; } - + /** * Override toString to provide more detailed error message. * @@ -271,9 +271,9 @@ //append the exception message at the end if (message!=null) buf.append("; ").append(message); - return buf.toString(); + return buf.toString(); } - + ////////////////////////////////////////////////////////////////////// // Internal state. ////////////////////////////////////////////////////////////////////// @@ -282,7 +282,7 @@ /** * @serial The public identifier, or null. * @see #getPublicId - */ + */ private String publicId; @@ -305,7 +305,7 @@ * @see #getColumnNumber */ private int columnNumber; - + // Added serialVersionUID to preserve binary compatibility static final long serialVersionUID = -5651165872476709336L; } diff -r 9b7a2f21b8a8 -r b3301c9b17f3 sources/jaxp_src/src/org/xml/sax/helpers/XMLReaderFactory.java --- a/sources/jaxp_src/src/org/xml/sax/helpers/XMLReaderFactory.java Tue Feb 21 23:55:29 2012 +0000 +++ b/sources/jaxp_src/src/org/xml/sax/helpers/XMLReaderFactory.java Wed May 02 13:32:36 2012 +0100 @@ -131,19 +131,19 @@ * @see #createXMLReader(java.lang.String) */ public static XMLReader createXMLReader () - throws SAXException + throws SAXException { - String className = null; - ClassLoader loader = NewInstance.getClassLoader (); - - // 1. try the JVM-instance-wide system property - try { className = System.getProperty (property); } - catch (RuntimeException e) { /* normally fails for applets */ } + String className = null; + ClassLoader loader = NewInstance.getClassLoader (); - // 2. if that fails, try META-INF/services/ - if (className == null) { + // 1. try the JVM-instance-wide system property + try { className = System.getProperty (property); } + catch (RuntimeException e) { /* normally fails for applets */ } + + // 2. if that fails, try META-INF/services/ + if (className == null) { if (!_jarread) { - final ClassLoader loader1 = loader; + final ClassLoader loader1 = loader; _jarread = true; _clsFromJar = (String) AccessController.doPrivileged(new PrivilegedAction() { @@ -151,8 +151,8 @@ String clsName = null; try { String service = "META-INF/services/" + property; - InputStream in; - BufferedReader reader; + InputStream in; + BufferedReader reader; if (loader1 == null) in = ClassLoader.getSystemResourceAsStream (service); else @@ -171,31 +171,31 @@ }); } className = _clsFromJar; - } + } - // 3. Distro-specific fallback - if (className == null) { + // 3. Distro-specific fallback + if (className == null) { // BEGIN DISTRIBUTION-SPECIFIC - // EXAMPLE: - // className = "com.example.sax.XmlReader"; - // or a $JAVA_HOME/jre/lib/*properties setting... + // EXAMPLE: + // className = "com.example.sax.XmlReader"; + // or a $JAVA_HOME/jre/lib/*properties setting... className = "com.sun.org.apache.xerces.internal.parsers.SAXParser"; // END DISTRIBUTION-SPECIFIC - } - - // do we know the XMLReader implementation class yet? - if (className != null) - return loadClass (loader, className); + } + + // do we know the XMLReader implementation class yet? + if (className != null) + return loadClass (loader, className); - // 4. panic -- adapt any SAX1 parser - try { - return new ParserAdapter (ParserFactory.makeParser ()); - } catch (Exception e) { - throw new SAXException ("Can't create default XMLReader; " - + "is system property org.xml.sax.driver set?"); - } + // 4. panic -- adapt any SAX1 parser + try { + return new ParserAdapter (ParserFactory.makeParser ()); + } catch (Exception e) { + throw new SAXException ("Can't create default XMLReader; " + + "is system property org.xml.sax.driver set?"); + } } @@ -215,29 +215,29 @@ * @see #createXMLReader() */ public static XMLReader createXMLReader (String className) - throws SAXException + throws SAXException { - return loadClass (NewInstance.getClassLoader (), className); + return loadClass (NewInstance.getClassLoader (), className); } private static XMLReader loadClass (ClassLoader loader, String className) throws SAXException { - try { - return (XMLReader) NewInstance.newInstance (loader, className); - } catch (ClassNotFoundException e1) { - throw new SAXException("SAX2 driver class " + className + - " not found", e1); - } catch (IllegalAccessException e2) { - throw new SAXException("SAX2 driver class " + className + - " found but cannot be loaded", e2); - } catch (InstantiationException e3) { - throw new SAXException("SAX2 driver class " + className + - " loaded but cannot be instantiated (no empty public constructor?)", - e3); - } catch (ClassCastException e4) { - throw new SAXException("SAX2 driver class " + className + - " does not implement XMLReader", e4); - } + try { + return (XMLReader) NewInstance.newInstance (loader, className); + } catch (ClassNotFoundException e1) { + throw new SAXException("SAX2 driver class " + className + + " not found", e1); + } catch (IllegalAccessException e2) { + throw new SAXException("SAX2 driver class " + className + + " found but cannot be loaded", e2); + } catch (InstantiationException e3) { + throw new SAXException("SAX2 driver class " + className + + " loaded but cannot be instantiated (no empty public constructor?)", + e3); + } catch (ClassCastException e4) { + throw new SAXException("SAX2 driver class " + className + + " does not implement XMLReader", e4); + } } }