MCPcopy Create free account
hub / github.com/BaseXdb/basex / addNodes

Method addNodes

basex-core/src/main/java/org/basex/data/Namespaces.java:269–278  ·  view source on GitHub ↗

Recursively adds namespace nodes to a list, starting with the children of a node. @param node current namespace node @param list list with namespace nodes @param pre PRE value

(final NSNode node, final List<NSNode> list, final int pre)

Source from the content-addressed store, hash-verified

267 * @param pre PRE value
268 */
269 private static void addNodes(final NSNode node, final List<NSNode> list, final int pre) {
270 final int size = node.children();
271 int n = Math.max(0, node.find(pre));
272 while(n > 0 && (n == size || node.child(n).pre() >= pre)) n--;
273 for(; n < size; n++) {
274 final NSNode child = node.child(n);
275 if(child.pre() >= pre) list.add(child);
276 addNodes(child, list, pre);
277 }
278 }
279
280 // Updating Namespaces ==========================================================================
281

Callers 1

cacheMethod · 0.95

Calls 7

preMethod · 0.95
childMethod · 0.80
preMethod · 0.65
addMethod · 0.65
childrenMethod · 0.45
maxMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected