DomConfiguration Parameter Description

Parameter

"canonical-form"

true
[optional]

Canonicalize the document according to the rules specified in [Canonical XML], such as removing the DomDocumentType node (if any) from the tree, or removing superfluous namespace declarations from each element. Note that this is limited to what can be represented in the DOM; in particular, there is no way to specify the order of the attributes in the DOM.

In addition, Setting this parameter to true will also set the state of the parameters listed below. Later changes to the state of one of those parameters will revert "canonical-form" back to false.

Other parameters are not changed unless explicitly specified in the description of the parameters.

false
[required] (default)

Do not canonicalize the document.

"cdata-sections"

true
[required] (default)

Keep DomCDATASection nodes in the document.

false
[required]

Transform DomCDATASection nodes in the document into DomText nodes. The new DomText node is then combined with any adjacent DomText node.

"check-character-normalization"

true
[optional]

Check if the characters in the document are fully normalized, as defined in appendix B of [XML 1.1]. When a sequence of characters is encountered that fails normalization checking, an error with the DomError::getType() equals to "check-character-normalization-failure" is issued.

false
[required] (default)

Do not check if characters are normalized.

"comments"

true
[required] (default)

Keep DomComment nodes in the document.

false
[required]

Discard DomComment nodes in the document.

"datatype-normalization"

true
[optional]

Expose schema normalized values in the tree, such as XML Schema normalized values in the case of XML Schema. Since this parameter requires to have schema information, the "validate" parameter will also be set to true. Having this parameter activated when "validate" is false has no effect and no schema-normalization will happen.

Note:
Since the document contains the result of the XML 1.0 processing, this parameter does not apply to attribute value normalization as defined in section 3.3.3 of [XML 1.0] and is only meant for schema languages other than Document Type Definition (DTD).
false
[required] (default)

Do not perform schema normalization on the tree.

"element-content-whitespace"

true
[required] (default)

Keep all whitespaces in the document.

false
[optional]

Discard all DomText nodes that contain whitespaces in element content, as described in element content whitespace. The implementation is expected to use the attribute DomText::isElementContentWhitespace() to determine if a DomText node should be discarded or not.

"entities"

true
[required] (default)

Keep DomEntityReference nodes in the document.

false
[required]

Remove all DomEntityReference nodes from the document, putting the entity expansions directly in their place. DomText nodes are normalized, as defined in DomNode::normalize(). Only unexpanded entity references are kept in the document.

Note:
This parameter does not affect DomEntity nodes.

"error-handler"

[required]

Contains a DomErrorHandler object. If an error is encountered in the document, the implementation will call back the DomErrorHandler registered using this parameter. The implementation may provide a default DomErrorHandler object.

When called, DomError::getRelatedData() will contain the closest node to where the error occurred. If the implementation is unable to determine the node where the error occurs, DomError::getRelatedData() will contain the DomDocument node. Mutations to the document from within an error handler will result in implementation dependent behavior.

"infoset"

true
[required]

Keep in the document the information defined in the XML Information Set [XML Information Set].

This forces the following parameters to false: "validate-if-schema", "entities", "datatype-normalization", "cdata-sections".

This forces the following parameters to true: "namespace-declarations", "well-formed", "element-content-whitespace", "comments", "namespaces".

Other parameters are not changed unless explicitly specified in the description of the parameters.

Note that querying this parameter with getParameter returns true only if the individual parameters specified above are appropriately set.

false
Setting infoset to false has no effect.

"namespaces"

true
[required] (default)

Perform the namespace processing as defined in Namespace Normalization.

false
[optional]

Do not perform the namespace processing.

"namespace-declarations"

This parameter has no effect if the parameter "namespaces" is set to false.

true
[required] (default)

Include namespace declaration attributes, specified or defaulted from the schema, in the document. See also the sections "Declaring Namespaces" in [XML Namespaces] and [XML Namespaces 1.1].

false
[required]

Discard all namespace declaration attributes. The namespace prefixes (DomNode::prefix() ) are retained even if this parameter is set to false.

"normalize-characters"

true
[optional]

Fully normalized the characters in the document as defined in appendix B of [XML 1.1].

false
[required] (default)

Do not perform character normalization.

"schema-location"

[optional]

Represent a DomString object containing a list of URIs, separated by whitespaces (characters matching the nonterminal production S defined in section 2.3 [XML 1.0]), 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 schema-type, 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 schemaLocation attribute) in a schema document (i.e. using schema import mechanisms) share the same targetNamespace, the schema specified by the user using this property will be used. If two schemas specified using this property share the same targetNamespace or have no namespace, the behavior is implementation dependent.

If no location has been provided, this parameter is null.

Note:
The "schema-location" parameter is ignored unless the "schema-type" parameter value is set. It is strongly recommended that DomDocument::getDocumentURI() will be set so that an implementation can successfully resolve any external entities referenced.

"schema-type"

[optional]

Represent a DomString 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 null.

Note:
For XML Schema [XML Schema Part 1], applications must use the value "http://www.w3.org/2001/XMLSchema". For XML DTD [XML 1.0], applications must use the value "http://www.w3.org/TR/REC-xml". Other schema languages are outside the scope of the W3C and therefore should recommend an absolute URI in order to use this method.

"split-cdata-sections"

true
[required] (default)

Split CDATA sections containing the CDATA section termination marker ’]]>’. When a CDATA section is split a warning is issued with a DomError::getType() equals to "cdata-sections-splitted" and DomError::getRelatedData() equals to the first DomCDATASection node in document order resulting from the split.

false
[required]

Signal an error if a DomCDATASection contains an unrepresentable character.

"validate"

true
[optional]

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 [XML 1.0]. 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 true.

This parameter will reevaluate:

Note:
"validate-if-schema" and "validate" are mutually exclusive, setting one of them to true will set the other one to false. Applications should also consider setting the parameter "well-formed" to true, which is the default for that option, when validating the document.
false
[required] (default)

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 true.

"validate-if-schema"

true
[optional]

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 true.

Note:
"validate-if-schema" and "validate" are mutually exclusive, setting one of them to true will set the other one to false.
false
[required] (default)

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 true.

"well-formed"

true
[required] (default)

Check if all nodes are XML well formed according to the XML version in use in DomDocument::getXmlVersion():

false
[optional]

Do not check for XML well-formedness.


Generated on Fri May 30 11:15:05 2008 for XMLDOM by  doxygen 1.5.2