A path to the schema to pass to salve for validation. This is
a path that will be interpreted by RequireJS. The schema must have already
been prepared for use by salve. See salve's documentation. Or this can be a
Grammar
object that has already been produced from salve
's
constructTree
.
The root of the DOM tree to validate. This root contains the document to validate but is not part of it.
The mode-specific validators to use.
The current set of errors.
The mode-specific validators to use.
This method should be called whenever a new error is detected. It records the error and emits the corresponding event.
The error found.
Runs document-wide validation specific to the mode passed to the validator.
Get the namespaces used in the document. This method does not cache its information and scan the whole document independently of the current validation status.
An object whose keys are namespace prefixes and values are lists of namespace URIs. The values are lists because prefixes can be redefined in a document.
Obtain the validation errors that belong to a specific node.
The term "that belong to" has a specific meaning here:
An error in the contents of an element belongs to the element whose
contents are incorrect. For instance if in the sequence
<foo><blip/></foo>
the tag <blip/>
is out of place, then the
error belongs to the node for the element foo
, not the node for the
element blip
.
Attribute errors belong to the element node to which the attributes belong.
The node whose errors we want to get.
The errors.
Function allowing to get a custom properties set on Node
objects by
this class.
Get the namespaces defined in the schema passed to the Validator.
The namespaces known to the schema.
Gets the validator working state.
The working state
Returns the set of possible events for the location specified by the parameters.
Location at which to get possibilities.
Whether we are interested in the attribute events of the
node pointed to by container, index
. If true
the node pointed to by
container, index
must be an element, and the returned set will contain
attribute events.
A set of possible events.
Finds the locations in a node where a certain validation event is possible.
A node.
The event to search for. The event should contain the same
data as would be passed to fireEvent
. Specifically, name patterns may
not be used in the event passed to this method.
The locations in container
where the event is possible.
Reset validation to continue from a certain point.
The element to start validation from.
Resolve a qualified name to an expanded name. See
"salve".NameResolver.resolveName
for what resolving means. This method
takes into account namespaces defined on parent nodes.
Where to perform the operation.
Where to perform the operation.
The name to rresolve.
The resolved name.
Restarts validation from a specific point. After the call returns, the background validation will be in effect. (So calling it on a stopped validator has the side effect of starting it.)
The element to start validation from.
Validate a DOM fragment as if it were present at the point specified in the parameters in the DOM tree being validated.
WARNING: This method will not catch unclosed elements. This is because the fragment is not considered to be a "complete" document. Unclosed elements or fragments that are not well-formed must be caught by other means.
The location in the tree to start at.
The fragment to parse.
An array of errors if there is an error. Otherwise returns false.
Validate a DOM fragment as if it were present at the point specified in the parameters in the DOM tree being validated.
WARNING: This method will not catch unclosed elements. This is because the fragment is not considered to be a "complete" document. Unclosed elements or fragments that are not well-formed must be caught by other means.
The location in the tree to start at.
The fragment to parse. This fragment must not be part of the tree that the validator normally validates. (It can be cloned from that tree.) This fragment must contain a single top level element which has only one child. This child is the element that will actually be parsed.
An array of errors if there is an error. Otherwise returns false.
Starts the background validation process.
Stops background validation.
Unresolve an expanded name to a qualified name. See
"salve".NameResolver.unresolveName
for what unresolving means. This
method takes into account namespaces defined on parent nodes.
Where to perform the operation.
Where to perform the operation.
The URI to unresolve.
The name to unresolve.
The unresolved name.
Generated using TypeDoc
A document validator.