|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.dom.NodeSetHelper
Collection of static methods operating on node sets.
Constructor Summary | |
NodeSetHelper()
|
Method Summary | |
static void |
copyChildren(org.w3c.dom.Document new_doc,
org.w3c.dom.Node node,
org.w3c.dom.Node new_node)
|
static org.w3c.dom.Node |
copyNode(org.w3c.dom.Document new_doc,
org.w3c.dom.Node node)
|
static NodeSet |
directSelectAttributes(NodeSet candidates,
QName qname,
int contextId)
|
static NodeSet |
selectAncestorDescendant(NodeSet dl,
NodeSet al,
int mode,
boolean includeSelf,
int contextId)
For two given sets of potential ancestor and descendant nodes, find those nodes from the descendant set that actually have ancestors in the ancestor set, i.e. |
static NodeSet |
selectAncestors(NodeSet al,
NodeSet dl,
boolean includeSelf,
int contextId)
For two sets of potential ancestor and descendant nodes, return all the real ancestors having a descendant in the descendant set. |
static NodeSet |
selectFollowing(NodeSet references,
NodeSet candidates)
TODO: doesn't work!!! |
static NodeSet |
selectFollowingSiblings(NodeSet candidates,
NodeSet references,
int contextId)
Select all nodes from the passed set of potential siblings, which are following siblings of the nodes in the other set. |
static NodeSet |
selectParentChild(NodeSet dl,
NodeSet al,
int mode,
int contextId)
For two given sets of potential parent and child nodes, find those nodes from the child set that actually have parents in the parent set, i.e. |
static NodeSet |
selectPreceding(NodeSet references,
NodeSet candidates)
TODO: doesn't work!!! |
static NodeSet |
selectPrecedingSiblings(NodeSet candidates,
NodeSet references,
int contextId)
Select all nodes from the passed set of potential siblings, which are preceding siblings of the nodes in the other set. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public NodeSetHelper()
Method Detail |
public static NodeSet selectParentChild(NodeSet dl, NodeSet al, int mode, int contextId)
NodeSet.DESCENDANT
, the returned node set will contain all
child nodes found in this node set for each parent node. If mode is
NodeSet.ANCESTOR
, the returned set will contain those parent nodes, for
which children have been found.
dl
- a node set containing potential child nodesal
- a node set containing potential parent nodesmode
- selection modecontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
,
the current context will be added to each result of the of the
selection.public static NodeSet selectAncestorDescendant(NodeSet dl, NodeSet al, int mode, boolean includeSelf, int contextId)
NodeSet.DESCENDANT
, the returned node set will contain all
descendant nodes found in this node set for each ancestor. If mode is
NodeSet.ANCESTOR
, the returned set will contain those ancestor nodes,
for which descendants have been found.
dl
- a node set containing potential descendant nodesal
- a node set containing potential ancestor nodesmode
- selection modeincludeSelf
- if true, check if the ancestor node itself is contained in the
set of descendant nodes (descendant-or-self axis)contextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
,
the current context will be added to each result of the of the
selection.public static NodeSet selectAncestors(NodeSet al, NodeSet dl, boolean includeSelf, int contextId)
al
- node set containing potential ancestorsdl
- node set containing potential descendantsincludeSelf
- if true, check if the ancestor node itself is contained in
this node set (ancestor-or-self axis)contextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
,
the current context will be added to each result of the of the
selection.public static NodeSet selectPrecedingSiblings(NodeSet candidates, NodeSet references, int contextId)
candidates
- the node set to checkreferences
- a node set containing potential siblingscontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
,
the current context will be added to each result of the of the
selection.public static NodeSet selectFollowingSiblings(NodeSet candidates, NodeSet references, int contextId)
candidates
- the node set to checkreferences
- a node set containing potential siblingscontextId
- used to track context nodes when evaluating predicate
expressions. If contextId != Expression.NO_CONTEXT_ID
,
the current context will be added to each result of the of the
selection.public static NodeSet selectPreceding(NodeSet references, NodeSet candidates) throws XPathException
XPathException
public static NodeSet selectFollowing(NodeSet references, NodeSet candidates) throws XPathException
XPathException
public static NodeSet directSelectAttributes(NodeSet candidates, QName qname, int contextId)
public static final void copyChildren(org.w3c.dom.Document new_doc, org.w3c.dom.Node node, org.w3c.dom.Node new_node)
public static final org.w3c.dom.Node copyNode(org.w3c.dom.Document new_doc, org.w3c.dom.Node node)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |