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

Method ncName

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

Checks the specified token as an NCName. @param value value to be checked @param start start position @return end position

(final byte[] value, final int start)

Source from the content-addressed store, hash-verified

262 * @return end position
263 */
264 private static int ncName(final byte[] value, final int start) {
265 final int vl = value.length;
266 for(int v = start; v < vl; v += cl(value, v)) {
267 final int cp = cp(value, v);
268 if(v == start ? !isNCStartChar(cp) : !isNCChar(cp)) return v;
269 }
270 return vl;
271 }
272
273 /**
274 * Checks if the specified name is an ID/IDREF attribute (IDREF: local name must contain 'idref';

Callers 2

isNCNameMethod · 0.95
isQNameMethod · 0.95

Calls 4

isNCStartCharMethod · 0.95
isNCCharMethod · 0.95
clMethod · 0.45
cpMethod · 0.45

Tested by

no test coverage detected