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 2008/09/27 19:10:03 UTC
svn commit: r699689 -
/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
Author: mrglavas
Date: Sat Sep 27 10:10:03 2008
New Revision: 699689
URL: http://svn.apache.org/viewvc?rev=699689&view=rev
Log:
Return true for each of the JAXP Source features to indicate
to the caller of getFeature() that this SchemaFactory supports
all of the built-in JAXP Source types.
Modified:
xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
Modified: xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java?rev=699689&r1=699688&r2=699689&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/src/org/apache/xerces/jaxp/validation/BaseSchemaFactory.java Sat Sep 27 10:10:03 2008
@@ -71,6 +71,9 @@
abstract class BaseSchemaFactory extends SchemaFactory {
// feature identifiers
+
+ /** JAXP Source feature prefix. */
+ private static final String JAXP_SOURCE_FEATURE_PREFIX = "http://javax.xml.transform";
/** Feature identifier: schema full checking. */
private static final String SCHEMA_FULL_CHECKING =
@@ -287,6 +290,15 @@
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(Locale.getDefault(),
"FeatureNameNull", null));
}
+ if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
+ // Indicates to the caller that this SchemaFactory supports a specific JAXP Source.
+ if (name.equals(StreamSource.FEATURE) ||
+ name.equals(SAXSource.FEATURE) ||
+ name.equals(DOMSource.FEATURE) ||
+ name.equals(StAXSource.FEATURE)) {
+ return true;
+ }
+ }
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
return (fSecurityManager != null);
}
@@ -352,6 +364,16 @@
throw new NullPointerException(JAXPValidationMessageFormatter.formatMessage(Locale.getDefault(),
"FeatureNameNull", null));
}
+ if (name.startsWith(JAXP_SOURCE_FEATURE_PREFIX)) {
+ if (name.equals(StreamSource.FEATURE) ||
+ name.equals(SAXSource.FEATURE) ||
+ name.equals(DOMSource.FEATURE) ||
+ name.equals(StAXSource.FEATURE)) {
+ throw new SAXNotSupportedException(
+ SAXMessageFormatter.formatMessage(Locale.getDefault(),
+ "feature-read-only", new Object [] {name}));
+ }
+ }
if (name.equals(XMLConstants.FEATURE_SECURE_PROCESSING)) {
fSecurityManager = value ? new SecurityManager() : null;
fXMLSchemaLoader.setProperty(SECURITY_MANAGER, fSecurityManager);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org