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)
| 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'; |