--- old/src/javax/xml/validation/SchemaFactory.java 2013-01-09 12:44:07.000000000 +0100 +++ new/src/javax/xml/validation/SchemaFactory.java 2013-01-09 12:44:06.000000000 +0100 @@ -27,15 +27,14 @@ import java.io.File; import java.net.URL; - import javax.xml.transform.Source; import javax.xml.transform.stream.StreamSource; - import org.w3c.dom.ls.LSResourceResolver; import org.xml.sax.ErrorHandler; import org.xml.sax.SAXException; import org.xml.sax.SAXNotRecognizedException; import org.xml.sax.SAXNotSupportedException; +import org.xml.sax.SAXParseException; /** * Factory that creates {@link Schema} objects. Entry-point to @@ -79,7 +78,7 @@ * and has a significant effect on the parsing process, it is impossible * to define the DTD validation as a process independent from parsing. * For this reason, this specification does not define the semantics for - * the XML DTD. This doesn't prohibit implentors from implementing it + * the XML DTD. This doesn't prohibit implementors from implementing it * in a way they see fit, but users are warned that any DTD * validation implemented on this interface necessarily deviate from * the XML DTD semantics as defined in the XML 1.0. @@ -147,14 +146,17 @@ * is looked for. If present, the value is processed just like above. * *
The class loader is asked for service provider provider-configuration files matching
- * javax.xml.validation.SchemaFactory
in the resource directory META-INF/services.
- * See the JAR File Specification for file format and parsing rules.
- * Each potential service provider is required to implement the method:
- * {@link #isSchemaLanguageSupported(String schemaLanguage)} - *- * The first service provider found in class loader order that supports the specified schema language is returned. + * Use the service-provider loading facilities, defined by the + * {@link java.util.ServiceLoader} class, to attempt to locate and load an + * implementation of the service.
SchemaFactory
is located
@@ -186,10 +188,12 @@
* If no implementation of the schema language is available.
* @throws NullPointerException
* If the schemaLanguage
parameter is null.
+ * @throws SchemaFactoryConfigurationError
+ * If a configuration error is encountered.
*
* @see #newInstance(String schemaLanguage, String factoryClassName, ClassLoader classLoader)
*/
- public static final SchemaFactory newInstance(String schemaLanguage) {
+ public static SchemaFactory newInstance(String schemaLanguage) {
ClassLoader cl;
cl = ss.getContextClassLoader();
@@ -275,19 +279,19 @@
}
- /**
- * Is specified schema supported by this SchemaFactory
?
SchemaFactory
will understand.
+ /**
+ * Is specified schema supported by this SchemaFactory
?
SchemaFactory
will understand.
* schemaLanguage
must specify a valid schema language.
- *
- * @return true
if SchemaFactory
supports schemaLanguage
, else false
.
- *
- * @throws NullPointerException If schemaLanguage
is null
.
- * @throws IllegalArgumentException If schemaLanguage.length() == 0
- * or schemaLanguage
does not specify a valid schema language.
- */
- public abstract boolean isSchemaLanguageSupported(String schemaLanguage);
+ *
+ * @return true
if SchemaFactory
supports schemaLanguage
, else false
.
+ *
+ * @throws NullPointerException If schemaLanguage
is null
.
+ * @throws IllegalArgumentException If schemaLanguage.length() == 0
+ * or schemaLanguage
does not specify a valid schema language.
+ */
+ public abstract boolean isSchemaLanguageSupported(String schemaLanguage);
/**
* Look up the value of a feature flag.