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

Method qName

basex-core/src/main/java/org/basex/query/QueryParser.java:4465–4480  ·  view source on GitHub ↗

Parses the "QName" rule. @param error optional error message. If not null, will be raised if no QName is found @return QName string @throws QueryException query exception

(final QueryError error)

Source from the content-addressed store, hash-verified

4463 * @throws QueryException query exception
4464 */
4465 private byte[] qName(final QueryError error) throws QueryException {
4466 token.reset();
4467 if(!ncName(true)) {
4468 if(error != null) throw error(error, currentAsString());
4469 } else if(consume(':')) {
4470 if(XMLToken.isNCStartChar(current())) {
4471 token.add(':');
4472 do {
4473 token.add(consume());
4474 } while(XMLToken.isNCChar(current()));
4475 } else {
4476 --pos;
4477 }
4478 }
4479 return token.toArray();
4480 }
4481
4482 /**
4483 * Helper method for parsing NCNames.

Callers 2

dirElementMethod · 0.95
eQNameMethod · 0.95

Calls 10

ncNameMethod · 0.95
errorMethod · 0.95
isNCStartCharMethod · 0.95
isNCCharMethod · 0.95
resetMethod · 0.65
addMethod · 0.65
currentAsStringMethod · 0.45
consumeMethod · 0.45
currentMethod · 0.45
toArrayMethod · 0.45

Tested by

no test coverage detected