equalContent
-
ContextResolver#equalContent(docnode, patnode)
Arguments: |
- docnode – A candidate node from the document
- patnode – A body-node from the pattern
|
Compare a document node against a content node from the patch. Return
true if the docnode matches the patnode.
Override this method if you use something different than the value
property of tree.Node.
equalContext
-
ContextResolver#equalContext(docnode, patnode)
Arguments: |
- docnode – A candidate node from the document
- patnode – The value from a context node
|
Compare a document node against a context node value. Return true if
the value of docnode matches the pattern value.
Override this method if you use something different than the value
property of tree.Node.
find
-
ContextResolver#find(path, body, head, tail, type)
Arguments: |
- path –
- An array of numbers. Each value represents an index
- into the childrens of a node in top-down order.
- body –
- An array containing the node sequence in question.
- When resolving the location of insert operations,
the array is empty. For updates, the array will
consist of exactly one node. Remove operations may
consist of one or more nodes.
- head –
- Leading context: An array containing the values of
- leading nodes in the same generation.
- tail –
- Trailing context: An array containing the values of
- trailing nodes in the same generation.
- type –
- Operation type. This parameter is passed to the
- equalContent callback.
|
- :returns :
- A result object with two properties: node holds the resolved
tree.Node and tail the unresolved part of path. Returns undefined on
failure.
Locate a node at the given path starting at refnode. Try to locate the
target within a given radius using the fingerprint values if direct
lookup failed.