Stylus Studio XML Editor

Table of contents

Appendices

A.1 The nodeValidity and validateDocument methods

The nodeValidity and validateDocument methods

The following table describes all possible validation outcomes of the NodeEditVAL.nodeValidity(valType) method.

This table describes the different validation outcomes.50 Validation Type Validity outcome VAL_TRUE VAL_FALSE VAL_UNKNOWN
11VAL_WF 11The node is well-formed. 11The node is not well-formed. 11Not applicable.
11VAL_NS_WF 11The node is well-formed. Processor must take into account all the in-scope namespace declarations. 11The node is not namespace well-formed. Processor must take into account all the in-scope namespace declarations. 11Not applicable.
11VAL_NS_WF 11The node is well-formed. Processor must take into account all namespace declarations in scope. 11The node is not namespace well-formed. Processor must take into account all the in-scope namespace declarations. 11Not applicable.
11VAL_SCHEMA 11The node is valid: it complies with all the constraints expressed in the schema. 11The node fails to comply to all the constraints expressed in the schema. 11If the schema is an XML Schema, PSVI [validity] property value is unknown.
11VAL_INCOMPLETE 11The node is valid: it complies with the VAL_INCOMPLETE definition. 11The node is invalid with regard to the VAL_INCOMPLETE definition. 11If the schema is an XML Schema, PSVI [validity] property value is unknown.

The following table describes the outcome of the DocumentEditVAL.validateDocument() and NodeEditVAL.nodeValidity(valType) methods, with the latter called on the DocumentEditVAL node with validationType NodeEditVAL.VAL_SCHEMA.

This table describes the validation outcomes with VAL_SCHEMA.50 Methods Validity outcome VAL_TRUE VAL_FALSE VAL_UNKNOWN
11 validateDocument and nodeValidity, called on the Document node with validationType VAL_SCHEMA. 11 If the schema is a DTD, then the document valid constraint is satisfied. If the schema is an XML Schema, then the document validity is the same as the validity of the validation root, i.e., documentElement: PSVI [validity] valid. 11Fails to satisfy the constraints defined. 11 If the schema is an XML Schema, then schema is not found or the declaration for the validation root is not found: PSVI [validity] unknown.

The following table describes outcomes for the NodeEditVAL.nodeValidity(valType) method called with the validationType NodeEditVAL.VAL_SCHEMA:

This table describes the validation outcomes for nodeValidity with VAL_SCHEMA.50 Node types Validity outcome VAL_TRUE VAL_FALSE VAL_UNKNOWN
11 Element 11 If the schema is a DTD, then element and attribute validity constraints, including attribute validity constraint defined below are satisfied. If the schema is an XML Schema, then PSVI [validity] valid. 11 Fails to satisfy the constraints defined. 11 If the schema is an XML Schema, then PSVI [validity] unknown.
11 Attr 11 If the schema is a DTD, then all validity constraints defined in section 3.3.1, "Attribute Type", required and fixed attribute are satisfied. If the schema is an XML Schema, then PSVI [validity] valid. 11 Fails to satisfy the constraints defined. 11 If the schema is an XML Schema, then PSVI [validity] unknown.
11Text 11 The node is well-formed. 11 The node is not well-formed. 11 If no parent node is found.
11CDATASection 11 The node is well-formed. 11 The node is not well-formed. 11 If no parent node is found.
11ProcessingInstruction 11The node is well-formed. 11The node is not well-formed. 11 If no parent node is found.
11Comment 11The node is well-formed. 11The node is not well-formed. 11 If no parent node is found.
11EntityReference 11Entity is declared. 11Entity is not declared. 11 Not applicable.
11Entity 11 Implementation-specific. 11 Implementation-specific. 11 Implementation-specific.
11Notation 11 Implementation-specific. 11 Implementation-specific. 11 Implementation-specific.
11DocumentType 11 Implementation-specific. 11 Implementation-specific. 11 Implementation-specific.
11DocumentFragment 11 Not applicable. 11 Not applicable. 11 Not applicable.