📄 domconfiguration.java
字号:
* separated by whitespaces (characters matching the <a href='http://www.w3.org/TR/2004/REC-xml-20040204#NT-S'>nonterminal * production S</a> defined in section 2.3 [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]), that * represents the schemas against which validation should occur, i.e. the * current schema. The types of schemas referenced in this list must match * the type specified with <code>schema-type</code>, otherwise the behavior * of an implementation is undefined. The schemas specified using this * property take precedence to the schema information specified in the * document itself. For namespace aware schema, if a schema specified using * this property and a schema specified in the document instance (i.e. using * the <code>schemaLocation</code> attribute) in a schema document (i.e. * using schema <code>import</code> mechanisms) share the same * <code>targetNamespace</code>, the schema specified by the user using this * property will be used. If two schemas specified using this property share * the same <code>targetNamespace</code> or have no namespace, the behavior * is implementation dependent. If no location has been provided, this * parameter is <code>null</code>. * <p ><b>Note:</b> The <code>"schema-location"</code> parameter is ignored * unless the "schema-type" parameter value is set. It is strongly * recommended that <code>Document.documentURI</code> will be set so that an * implementation can successfully resolve any external entities referenced. </dd> * <dt> * <code>"schema-type"</code></dt> * <dd>[<em>optional</em>] Represent a <code>DOMString</code> object containing an absolute URI * and representing the type of the schema language used to validate a * document against. Note that no lexical checking is done on the absolute * URI. If this parameter is not set, a default value may be provided by * the implementation, based on the schema languages supported and on the * schema language used at load time. If no value is provided, this * parameter is <code>null</code>. * <p ><b>Note:</b> For XML Schema [<a href='http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/'>XML Schema Part 1</a>] * , applications must use the value * <code>"http://www.w3.org/2001/XMLSchema"</code>. For XML DTD [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>], * applications must use the value * <code>"http://www.w3.org/TR/REC-xml"</code>. Other schema languages are * outside the scope of the W3C and therefore should recommend an absolute * URI in order to use this method. </dd> * <dt><code>"split-cdata-sections"</code></dt> * <dd> * <dl> * <dt> * <code>true</code></dt> * <dd>[<em>required</em>] (<em>default</em>)Split CDATA sections containing the CDATA section termination marker * ']]>'. When a CDATA section is split a warning is issued with a * <code>DOMError.type</code> equals to * <code>"cdata-sections-splitted"</code> and * <code>DOMError.relatedData</code> equals to the first * <code>CDATASection</code> node in document order resulting from the split.</dd> * <dt> * <code>false</code></dt> * <dd>[<em>required</em>]Signal an error if a <code>CDATASection</code> contains an * unrepresentable character.</dd> * </dl></dd> * <dt><code>"validate"</code></dt> * <dd> * <dl> * <dt><code>true</code></dt> * <dd>[<em>optional</em>] Require the validation against a schema (i.e. XML schema, DTD, any * other type or representation of schema) of the document as it is being * normalized as defined by [<a href='http://www.w3.org/TR/2004/REC-xml-20040204'>XML 1.0</a>]. If * validation errors are found, or no schema was found, the error handler is * notified. Schema-normalized values will not be exposed according to the * schema in used unless the parameter "datatype-normalization" is * <code>true</code>. This parameter will reevaluate: * <ul> * <li> Attribute nodes with * <code>Attr.specified</code> equals to <code>false</code>, as specified in * the description of the <code>Attr</code> interface; * </li> * <li> The value of the * attribute <code>Text.isElementContentWhitespace</code> for all * <code>Text</code> nodes; * </li> * <li> The value of the attribute * <code>Attr.isId</code> for all <code>Attr</code> nodes; * </li> * <li> The attributes * <code>Element.schemaTypeInfo</code> and <code>Attr.schemaTypeInfo</code>. * </li> * </ul> * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually * exclusive, setting one of them to <code>true</code> will set the other * one to <code>false</code>. Applications should also consider setting the * parameter "well-formed" to <code>true</code>, which is the default for * that option, when validating the document. </dd> * <dt><code>false</code></dt> * <dd>[<em>required</em>] (<em>default</em>) Do not accomplish schema processing, including the internal subset * processing. Default attribute values information are kept. Note that * validation might still happen if "validate-if-schema" is <code>true</code> * . </dd> * </dl></dd> * <dt><code>"validate-if-schema"</code></dt> * <dd> * <dl> * <dt><code>true</code></dt> * <dd>[<em>optional</em>]Enable validation only if a declaration for the document element can be * found in a schema (independently of where it is found, i.e. XML schema, * DTD, or any other type or representation of schema). If validation is * enabled, this parameter has the same behavior as the parameter "validate" * set to <code>true</code>. * <p ><b>Note:</b> "validate-if-schema" and "validate" are mutually * exclusive, setting one of them to <code>true</code> will set the other * one to <code>false</code>. </dd> * <dt><code>false</code></dt> * <dd>[<em>required</em>] (<em>default</em>) No schema processing should be performed if the document has a schema, * including internal subset processing. Default attribute values * information are kept. Note that validation must still happen if "validate * " is <code>true</code>. </dd> * </dl></dd> * <dt><code>"well-formed"</code></dt> * <dd> * <dl> * <dt><code>true</code></dt> * <dd>[<em>required</em>] (<em>default</em>) Check if all nodes are XML well formed according to the XML version in * use in <code>Document.xmlVersion</code>: * <ul> * <li> check if the attribute * <code>Node.nodeName</code> contains invalid characters according to its * node type and generate a <code>DOMError</code> of type * <code>"wf-invalid-character-in-node-name"</code>, with a * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary; * </li> * <li> check if * the text content inside <code>Attr</code>, <code>Element</code>, * <code>Comment</code>, <code>Text</code>, <code>CDATASection</code> nodes * for invalid characters and generate a <code>DOMError</code> of type * <code>"wf-invalid-character"</code>, with a * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary; * </li> * <li> check if * the data inside <code>ProcessingInstruction</code> nodes for invalid * characters and generate a <code>DOMError</code> of type * <code>"wf-invalid-character"</code>, with a * <code>DOMError.SEVERITY_ERROR</code> severity, if necessary; * </li> * </ul></dd> * <dt> * <code>false</code></dt> * <dd>[<em>optional</em>] Do not check for XML well-formedness. </dd> * </dl></dd> * </dl> * <p> The resolution of the system identifiers associated with entities is * done using <code>Document.documentURI</code>. However, when the feature * "LS" defined in [<a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407'>DOM Level 3 Load and Save</a>] * is supported by the DOM implementation, the parameter * "resource-resolver" can also be used on <code>DOMConfiguration</code> * objects attached to <code>Document</code> nodes. If this parameter is * set, <code>Document.normalizeDocument()</code> will invoke the resource * resolver instead of using <code>Document.documentURI</code>. * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407'>Document Object Model (DOM) Level 3 Core Specification</a>. * @since DOM Level 3 */public interface DOMConfiguration { /** * Set the value of a parameter. * @param name The name of the parameter to set. * @param value The new value or <code>null</code> if the user wishes to * unset the parameter. While the type of the value parameter is * defined as <code>DOMUserData</code>, the object type must match the * type defined by the definition of the parameter. For example, if * the parameter is "error-handler", the value must be of type * <code>DOMErrorHandler</code>. * @exception DOMException * NOT_FOUND_ERR: Raised when the parameter name is not recognized. * <br> NOT_SUPPORTED_ERR: Raised when the parameter name is recognized * but the requested value cannot be set. * <br> TYPE_MISMATCH_ERR: Raised if the value type for this parameter * name is incompatible with the expected value type. */ public void setParameter(String name, Object value) throws DOMException; /** * Return the value of a parameter if known. * @param name The name of the parameter. * @return The current object associated with the specified parameter or * <code>null</code> if no object has been associated or if the * parameter is not supported. * @exception DOMException * NOT_FOUND_ERR: Raised when the parameter name is not recognized. */ public Object getParameter(String name) throws DOMException; /** * Check if setting a parameter to a specific value is supported. * @param name The name of the parameter to check. * @param value An object. if <code>null</code>, the returned value is * <code>true</code>. * @return <code>true</code> if the parameter could be successfully set * to the specified value, or <code>false</code> if the parameter is * not recognized or the requested value is not supported. This does * not change the current value of the parameter itself. */ public boolean canSetParameter(String name, Object value); /** * The list of the parameters supported by this * <code>DOMConfiguration</code> object and for which at least one value * can be set by the application. Note that this list can also contain * parameter names defined outside this specification. */ public DOMStringList getParameterNames();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -