Test whether this node test is satisfied by a given node. This method is only
fully supported for a subset of NodeTests, because it doesn't provide all the information
needed to evaluate all node tests. In particular (a) it can't be used to evaluate a node
test of the form element(N,T) or schema-element(E) where it is necessary to know whether the
node is nilled, and (b) it can't be used to evaluate a node test of the form
document-node(element(X)). This in practice means that it is used (a) to evaluate the
simple node tests found in the XPath 1.0 subset used in XML Schema, and (b) to evaluate
node tests where the node kind is known to be an attribute.
Get a matching function that can be used to test whether numbered nodes in a TinyTree
or DominoTree satisfy the node test. (Calling this matcher must give the same result
as calling matchesNode(tree.getNode(nodeNr)), but it may well be faster).
targetVersion - the version of Saxon-JS being targeted
JS code as a string. The generated code will be used
as the body of a JS function in which the argument name "q" is an
XdmQName object holding the name. The XdmQName object has properties
uri and local.
knownToBe - An item type that the supplied item is known to conform to; the generated code
can assume that the item is an instance of this type.
targetVersion - The version of Saxon-JS for which code is being generated. Currently either 1 or 2.
variable "item" is an instance of this item type.
public java.util.Optional<java.lang.String> explainMismatch(Item item,
Get extra diagnostic information about why a supplied item does not conform to this
item type, if available. If extra information is returned, it should be in the form of a complete
sentence, minus the closing full stop. No information should be returned for obvious cases.