342 /**
343 * <p>Set the {@link Schema} to be used by parsers created
344 * from this factory.</p>
345 *
346 * <p>When a {@link Schema} is non-null, a parser will use a validator
347 * created from it to validate documents before it passes information
348 * down to the application.</p>
349 *
350 * <p>When warnings/errors/fatal errors are found by the validator, the parser must
351 * handle them as if those errors were found by the parser itself.
352 * In other words, if the user-specified {@link org.xml.sax.ErrorHandler}
353 * is set, it must receive those errors, and if not, they must be
354 * treated according to the implementation specific
355 * default error handling rules.
356 *
357 * <p>A validator may modify the SAX event stream (for example by
358 * adding default values that were missing in documents), and a parser
359 * is responsible to make sure that the application will receive
360 * those modified event stream.</p>
361 *
362 * <p>Initialy, <code>null</code> is set as the {@link Schema}.</p>
363 *
364 * <p>This processing will take effect even if
365 * the {@link #isValidating()} method returns <code>false</code>.
366 *
367 * <p>It is an error to use
368 * the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
369 * property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
370 * property in conjunction with a non-null {@link Schema} object.
371 * Such configuration will cause a {@link SAXException}
372 * exception when those properties are set on a {@link SAXParser}.</p>
373 *
374 * <h4>Note for implementors</h4>
375 * <p>
376 * A parser must be able to work with any {@link Schema}
377 * implementation. However, parsers and schemas are allowed
378 * to use implementation-specific custom mechanisms
379 * as long as they yield the result described in the specification.
380 * </p>
381 *
382 * @param schema <code>Schema</code> to use, <code>null</code> to remove a schema.
|
342 /**
343 * <p>Set the {@link Schema} to be used by parsers created
344 * from this factory.</p>
345 *
346 * <p>When a {@link Schema} is non-null, a parser will use a validator
347 * created from it to validate documents before it passes information
348 * down to the application.</p>
349 *
350 * <p>When warnings/errors/fatal errors are found by the validator, the parser must
351 * handle them as if those errors were found by the parser itself.
352 * In other words, if the user-specified {@link org.xml.sax.ErrorHandler}
353 * is set, it must receive those errors, and if not, they must be
354 * treated according to the implementation specific
355 * default error handling rules.
356 *
357 * <p>A validator may modify the SAX event stream (for example by
358 * adding default values that were missing in documents), and a parser
359 * is responsible to make sure that the application will receive
360 * those modified event stream.</p>
361 *
362 * <p>Initially, <code>null</code> is set as the {@link Schema}.</p>
363 *
364 * <p>This processing will take effect even if
365 * the {@link #isValidating()} method returns <code>false</code>.
366 *
367 * <p>It is an error to use
368 * the <code>http://java.sun.com/xml/jaxp/properties/schemaSource</code>
369 * property and/or the <code>http://java.sun.com/xml/jaxp/properties/schemaLanguage</code>
370 * property in conjunction with a non-null {@link Schema} object.
371 * Such configuration will cause a {@link SAXException}
372 * exception when those properties are set on a {@link SAXParser}.</p>
373 *
374 * <h4>Note for implementors</h4>
375 * <p>
376 * A parser must be able to work with any {@link Schema}
377 * implementation. However, parsers and schemas are allowed
378 * to use implementation-specific custom mechanisms
379 * as long as they yield the result described in the specification.
380 * </p>
381 *
382 * @param schema <code>Schema</code> to use, <code>null</code> to remove a schema.
|