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

Method ncname

basex-core/src/main/java/org/basex/query/expr/constr/CName.java:79–88  ·  view source on GitHub ↗

Evaluates the name expression as an NCName. @param empty allow empty name @param qc query context @return name @throws QueryException query exception

(final boolean empty, final QueryContext qc)

Source from the content-addressed store, hash-verified

77 * @throws QueryException query exception
78 */
79 final byte[] ncname(final boolean empty, final QueryContext qc) throws QueryException {
80 final Item item = name.atomItem(qc, info);
81 if(item == Empty.VALUE) {
82 if(empty) return EMPTY;
83 } else {
84 final Type type = item.type;
85 if(type.isStringOrUntyped() && type != BasicType.ANY_URI) return trim(item.string(info));
86 }
87 throw STRNCN_X_X.get(info, item.seqType(), item);
88 }
89
90 @Override
91 public boolean inlineable(final InlineContext ic) {

Callers 4

optimizeMethod · 0.80
itemMethod · 0.80
optimizeMethod · 0.80
itemMethod · 0.80

Calls 6

isStringOrUntypedMethod · 0.95
stringMethod · 0.95
seqTypeMethod · 0.95
getMethod · 0.65
atomItemMethod · 0.45
trimMethod · 0.45

Tested by

no test coverage detected