| <!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 ValidatorHandler
|
| </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/ValidatorHandler.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/Validator.html"><B>PREV CLASS</B></A>
|
| NEXT CLASS</FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="ValidatorHandler.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 ValidatorHandler</H2>
|
| <PRE>
|
| java.lang.Object
|
| |
|
| +--<B>javax.xml.validation.ValidatorHandler</B>
|
| </PRE>
|
| <HR>
|
| <DL>
|
| <DT>public abstract class <B>ValidatorHandler</B><DT>extends java.lang.Object<DT>implements <A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A></DL>
|
|
|
| <P>
|
| Streaming validator that works on SAX stream. |
| |
| <p> |
| A <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> object is a thread-unsafe, non-reentrant object. |
| In other words, it is the application's responsibility to make |
| sure that one <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> object is not used from |
| more than one thread at any given time. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> checks if the SAX events follow |
| the set of constraints described in the associated <A HREF="../../../javax/xml/validation/Schema.html"><CODE>Schema</CODE></A>, |
| and additionally it may modify the SAX events (for example |
| by adding default values, etc.) |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> extends from <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A>, |
| but it refines the underlying <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> in |
| the following way: |
| <ol> |
| <li>startElement/endElement events must receive non-null String |
| for <code>uri</code>, <code>localName</code>, and <code>qname</code>, |
| even though SAX allows some of them to be null. |
| Similarly, the user-specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> will receive non-null |
| Strings for all three parameters. |
| |
| <li>Applications must ensure that <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>'s |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String, java.lang.String)"><CODE>ContentHandler.startPrefixMapping(String,String)</CODE></A> and |
| <A HREF="../../../org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String)"><CODE>ContentHandler.endPrefixMapping(String)</CODE></A> are invoked |
| properly. Similarly, the user-specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> |
| will receive startPrefixMapping/endPrefixMapping events. |
| If the <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> introduces additional namespace |
| bindings, the user-specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> will receive |
| additional startPrefixMapping/endPrefixMapping events. |
| |
| <li><A HREF="../../../org/xml/sax/Attributes.html"><CODE>Attributes</CODE></A> for the |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>ContentHandler.startElement(String,String,String,Attributes)</CODE></A> method |
| may or may not include xmlns* attributes. |
| </ol> |
| |
| <p> |
| A <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> is automatically reset every time |
| the startDocument method is invoked. |
| |
| <h2>Recognized Properties and Features</h2> |
| <p> |
| This spec defines the following feature that must be recognized |
| by all <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> implementations. |
| |
| <h3><code>http://xml.org/sax/features/namespace-prefixes</code></h3> |
| <p> |
| This feature controls how a <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> introduces |
| namespace bindings that were not present in the original SAX event |
| stream. |
| When this feature is set to true, it must make |
| sure that the user's <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> will see |
| the corresponding <code>xmlns*</code> attribute in |
| the <A HREF="../../../org/xml/sax/Attributes.html"><CODE>Attributes</CODE></A> object of the |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>ContentHandler.startElement(String,String,String,Attributes)</CODE></A> |
| callback. Otherwise, <code>xmlns*</code> attributes must not be |
| added to <A HREF="../../../org/xml/sax/Attributes.html"><CODE>Attributes</CODE></A> that's passed to the |
| user-specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A>. |
| <p> |
| (Note that regardless of this switch, namespace bindings are |
| always notified to applications through |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startPrefixMapping(java.lang.String, java.lang.String)"><CODE>ContentHandler.startPrefixMapping(String,String)</CODE></A> and |
| <A HREF="../../../org/xml/sax/ContentHandler.html#endPrefixMapping(java.lang.String)"><CODE>ContentHandler.endPrefixMapping(String)</CODE></A> methods of the |
| <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> specified by the user.) |
| |
| <p> |
| Note that this feature does <em>NOT</em> affect the way |
| a <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> receives SAX events. It merely |
| changes the way it augments SAX events. |
| |
| <p>This feature is set to <code>false</code> by default.</p>
|
| <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/ContentHandler.html">ContentHandler</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/ValidatorHandler.html#getContentHandler()">getContentHandler</A></B>()</CODE>
|
|
|
| <BR>
|
| Gets the <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> which receives the |
| augmented validation result.</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/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</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/ValidatorHandler.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/ValidatorHandler.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/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>.</TD>
|
| </TR>
|
| <TR BGCOLOR="white" CLASS="TableRowColor">
|
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
|
| <CODE>abstract <A HREF="../../../javax/xml/validation/TypeInfoProvider.html">TypeInfoProvider</A></CODE></FONT></TD>
|
| <TD><CODE><B><A HREF="../../../javax/xml/validation/ValidatorHandler.html#getTypeInfoProvider()">getTypeInfoProvider</A></B>()</CODE>
|
|
|
| <BR>
|
| Obtains the <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><CODE>TypeInfoProvider</CODE></A> implementation of this |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>.</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/ValidatorHandler.html#setContentHandler(org.xml.sax.ContentHandler)">setContentHandler</A></B>(<A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> receiver)</CODE>
|
|
|
| <BR>
|
| Sets the <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> which receives |
| the augmented validation result.</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/ValidatorHandler.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 validation.</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/ValidatorHandler.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/ValidatorHandler.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/ValidatorHandler.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 while in a validation episode.</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="setContentHandler(org.xml.sax.ContentHandler)"><!-- --></A><H3>
|
| setContentHandler</H3>
|
| <PRE>
|
| public abstract void <B>setContentHandler</B>(<A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> receiver)</PRE>
|
| <DL>
|
| <DD>Sets the <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> which receives |
| the augmented validation result. |
| |
| <p> |
| When a <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> is specified, a |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> will work as a filter |
| and basically copy the incoming events to the |
| specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A>. |
| |
| <p> |
| In doing so, a <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> may modify |
| the events, for example by adding defaulted attributes. |
| |
| <p> |
| A <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> may buffer events to certain |
| extent, but to allow <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> to be used |
| by a parser, the following requirement has to be met. |
| |
| <ol> |
| <li>When |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)"><CODE>ContentHandler.startElement(String, String, String, Attributes)</CODE></A>, |
| <A HREF="../../../org/xml/sax/ContentHandler.html#endElement(java.lang.String, java.lang.String, java.lang.String)"><CODE>ContentHandler.endElement(String, String, String)</CODE></A>, |
| <A HREF="../../../org/xml/sax/ContentHandler.html#startDocument()"><CODE>ContentHandler.startDocument()</CODE></A>, or |
| <A HREF="../../../org/xml/sax/ContentHandler.html#endDocument()"><CODE>ContentHandler.endDocument()</CODE></A> |
| are invoked on a <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>, |
| the same method on the user-specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> |
| must be invoked for the same event before the callback |
| returns. |
| <li><A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> may not introduce new elements that |
| were not present in the input. |
| |
| <li><A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> may not remove attributes that were |
| present in the input. |
| </ol> |
| |
| <p> |
| When a callback method on the specified <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> |
| throws an exception, the same exception object must be thrown |
| from the <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>. The <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> |
| should not be notified of such an exception. |
| |
| <p> |
| This method can be called even during a middle of a validation.<DD><DL>
|
| <DT><B>Parameters:</B><DD><CODE>receiver</CODE> - A <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> or a null value.</DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getContentHandler()"><!-- --></A><H3>
|
| getContentHandler</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../org/xml/sax/ContentHandler.html">ContentHandler</A> <B>getContentHandler</B>()</PRE>
|
| <DL>
|
| <DD>Gets the <A HREF="../../../org/xml/sax/ContentHandler.html"><CODE>ContentHandler</CODE></A> which receives the |
| augmented validation result.<DD><DL>
|
| <DT><B>Returns:</B><DD>This method returns the object that was last set through |
| the <A HREF="../../../javax/xml/validation/ValidatorHandler.html#getContentHandler()"><CODE>getContentHandler()</CODE></A> method, or null |
| if that method has never been called since this <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> |
| has created.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.html#setContentHandler(org.xml.sax.ContentHandler)"><CODE>setContentHandler(ContentHandler)</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 validation. |
| |
| <p> |
| Error handler can be used to customize the error handling process |
| during a validation. When an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> is set, |
| errors found during the validation will be first sent |
| to the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>. |
| |
| <p> |
| The error handler can abort further validation 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 |
| validation by returning normally from the <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A> |
| |
| <p> |
| If any <CODE>Throwable</CODE> is thrown from an <A HREF="../../../org/xml/sax/ErrorHandler.html"><CODE>ErrorHandler</CODE></A>, |
| the same <CODE>Throwable</CODE> object will be thrown toward the |
| root of the call stack. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</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> |
| 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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> object is created, initially |
| this field is set to null.<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/ValidatorHandler.html"><CODE>ValidatorHandler</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/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> |
| has created.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.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 while in a validation episode. |
| |
| <p> |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> uses a <A HREF="../../../org/w3c/dom/ls/LSResourceResolver.html"><CODE>LSResourceResolver</CODE></A> |
| when it needs to locate external resources while a validation, |
| although exactly what constitutes "locating external resources" is |
| up to each schema language. |
| |
| <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 DumbLSResourceResolver 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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> will abort the parsing and |
| the caller of the <code>validate</code> method will receive |
| the same <CODE>RuntimeException</CODE>. |
| |
| <p> |
| When a new <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> object is created, initially |
| this field is set to null.<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/ValidatorHandler.html"><CODE>ValidatorHandler</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/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> |
| has created.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.html#setErrorHandler(org.xml.sax.ErrorHandler)"><CODE>setErrorHandler(ErrorHandler)</CODE></A></DL>
|
| </DD>
|
| </DL>
|
| <HR>
|
|
|
| <A NAME="getTypeInfoProvider()"><!-- --></A><H3>
|
| getTypeInfoProvider</H3>
|
| <PRE>
|
| public abstract <A HREF="../../../javax/xml/validation/TypeInfoProvider.html">TypeInfoProvider</A> <B>getTypeInfoProvider</B>()</PRE>
|
| <DL>
|
| <DD>Obtains the <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><CODE>TypeInfoProvider</CODE></A> implementation of this |
| <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>. |
| |
| <p> |
| The obtained <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><CODE>TypeInfoProvider</CODE></A> can be queried during a parse |
| to access the type information determined by the validator. |
| |
| <p> |
| Some schema languages do not define the notion of type, |
| for those languages, this method may not be supported. |
| However, to be compliant with this specification, implementations |
| for W3C XML Schema 1.0 must support this operation.<DD><DL>
|
| <DT><B>Returns:</B><DD>null if the validator / schema language does not support |
| the notion of <A HREF="../../../org/w3c/dom/TypeInfo.html"><CODE>TypeInfo</CODE></A>. |
| Otherwise a non-null valid <A HREF="../../../javax/xml/validation/TypeInfoProvider.html"><CODE>TypeInfoProvider</CODE></A>.</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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> to recognize a feature name but |
| temporarily be unable to return its value. |
| Some feature values may be available only in specific |
| contexts, such as before, during, or after a validation. |
| |
| <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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> recognizes the feature name but |
| cannot determine its value at this time.<DD>java.lang.NullPointerException - When the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> |
| parses schemas, although <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A>s are not required |
| to recognize any specific property names.</p> |
| |
| <p>The feature name is any fully-qualified URI. It is |
| possible for a <A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> to expose a feature value but |
| to be unable to change the current value. |
| Some feature values may be immutable or mutable only |
| in specific contexts, such as before, during, or after |
| a validation.</p><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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> recognizes the feature name but |
| cannot set the requested value.<DD>java.lang.NullPointerException - When the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> to recognize a property name but |
| to be unable to change the current value. |
| Some property values may be immutable or mutable only |
| in specific contexts, such as before, during, or after |
| a validation.</p> |
| |
| <p><A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> recognizes the property name but |
| cannot set the requested value.<DD>java.lang.NullPointerException - When 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/ValidatorHandler.html"><CODE>ValidatorHandler</CODE></A> to recognize a property name but |
| temporarily be unable to return its value. |
| Some property values may be available only in specific |
| contexts, such as before, during, or after a validation.</p> |
| |
| <p><A HREF="../../../javax/xml/validation/ValidatorHandler.html"><CODE>ValidatorHandler</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 - When the name parameter is null.<DT><B>See Also: </B><DD><A HREF="../../../javax/xml/validation/ValidatorHandler.html#setProperty(java.lang.String, java.lang.Object)"><CODE>setProperty(String, Object)</CODE></A></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/ValidatorHandler.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/Validator.html"><B>PREV CLASS</B></A>
|
| NEXT CLASS</FONT></TD>
|
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
|
| <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
|
| <A HREF="ValidatorHandler.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>
|