2.39 :select_next()
This method is invoked by the transformer object during a transformation to determine the next node to visit. Hence the method defines the sequence in which the nodes of an XML tree or an IDM object hierarchy are transformed. In the default implementation of :select_next(), the sequence is a depth-first traversal.
The method can be redefined (similar to :init()).
Definition
object :select_next
(
object Src input
)
Parameters
- object Src input
-
In this parameter the current, most recently processed node, is transferred. In the default implementation, Src depends on the type of the .root attribute.
-
.root contains a string
In Src a doccursor that points to the current node in the XML tree is expected. The doccursor is set to next node (according to pre-order sequence) in the XML tree and returned by the method.
-
.root contains an IDM object
In Src an IDM object representing the current node is expected. Based on this object, the successor is determined.
-
Return value
The method returns either the next node or null if there are no more nodes to visit.
The default implementation of :select_next returns the next node depending on the type of the .root attribute:
-
.root contains a string
The method returns the doccursor, which was passed in the Src parameter, now pointing to the next DOM node according to pre-order sequence.
-
.root contains an IDM object
The method returns the IDM object to examine next.
Objects with this method
See also
Attribut
Obje