| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
|
| <!--NewPage-->
|
| <HTML>
|
| <HEAD>
|
| <!-- Generated by javadoc on Thu Nov 22 17:12:53 EST 2007 -->
|
| <TITLE>
|
| Xalan-Java 2.7.1: Class SchemaFactory
|
| </TITLE>
|
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
|
| </HEAD>
|
| <BODY BGCOLOR="white">
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_top"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SchemaFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../javax/xml/validation/Schema.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="SchemaFactory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| <!-- ======== START OF CLASS DATA ======== -->
|
| <H2>
|
| <FONT SIZE="-1">
|
| javax.xml.validation</FONT>
|
| <BR>
|
| Class SchemaFactory</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<B>javax.xml.validation.SchemaFactory</B>
|
| </PRE>
|
| <HR>
|
| <DL>
|
| <DT>public abstract class <B>SchemaFactory</B><DT>extends java.lang.Object</DL>
|
|
|
| <P>
|
| Factory that creates <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> objects. Entry-point to |
| the validation API. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> is a schema compiler. It reads external |
| representations of schemas and prepares them for validation. |
| |
| <p> |
| The <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> class is not thread-safe. In other words, |
| it is the application's responsibility to ensure that at most |
| one thread is using a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> object at any |
| given moment. Implementations are encouraged to mark methods |
| as <tt>synchronized</tt> to protect themselves from broken clients. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> is not re-entrant. While one of the |
| <code>newSchema</code> methods is being invoked, applications |
| may not attempt to recursively invoke the <code>newSchema</code> method, |
| even from the same thread. |
| |
| <h2><a name="schemaLanguage"></a>Schema Language</h2> |
| <p> |
| This spec uses a namespace URI to designate a schema language. |
| The following table shows the values defined by this specification. |
| <p> |
| To be compliant with the spec, the implementation |
| is only required to support W3C XML Schema 1.0. However, |
| if it chooses to support other schema languages listed here, |
| it must conform to the relevant behaviors described in this spec. |
| |
| <p> |
| Schema languages not listed here are expected to |
| introduce their own URIs to represent themselves. |
| The <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> class is capable of locating other |
| implementations for other schema languages at run-time. |
| |
| <p> |
| Note that because the XML DTD is strongly tied to the parsing process |
| 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 |
| in a way they see fit, but <em>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</em>. |
| |
| <table border="1" cellpadding="2"> |
| <thead> |
| <tr> |
| <th>value</th> |
| <th>language</th> |
| </tr> |
| </thead> |
| <tbody> |
| <tr> |
| <td><A HREF="../../../javax/xml/XMLConstants.html#W3C_XML_SCHEMA_NS_URI"><CODE>XMLConstants.W3C_XML_SCHEMA_NS_URI</CODE></A> ("<code>http://www.w3.org/2001/XMLSchema</code>")</td> |
| <td><a href="http://www.w3.org/TR/xmlschema-1">W3C XML Schema 1.0</a></td> |
| </tr> |
| <tr> |
| <td><A HREF="../../../javax/xml/XMLConstants.html#RELAXNG_NS_URI"><CODE>XMLConstants.RELAXNG_NS_URI</CODE></A> ("<code>http://relaxng.org/ns/structure/1.0</code>")</td> |
| <td><a href="http://www.relaxng.org/">RELAX NG 1.0</a></td> |
| </tr> |
| </tbody> |
| </table>
|
| <P>
|
| <DL>
|
| <DT><B>Since: </B><DD>1.5</DD>
|
| </DL>
|
| <HR>
|
|
|
| <P>
|
| <!-- ======== INNER CLASS SUMMARY ======== -->
|
|
|
|
|
| <!-- =========== FIELD SUMMARY =========== -->
|
|
|
|
|
| <!-- ======== CONSTRUCTOR SUMMARY ======== -->
|
|
|
|
|
| <!-- ========== METHOD SUMMARY =========== -->
|
|
|
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=2><FONT SIZE="+2">
|
| <B>Method Summary</B></FONT></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract <A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#getErrorHandler()">getErrorHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Gets the current <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> set to this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> boolean</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#getFeature(java.lang.String)">getFeature</A></B>(java.lang.String name)</CODE>
|
|
|
| <BR>
|
| Look up the value of a feature flag.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> java.lang.Object</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#getProperty(java.lang.String)">getProperty</A></B>(java.lang.String name)</CODE>
|
|
|
| <BR>
|
| Look up the value of a property.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html">LSResourceResolver</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#getResourceResolver()">getResourceResolver</A></B>()</CODE>
|
|
|
| <BR>
|
| Gets the current <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> set to this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract boolean</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#isSchemaLanguageSupported(java.lang.String)">isSchemaLanguageSupported</A></B>(java.lang.String schemaLanguage)</CODE>
|
|
|
| <BR>
|
| Is specified schema supported by this <code>SchemaFactory</code>?</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>static <A HREF="../../../javax/xml/validation/SchemaFactory.html">SchemaFactory</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newInstance(java.lang.String)">newInstance</A></B>(java.lang.String schemaLanguage)</CODE>
|
|
|
| <BR>
|
| Lookup an implementation of the <code>SchemaFactory</code> that supports the specified |
| schema language and return it.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract <A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema()">newSchema</A></B>()</CODE>
|
|
|
| <BR>
|
| Creates a special <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(java.io.File)">newSchema</A></B>(java.io.File schema)</CODE>
|
|
|
| <BR>
|
| Parses the specified <code>File</code> as a schema and returns it as a <code>Schema</code>.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(javax.xml.transform.Source)">newSchema</A></B>(<A HREF="../../../javax/xml/transform/Source.html">Source</A> schema)</CODE>
|
|
|
| <BR>
|
| Parses the specified source as a schema and returns it as a schema.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract <A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(javax.xml.transform.Source[])">newSchema</A></B>(<A HREF="../../../javax/xml/transform/Source.html">Source</A>[] schemas)</CODE>
|
|
|
| <BR>
|
| Parses the specified source(s) as a schema and returns it as a schema.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> <A HREF="../../../javax/xml/validation/Schema.html">Schema</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(java.net.URL)">newSchema</A></B>(java.net.URL schema)</CODE>
|
|
|
| <BR>
|
| Parses the specified <code>URL</code> as a schema and returns it as a <code>Schema</code>.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)">setErrorHandler</A></B>(<A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> errorHandler)</CODE>
|
|
|
| <BR>
|
| Sets the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> to receive errors encountered |
| during the <code>newSchema</code> method invocation.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#setFeature(java.lang.String, boolean)">setFeature</A></B>(java.lang.String name, |
| boolean value)</CODE>
|
|
|
| <BR>
|
| Set the value of a feature flag.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE> void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#setProperty(java.lang.String, java.lang.Object)">setProperty</A></B>(java.lang.String name, |
| java.lang.Object object)</CODE>
|
|
|
| <BR>
|
| Set the value of a property.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract void</CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/SchemaFactory.html#setResourceResolver(org.w3c.dom.ls.LSResourceResolver)">setResourceResolver</A></B>(<A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html">LSResourceResolver</A> resourceResolver)</CODE>
|
|
|
| <BR>
|
| Sets the <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> to customize |
| resource resolution when parsing schemas.</TD>
|
| </TR>
|
| </TABLE>
|
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
|
| <TD><B>Methods inherited from class java.lang.Object</B></TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD><CODE>equals,
|
| getClass,
|
| hashCode,
|
| notify,
|
| notifyAll,
|
| toString,
|
| wait,
|
| wait,
|
| wait</CODE></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <P>
|
|
|
| <!-- ============ FIELD DETAIL =========== -->
|
|
|
|
|
| <!-- ========= CONSTRUCTOR DETAIL ======== -->
|
|
|
|
|
| <!-- ============ METHOD DETAIL ========== -->
|
|
|
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
|
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
|
| <TD COLSPAN=1><FONT SIZE="+2">
|
| <B>Method Detail</B></FONT></TD>
|
| </TR>
|
| </TABLE>
|
|
|
| <A NAME="newInstance(java.lang.String)"><!-- --></A><H3>
|
| newInstance</H3>
|
| <PRE>
|
| public static final <A HREF="../../../javax/xml/validation/SchemaFactory.html">SchemaFactory</A> <B>newInstance</B>(java.lang.String schemaLanguage)</PRE>
|
| <DL>
|
| <DD><p>Lookup an implementation of the <code>SchemaFactory</code> that supports the specified |
| schema language and return it.</p> |
| |
| <p>To find a <code>SchemaFactory</code> object for a given schema language, |
| this method looks the following places in the following order |
| where "the class loader" refers to the context class loader:</p> |
| <ol> |
| <li> |
| If the system property |
| <code>"javax.xml.validation.SchemaFactory:<i>schemaLanguage</i>"</code> |
| is present (where <i>schemaLanguage</i> is the parameter |
| to this method), then its value is read |
| as a class name. The method will try to |
| create a new instance of this class by using the class loader, |
| and returns it if it is successfully created. |
| </li> |
| <li> |
| <code>$java.home/lib/jaxp.properties</code> is read and |
| the value associated with the key being the system property above |
| is looked for. If present, the value is processed just like above. |
| </li> |
| <li> |
| <p>The class loader is asked for service provider provider-configuration files matching |
| <code>javax.xml.validation.SchemaFactory</code> 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:</p> |
| <pre> |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html#isSchemaLanguageSupported(java.lang.String)"><CODE>isSchemaLanguageSupported(String schemaLanguage)</CODE></A> |
| </pre> |
| The first service provider found in class loader order that supports the specified schema language is returned. |
| </li> |
| <li> |
| Platform default <code>SchemaFactory</code> is located |
| in a implementation specific way. There must be a platform default |
| <code>SchemaFactory</code> for W3C XML Schema. |
| </li> |
| </ol> |
| |
| <p>If everything fails, <CODE>IllegalArgumentException</CODE> will be thrown.</p> |
| |
| <p><strong>Tip for Trouble-shooting:</strong></p> |
| <p>See <CODE>Properties.load(java.io.InputStream)</CODE> for |
| exactly how a property file is parsed. In particular, colons ':' |
| need to be escaped in a property file, so make sure schema language |
| URIs are properly escaped in it. For example:</p> |
| <pre> |
| http\://www.w3.org/2001/XMLSchema=org.acme.foo.XSSchemaFactory |
| </pre><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schemaLanguage</CODE> - Specifies the schema language which the returned |
| SchemaFactory will understand. See |
| <a href="#schemaLanguage">the list of available |
| schema languages</a> for the possible values.<DT><B>Returns:</B><DD>New instance of a <code>SchemaFactory</code><DT><B>Throws:</B><DD>java.lang.IllegalArgumentException - If no implementation of the schema language is available.<DD>java.lang.NullPointerException - If the <tt>schemLanguage</tt> parameter is null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="isSchemaLanguageSupported(java.lang.String)"><!-- --></A><H3>
|
| isSchemaLanguageSupported</H3>
|
| <PRE>
|
| public abstract boolean <B>isSchemaLanguageSupported</B>(java.lang.String schemaLanguage)</PRE>
|
| <DL>
|
| <DD><p>Is specified schema supported by this <code>SchemaFactory</code>?</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schemaLanguage</CODE> - Specifies the schema language which the returned <code>SchemaFactory</code> will understand. |
| <code>schemaLanguage</code> must specify a <a href="#schemaLanguage">valid</a> schema language.<DT><B>Returns:</B><DD><code>true</code> if <code>SchemaFactory</code> supports <code>schemaLanguage</code>, else <code>false</code>.<DT><B>Throws:</B><DD>java.lang.NullPointerException - If <code>schemaLanguage</code> is <code>null</code>.<DD>java.lang.IllegalArgumentException - If <code>schemaLanguage.length() == 0</code> |
| or <code>schemaLanguage</code> does not specify a <a href="#schemaLanguage">valid</a> schema language.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getFeature(java.lang.String)"><!-- --></A><H3>
|
| getFeature</H3>
|
| <PRE>
|
| public boolean <B>getFeature</B>(java.lang.String name) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Look up the value of a feature flag. |
| |
| <p>The feature name is any fully-qualified URI. It is |
| possible for a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> to recognize a feature name but |
| temporarily be unable to return its value. |
| |
| <p>Implementors are free (and encouraged) to invent their own features, |
| using names built on their own URIs.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The feature name, which is a non-null fully-qualified URI.<DT><B>Returns:</B><DD>The current value of the feature (true or false).<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the feature |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> recognizes the feature name but |
| cannot determine its value at this time.<DD>java.lang.NullPointerException - if the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/SchemaFactory.html#setFeature(java.lang.String, boolean)"><CODE>setFeature(String, boolean)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setFeature(java.lang.String, boolean)"><!-- --></A><H3>
|
| setFeature</H3>
|
| <PRE>
|
| public void <B>setFeature</B>(java.lang.String name, |
| boolean value) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Set the value of a feature flag. |
| |
| <p> |
| Feature can be used to control the way a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> |
| parses schemas, although <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>s are not required |
| to recognize any specific feature names.</p> |
| |
| <p>The feature name is any fully-qualified URI. It is |
| possible for a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> to expose a feature value but |
| to be unable to change the current value.</p> |
| |
| <p>All implementations are required to support the <A HREF="../../../javax/xml/XMLConstants.html#FEATURE_SECURE_PROCESSING"><CODE>XMLConstants.FEATURE_SECURE_PROCESSING</CODE></A> feature. |
| When the feature is:</p> |
| <ul> |
| <li> |
| <code>true</code>: the implementation will limit XML processing to conform to implementation limits. |
| Examples include enity expansion limits and XML Schema constructs that would consume large amounts of resources. |
| If XML processing is limited for security reasons, it will be reported via a call to the registered |
| <A HREF="../../../org/xml/sax/ErrorHandler.html#fatalError(org.xml.sax.SAXParseException)"><CODE>ErrorHandler.fatalError(SAXParseException exception)</CODE></A>. |
| See <A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler errorHandler)</CODE></A>. |
| </li> |
| <li> |
| <code>false</code>: the implementation will processing XML according to the XML specifications without |
| regard to possible implementation limits. |
| </li> |
| </ul><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The feature name, which is a non-null fully-qualified URI.<DD><CODE>value</CODE> - The requested value of the feature (true or false).<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the feature |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> recognizes the feature name but |
| cannot set the requested value.<DD>java.lang.NullPointerException - if the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/SchemaFactory.html#getFeature(java.lang.String)"><CODE>getFeature(String)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setProperty(java.lang.String, java.lang.Object)"><!-- --></A><H3>
|
| setProperty</H3>
|
| <PRE>
|
| public void <B>setProperty</B>(java.lang.String name, |
| java.lang.Object object) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Set the value of a property. |
| |
| <p>The property name is any fully-qualified URI. It is |
| possible for a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> to recognize a property name but |
| to be unable to change the current value.</p> |
| |
| <p><A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>s are not required to recognize setting |
| any specific property names.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The property name, which is a non-null fully-qualified URI.<DD><CODE>object</CODE> - The requested value for the property.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the property |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> recognizes the property name but |
| cannot set the requested value.<DD>java.lang.NullPointerException - if the name parameter is null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getProperty(java.lang.String)"><!-- --></A><H3>
|
| getProperty</H3>
|
| <PRE>
|
| public java.lang.Object <B>getProperty</B>(java.lang.String name) |
| throws <A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A>, |
| <A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A></PRE>
|
| <DL>
|
| <DD>Look up the value of a property. |
| |
| <p>The property name is any fully-qualified URI. It is |
| possible for a <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> to recognize a property name but |
| temporarily be unable to return its value.</p> |
| |
| <p><A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>s are not required to recognize any specific |
| property names.</p> |
| |
| <p>Implementors are free (and encouraged) to invent their own properties, |
| using names built on their own URIs.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>name</CODE> - The property name, which is a non-null fully-qualified URI.<DT><B>Returns:</B><DD>The current value of the property.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXNotRecognizedException.html">SAXNotRecognizedException</A> - If the property |
| value can't be assigned or retrieved.<DD><A HREF="../../../org/xml/sax/SAXNotSupportedException.html">SAXNotSupportedException</A> - When the |
| XMLReader recognizes the property name but |
| cannot determine its value at this time.<DD>java.lang.NullPointerException - if the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/SchemaFactory.html#setProperty(java.lang.String, java.lang.Object)"><CODE>setProperty(String, Object)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setErrorHandler(org.xml.sax.ErrorHandler)"><!-- --></A><H3>
|
| setErrorHandler</H3>
|
| <PRE>
|
| public abstract void <B>setErrorHandler</B>(<A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> errorHandler)</PRE>
|
| <DL>
|
| <DD>Sets the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> to receive errors encountered |
| during the <code>newSchema</code> method invocation. |
| |
| <p> |
| Error handler can be used to customize the error handling process |
| during schema parsing. When an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is set, |
| errors found during the parsing of schemas will be first sent |
| to the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>. |
| |
| <p> |
| The error handler can abort the parsing of a schema immediately |
| by throwing <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A> from the handler. Or for example |
| it can print an error to the screen and try to continue the |
| processing by returning normally from the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> |
| |
| <p> |
| If any <CODE>Throwable</CODE> (or instances of its derived classes) |
| is thrown from an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>, |
| the caller of the <code>newSchema</code> method will be thrown |
| the same <CODE>Throwable</CODE> object. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> is not allowed to |
| throw <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A> without first reporting it to |
| <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>. |
| |
| <p> |
| Applications can call this method even during a <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> |
| is being parsed. |
| |
| <p> |
| When the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is null, the implementation will |
| behave as if the following <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is set: |
| <pre> |
| class DraconianErrorHandler implements <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> { |
| public void fatalError( <A HREF="../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A> e ) throws <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A> { |
| throw e; |
| } |
| public void error( <A HREF="../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A> e ) throws <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A> { |
| throw e; |
| } |
| public void warning( <A HREF="../../../org/xml/sax/SAXParseException.html"><CODE>SAXParseException</CODE></A> e ) throws <A HREF="../../../org/xml/sax/SAXException.html"><CODE>SAXException</CODE></A> { |
| // noop |
| } |
| } |
| </pre> |
| |
| <p> |
| When a new <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> object is created, initially |
| this field is set to null. This field will <em>NOT</em> be |
| inherited to <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A>s, <A HREF="../../../javax/xml/validation/Validator.html"><CODE>Validator</CODE></A>s, or |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>s that are created from this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>errorHandler</CODE> - A new error handler to be set. This parameter can be null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getErrorHandler()"><!-- --></A><H3>
|
| getErrorHandler</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../org/xml/sax/ErrorHandler.html">ErrorHandler</A> <B>getErrorHandler</B>()</PRE>
|
| <DL>
|
| <DD>Gets the current <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> set to this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.<DD><DL>
|
| <DT><B>Returns:</B><DD>This method returns the object that was last set through |
| the <A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler)</CODE></A> method, or null |
| if that method has never been called since this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> |
| has created.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="setResourceResolver(org.w3c.dom.ls.LSResourceResolver)"><!-- --></A><H3>
|
| setResourceResolver</H3>
|
| <PRE>
|
| public abstract void <B>setResourceResolver</B>(<A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html">LSResourceResolver</A> resourceResolver)</PRE>
|
| <DL>
|
| <DD>Sets the <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> to customize |
| resource resolution when parsing schemas. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> uses a <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> |
| when it needs to locate external resources while parsing schemas, |
| although exactly what constitutes "locating external resources" is |
| up to each schema language. For example, for W3C XML Schema, |
| this includes files <tt><include></tt>d or <tt><import></tt>ed, |
| and DTD referenced from schema files, etc. |
| |
| <p> |
| Applications can call this method even during a <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> |
| is being parsed. |
| |
| <p> |
| When the <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> is null, the implementation will |
| behave as if the following <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> is set: |
| <pre> |
| class DumbDOMResourceResolver implements <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> { |
| public <A HREF="../../../org/w3c/dom/ls/LSInput.html"><CODE>LSInput</CODE></A> resolveResource( |
| String publicId, String systemId, String baseURI) { |
| |
| return null; // always return null |
| } |
| } |
| </pre> |
| |
| <p> |
| If a <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> throws a <CODE>RuntimeException</CODE> |
| (or instances of its derived classes), |
| then the <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> will abort the parsing and |
| the caller of the <code>newSchema</code> method will receive |
| the same <CODE>RuntimeException</CODE>. |
| |
| <p> |
| When a new <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> object is created, initially |
| this field is set to null. This field will <em>NOT</em> be |
| inherited to <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A>s, <A HREF="../../../javax/xml/validation/Validator.html"><CODE>Validator</CODE></A>s, or |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>s that are created from this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>resourceResolver</CODE> - A new resource resolver to be set. This parameter can be null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getResourceResolver()"><!-- --></A><H3>
|
| getResourceResolver</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html">LSResourceResolver</A> <B>getResourceResolver</B>()</PRE>
|
| <DL>
|
| <DD>Gets the current <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> set to this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A>.<DD><DL>
|
| <DT><B>Returns:</B><DD>This method returns the object that was last set through |
| the <A HREF="../../../javax/xml/validation/SchemaFactory.html#setResourceResolver(org.w3c.dom.ls.LSResourceResolver)"><CODE>setResourceResolver(LSResourceResolver)</CODE></A> method, or null |
| if that method has never been called since this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> |
| has created.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="newSchema(javax.xml.transform.Source)"><!-- --></A><H3>
|
| newSchema</H3>
|
| <PRE>
|
| public <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>newSchema</B>(<A HREF="../../../javax/xml/transform/Source.html">Source</A> schema) |
| throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD><p>Parses the specified source as a schema and returns it as a schema.</p> |
| |
| <p>This is a convenience method for <A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(javax.xml.transform.Source[])"><CODE>newSchema(Source[] schemas)</CODE></A>.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schema</CODE> - Source that represents a schema.<DT><B>Returns:</B><DD>New <code>Schema</code> from parsing <code>schema</code>.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - If a SAX error occurs during parsing.<DD>java.lang.NullPointerException - if <tt>schema</tt> is null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="newSchema(java.io.File)"><!-- --></A><H3>
|
| newSchema</H3>
|
| <PRE>
|
| public <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>newSchema</B>(java.io.File schema) |
| throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD><p>Parses the specified <code>File</code> as a schema and returns it as a <code>Schema</code>.</p> |
| |
| <p>This is a convenience method for <A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(javax.xml.transform.Source)"><CODE>newSchema(Source schema)</CODE></A>.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schema</CODE> - File that represents a schema.<DT><B>Returns:</B><DD>New <code>Schema</code> from parsing <code>schema</code>.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - If a SAX error occurs during parsing.<DD>java.lang.NullPointerException - if <tt>schema</tt> is null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="newSchema(java.net.URL)"><!-- --></A><H3>
|
| newSchema</H3>
|
| <PRE>
|
| public <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>newSchema</B>(java.net.URL schema) |
| throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD><p>Parses the specified <code>URL</code> as a schema and returns it as a <code>Schema</code>.</p> |
| |
| <p>This is a convenience method for <A HREF="../../../javax/xml/validation/SchemaFactory.html#newSchema(javax.xml.transform.Source)"><CODE>newSchema(Source schema)</CODE></A>.</p><DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schema</CODE> - <code>URL</code> that represents a schema.<DT><B>Returns:</B><DD>New <code>Schema</code> from parsing <code>schema</code>.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - If a SAX error occurs during parsing.<DD>java.lang.NullPointerException - if <tt>schema</tt> is null.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="newSchema(javax.xml.transform.Source[])"><!-- --></A><H3>
|
| newSchema</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>newSchema</B>(<A HREF="../../../javax/xml/transform/Source.html">Source</A>[] schemas) |
| throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Parses the specified source(s) as a schema and returns it as a schema. |
| |
| <p> |
| The callee will read all the <A HREF="../../../javax/xml/transform/Source.html"><CODE>Source</CODE></A>s and combine them into a |
| single schema. The exact semantics of the combination depends on the schema |
| language that this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> object is created for. |
| |
| <p> |
| When an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is set, the callee will report all the errors |
| found in sources to the handler. If the handler throws an exception, it will |
| abort the schema compilation and the same exception will be thrown from |
| this method. Also, after an error is reported to a handler, the callee is allowed |
| to abort the further processing by throwing it. If an error handler is not set, |
| the callee will throw the first error it finds in the sources. |
| |
| <h2>W3C XML Schema 1.0</h2> |
| <p> |
| The resulting schema contains components from the specified sources. |
| The same result would be achieved if all these sources were |
| imported, using appropriate values for schemaLocation and namespace, |
| into a single schema document with a different targetNamespace |
| and no components of its own, if the import elements were given |
| in the same order as the sources. Section 4.2.3 of the XML Schema |
| recommendation describes the options processors have in this |
| regard. While a processor should be consistent in its treatment of |
| JAXP schema sources and XML Schema imports, the behaviour between |
| JAXP-compliant parsers may vary; in particular, parsers may choose |
| to ignore all but the first <import> for a given namespace, |
| regardless of information provided in schemaLocation. |
| |
| <p> |
| If the parsed set of schemas includes error(s) as |
| specified in the section 5.1 of the XML Schema spec, then |
| the error must be reported to the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>. |
| |
| <h2>RELAX NG</h2> |
| |
| <p>For RELAX NG, this method must throw <CODE>UnsupportedOperationException</CODE> |
| if <tt>schemas.length!=1</tt>.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>schemas</CODE> - inputs to be parsed. <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> is required |
| to recognize <A HREF="../../../javax/xml/transform/sax/SAXSource.html"><CODE>SAXSource</CODE></A>, |
| <A HREF="../../../javax/xml/transform/stream/StreamSource.html"><CODE>StreamSource</CODE></A>, and <A HREF="../../../javax/xml/transform/dom/DOMSource.html"><CODE>DOMSource</CODE></A>.<DT><B>Returns:</B><DD>Always return a non-null valid <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object. |
| Note that when an error has been reported, there is no |
| guarantee that the returned <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object is |
| meaningful.<DT><B>Throws:</B><DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - If an error is found during processing the specified inputs. |
| When an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is set, errors are reported to |
| there first. See <A HREF="../../../javax/xml/validation/SchemaFactory.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler)</CODE></A>.<DD>java.lang.NullPointerException - If the <code>schemas</code> parameter itself is null or |
| any item in the array is null.<DD>java.lang.IllegalArgumentException - If any item in the array is not recognized by this method.<DD>UnsupportedOperationException - If the schema language doesn't support this operation.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="newSchema()"><!-- --></A><H3>
|
| newSchema</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../javax/xml/validation/Schema.html">Schema</A> <B>newSchema</B>() |
| throws <A HREF="../../../org/xml/sax/SAXException.html">SAXException</A></PRE>
|
| <DL>
|
| <DD>Creates a special <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object. |
| |
| <p> |
| The exact semantics of the returned <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object depends |
| on the schema language that this <A HREF="../../../javax/xml/validation/SchemaFactory.html"><CODE>SchemaFactory</CODE></A> is created |
| for. |
| |
| <p> |
| Also, implementations are allowed to use implementation-specific |
| property/feature to alter the semantics of this method. |
| |
| |
| <h2>W3C XML Schema 1.0</h2> |
| <p> |
| For XML Schema, this method creates a <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object that |
| performs validation by using location hints specified in documents. |
| |
| <p> |
| The returned <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object assumes that if documents |
| refer to the same URL in the schema location hints, |
| they will always resolve to the same schema document. This |
| asusmption allows implementations to reuse parsed results of |
| schema documents so that multiple validations against the same |
| schema will run faster. |
| |
| <p> |
| Note that the use of schema location hints introduces a |
| vulnerability to denial-of-service attacks. |
| |
| |
| <h2>RELAX NG</h2> |
| <p> |
| RELAX NG does not support this operation.<DD><DL>
|
| <DT><B>Returns:</B><DD>Always return non-null valid <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A> object.<DT><B>Throws:</B><DD>UnsupportedOperationException - If this operation is not supported by the callee.<DD><A HREF="../../../org/xml/sax/SAXException.html">SAXException</A> - If this operation is supported but failed for some reason.</DL>
|
| </DD>
|
| </DL>
|
| <!-- ========= END OF CLASS DATA ========= -->
|
| <HR>
|
|
|
| <!-- ========== START OF NAVBAR ========== -->
|
| <A NAME="navbar_bottom"><!-- --></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
|
| <TR>
|
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
|
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
|
| <TR ALIGN="center" VALIGN="top">
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
|
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/SchemaFactory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
|
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
|
| </TR>
|
| </TABLE>
|
| </TD>
|
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
|
| </EM>
|
| </TD>
|
| </TR>
|
|
|
| <TR>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../javax/xml/validation/Schema.html"><B>PREV CLASS</B></A>
|
| <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><B>NEXT CLASS</B></A></FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="SchemaFactory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
|
| </TR>
|
| <TR>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
|
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
|
| DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
|
| </TR>
|
| </TABLE>
|
| <!-- =========== END OF NAVBAR =========== -->
|
|
|
| <HR>
|
| Copyright © 2006 Apache XML Project. All Rights Reserved.
|
| </BODY>
|
| </HTML>
|