Checks if the specified token is a valid QName. @param value value to be checked @return result of check
(final byte[] value)
| 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. |
no test coverage detected