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

Method name

basex-core/src/main/java/org/basex/query/func/unit/Unit.java:200–207  ·  view source on GitHub ↗

Returns an annotation argument as QName. @param sf static function @param ann annotation @return QName or null @throws QueryException query exception

(final StaticFunc sf, final Ann ann)

Source from the content-addressed store, hash-verified

198 * @throws QueryException query exception
199 */
200 private static QNm name(final StaticFunc sf, final Ann ann) throws QueryException {
201 final Value value = ann.value();
202 if(!value.isEmpty()) {
203 final byte[] name = value.itemAt(0).string(null);
204 if(name.length != 0) return QNm.parse(name, sf.name.uri(), null, sf.sc, sf.info);
205 }
206 return null;
207 }
208
209 /**
210 * Adds an error element to the specified test case.

Callers 1

testMethod · 0.95

Calls 6

isEmptyMethod · 0.95
itemAtMethod · 0.95
parseMethod · 0.95
valueMethod · 0.45
stringMethod · 0.45
uriMethod · 0.45

Tested by

no test coverage detected