You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2010/02/23 20:04:33 UTC
svn commit: r915497 - in
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces:
impl/Constants.java jaxp/validation/ValidatorHandlerImpl.java
Author: mrglavas
Date: Tue Feb 23 19:04:33 2010
New Revision: 915497
URL: http://svn.apache.org/viewvc?rev=915497&view=rev
Log:
Adding an internal feature called: "http://apache.org/xml/features/internal/strings-interned". This makes it possible for applications to notify a ValidatorHandler that they are providing it with interned strings, allowing the ValidatorHandler to avoid passing strings for XML names through the SymbolTable.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java?rev=915497&r1=915496&r2=915497&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/impl/Constants.java Tue Feb 23 19:04:33 2010
@@ -288,6 +288,9 @@
/** Tolerate duplicates feature ("internal/tolerate-duplicates"). */
public static final String TOLERATE_DUPLICATES_FEATURE = "internal/tolerate-duplicates";
+ /** String interned feature ("internal/strings-interned"). */
+ public static final String STRINGS_INTERNED_FEATURE = "internal/strings-interned";
+
/** XInclude processing feature ("xinclude"). */
public static final String XINCLUDE_FEATURE = "xinclude";
@@ -537,7 +540,8 @@
UNPARSED_ENTITY_CHECKING_FEATURE,
NAMESPACE_GROWTH_FEATURE,
TOLERATE_DUPLICATES_FEATURE,
- TYPE_ALTERNATIVES_CHEKING_FEATURE
+ STRINGS_INTERNED_FEATURE,
+ TYPE_ALTERNATIVES_CHEKING_FEATURE,
};
/** Xerces properties. */
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java?rev=915497&r1=915496&r2=915497&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java Tue Feb 23 19:04:33 2010
@@ -99,9 +99,13 @@
Constants.SAX_FEATURE_PREFIX + Constants.NAMESPACE_PREFIXES_FEATURE;
/** Feature identifier: string interning. */
- protected static final String STRING_INTERNING =
+ private static final String STRING_INTERNING =
Constants.SAX_FEATURE_PREFIX + Constants.STRING_INTERNING_FEATURE;
+ /** Feature identifier: strings interned. */
+ private static final String STRINGS_INTERNED =
+ Constants.XERCES_FEATURE_PREFIX + Constants.STRINGS_INTERNED_FEATURE;
+
// property identifiers
/** Property identifier: error reporter. */
@@ -238,6 +242,9 @@
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
"FeatureNameNull", null));
}
+ if (STRINGS_INTERNED.equals(name)) {
+ return fStringsInternalized;
+ }
try {
return fComponentManager.getFeature(name);
}
@@ -262,6 +269,10 @@
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(fComponentManager.getLocale(),
"FeatureNameNull", null));
}
+ if (STRINGS_INTERNED.equals(name)) {
+ fStringsInternalized = value;
+ return;
+ }
try {
fComponentManager.setFeature(name, value);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org