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

Method isQName

basex-core/src/main/java/org/basex/util/XMLToken.java:225–233  ·  view source on GitHub ↗

Checks if the specified token is a valid QName. @param value value to be checked @return result of check

(final byte[] value)

Source from the content-addressed store, hash-verified

223 * @return result of check
224 */
225 public static boolean isQName(final byte[] value) {
226 final int vl = value.length;
227 if(vl == 0) return false;
228 final int i = ncName(value, 0);
229 if(i == vl) return true;
230 if(i == 0 || value[i] != ':') return false;
231 final int j = ncName(value, i + 1);
232 return j == vl && j != i + 1;
233 }
234
235 /**
236 * Returns a valid token representation of the specified value.

Callers 13

parseMethod · 0.95
errorMethod · 0.95
checkVariableMethod · 0.95
itemMethod · 0.95
itemMethod · 0.95
markMethod · 0.95
compareMethod · 0.95
parseMethod · 0.95
parseExpandedMethod · 0.95
castMethod · 0.95
parseQNameMethod · 0.95
actionMethod · 0.95

Calls 1

ncNameMethod · 0.95

Tested by

no test coverage detected