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

Method uri

basex-core/src/main/java/org/basex/query/value/node/XNode.java:311–320  ·  view source on GitHub ↗

Recursively finds the URI for the specified prefix. @param prefix prefix @return URI or null

(final byte[] prefix)

Source from the content-addressed store, hash-verified

309 * @return URI or {@code null}
310 */
311 public final byte[] uri(final byte[] prefix) {
312 final Atts ns = namespaces();
313 if(ns != null) {
314 final byte[] s = ns.value(prefix);
315 if(s != null) return s;
316 final XNode n = parent();
317 if(n != null) return n.uri(prefix);
318 }
319 return prefix.length == 0 ? Token.EMPTY : null;
320 }
321
322 /**
323 * Returns the base URI of the node.

Callers 3

itemMethod · 0.95
xdmInfoMethod · 0.45
xdmInfoMethod · 0.45

Calls 3

namespacesMethod · 0.95
valueMethod · 0.95
parentMethod · 0.95

Tested by

no test coverage detected