41 * Factory that creates {@link Schema} objects. Entry-point to 42 * the validation API. 43 * 44 * <p> 45 * {@link SchemaFactory} is a schema compiler. It reads external 46 * representations of schemas and prepares them for validation. 47 * 48 * <p> 49 * The {@link SchemaFactory} class is not thread-safe. In other words, 50 * it is the application's responsibility to ensure that at most 51 * one thread is using a {@link SchemaFactory} object at any 52 * given moment. Implementations are encouraged to mark methods 53 * as {@code synchronized} to protect themselves from broken clients. 54 * 55 * <p> 56 * {@link SchemaFactory} is not re-entrant. While one of the 57 * {@code newSchema} methods is being invoked, applications 58 * may not attempt to recursively invoke the {@code newSchema} method, 59 * even from the same thread. 60 * 61 * <h2><a name="schemaLanguage"></a>Schema Language</h2> 62 * <p> 63 * This spec uses a namespace URI to designate a schema language. 64 * The following table shows the values defined by this specification. 65 * <p> 66 * To be compliant with the spec, the implementation 67 * is only required to support W3C XML Schema 1.0. However, 68 * if it chooses to support other schema languages listed here, 69 * it must conform to the relevant behaviors described in this spec. 70 * 71 * <p> 72 * Schema languages not listed here are expected to 73 * introduce their own URIs to represent themselves. 74 * The {@link SchemaFactory} class is capable of locating other 75 * implementations for other schema languages at run-time. 76 * 77 * <p> 78 * Note that because the XML DTD is strongly tied to the parsing process 79 * and has a significant effect on the parsing process, it is impossible 80 * to define the DTD validation as a process independent from parsing. 81 * For this reason, this specification does not define the semantics for 82 * the XML DTD. This doesn't prohibit implementors from implementing it 83 * in a way they see fit, but <em>users are warned that any DTD 84 * validation implemented on this interface necessarily deviate from 85 * the XML DTD semantics as defined in the XML 1.0</em>. 86 * 87 * <table border="1" cellpadding="2"> 88 * <thead> 89 * <tr> 90 * <th>value</th> 91 * <th>language</th> 92 * </tr> 93 * </thead> 94 * <tbody> 95 * <tr> 96 * <td>{@link javax.xml.XMLConstants#W3C_XML_SCHEMA_NS_URI} ("{@code http://www.w3.org/2001/XMLSchema}")</td> 97 * <td><a href="http://www.w3.org/TR/xmlschema-1">W3C XML Schema 1.0</a></td> 98 * </tr> 99 * <tr> 100 * <td>{@link javax.xml.XMLConstants#RELAXNG_NS_URI} ("{@code http://relaxng.org/ns/structure/1.0}")</td> 101 * <td><a href="http://www.relaxng.org/">RELAX NG 1.0</a></td> 102 * </tr> 103 * </tbody> 104 * </table> 105 * 106 * @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a> 107 * @author <a href="mailto:Neeraj.Bajaj@sun.com">Neeraj Bajaj</a> | 41 * Factory that creates {@link Schema} objects. Entry-point to 42 * the validation API. 43 * 44 * <p> 45 * {@link SchemaFactory} is a schema compiler. It reads external 46 * representations of schemas and prepares them for validation. 47 * 48 * <p> 49 * The {@link SchemaFactory} class is not thread-safe. In other words, 50 * it is the application's responsibility to ensure that at most 51 * one thread is using a {@link SchemaFactory} object at any 52 * given moment. Implementations are encouraged to mark methods 53 * as {@code synchronized} to protect themselves from broken clients. 54 * 55 * <p> 56 * {@link SchemaFactory} is not re-entrant. While one of the 57 * {@code newSchema} methods is being invoked, applications 58 * may not attempt to recursively invoke the {@code newSchema} method, 59 * even from the same thread. 60 * 61 * <h2><a id="schemaLanguage"></a>Schema Language</h2> 62 * <p> 63 * This spec uses a namespace URI to designate a schema language. 64 * The following table shows the values defined by this specification. 65 * <p> 66 * To be compliant with the spec, the implementation 67 * is only required to support W3C XML Schema 1.0. However, 68 * if it chooses to support other schema languages listed here, 69 * it must conform to the relevant behaviors described in this spec. 70 * 71 * <p> 72 * Schema languages not listed here are expected to 73 * introduce their own URIs to represent themselves. 74 * The {@link SchemaFactory} class is capable of locating other 75 * implementations for other schema languages at run-time. 76 * 77 * <p> 78 * Note that because the XML DTD is strongly tied to the parsing process 79 * and has a significant effect on the parsing process, it is impossible 80 * to define the DTD validation as a process independent from parsing. 81 * For this reason, this specification does not define the semantics for 82 * the XML DTD. This doesn't prohibit implementors from implementing it 83 * in a way they see fit, but <em>users are warned that any DTD 84 * validation implemented on this interface necessarily deviate from 85 * the XML DTD semantics as defined in the XML 1.0</em>. 86 * 87 * <table class="striped"> 88 * <caption>URIs for Supported Schema languages</caption> 89 * <thead> 90 * <tr> 91 * <th>value</th> 92 * <th>language</th> 93 * </tr> 94 * </thead> 95 * <tbody> 96 * <tr> 97 * <td>{@link javax.xml.XMLConstants#W3C_XML_SCHEMA_NS_URI} ("{@code http://www.w3.org/2001/XMLSchema}")</td> 98 * <td><a href="http://www.w3.org/TR/xmlschema-1">W3C XML Schema 1.0</a></td> 99 * </tr> 100 * <tr> 101 * <td>{@link javax.xml.XMLConstants#RELAXNG_NS_URI} ("{@code http://relaxng.org/ns/structure/1.0}")</td> 102 * <td><a href="http://www.relaxng.org/">RELAX NG 1.0</a></td> 103 * </tr> 104 * </tbody> 105 * </table> 106 * 107 * @author <a href="mailto:Kohsuke.Kawaguchi@Sun.com">Kohsuke Kawaguchi</a> 108 * @author <a href="mailto:Neeraj.Bajaj@sun.com">Neeraj Bajaj</a> |