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

Method isNMToken

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

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

(final byte[] value)

Source from the content-addressed store, hash-verified

210 * @return result of check
211 */
212 public static boolean isNMToken(final byte[] value) {
213 final int vl = value.length;
214 for(int v = 0; v < vl; v += cl(value, v)) {
215 if(!isChar(cp(value, v))) return false;
216 }
217 return vl != 0;
218 }
219
220 /**
221 * Checks if the specified token is a valid QName.

Callers 1

castMethod · 0.95

Calls 3

isCharMethod · 0.95
clMethod · 0.45
cpMethod · 0.45

Tested by

no test coverage detected