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

Method qname

basex-core/src/main/java/org/basex/data/Data.java:425–438  ·  view source on GitHub ↗

Returns the name and namespace URI of the addressed element or attribute. @param pre PRE value @param kind node kind @return array with name and namespace URI

(final int pre, final int kind)

Source from the content-addressed store, hash-verified

423 * @return array with name and namespace URI
424 */
425 public final byte[][] qname(final int pre, final int kind) {
426 final byte[] name = name(pre, kind);
427 byte[] uri = null;
428 final boolean hasPrefix = indexOf(name, ':') != -1;
429 if(hasPrefix || !nspaces.isEmpty()) {
430 final int uriId = uriId(pre, kind);
431 if(uriId > 0) {
432 uri = nspaces.uri(uriId);
433 } else if(hasPrefix && eq(prefix(name), XML)) {
434 uri = XMLToken.XML_URI;
435 }
436 }
437 return new byte[][] { name, uri == null ? EMPTY : uri };
438 }
439
440 /**
441 * Returns the namespace flag of the addressed element.

Callers 15

addMethod · 0.95
serviceMethod · 0.45
runMethod · 0.45
buildMethod · 0.45
nameMethod · 0.45
valueMethod · 0.45
errorMethod · 0.45
UserMethod · 0.45
JobsMethod · 0.45
commandMethod · 0.45
checkMethod · 0.45
parseMethod · 0.45

Calls 7

nameMethod · 0.95
uriIdMethod · 0.95
eqMethod · 0.65
indexOfMethod · 0.45
isEmptyMethod · 0.45
uriMethod · 0.45
prefixMethod · 0.45

Tested by 4

getCodeMethod · 0.36
getNameMethod · 0.36
assertErrorMethod · 0.36