Author: mrglavas
Date: Tue Feb 23 19:00:45 2010
New Revision: 915488
URL: http://svn.apache.org/viewvc?rev=915488&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/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
Modified:
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
URL:
http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java?rev=915488&r1=915487&r2=915488&view=diff
==============================================================================
---
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
(original)
+++
xerces/java/trunk/src/org/apache/xerces/jaxp/validation/ValidatorHandlerImpl.java
Tue Feb 23 19:00:45 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: [email protected]
For additional commands, e-mail: [email protected]