Checks if the specified name is an ID/IDREF attribute (IDREF: local name must contain 'idref'; ID: local name must contain 'id', but not 'idref'). The correct approach would be to gather all ID/IDREF attributes and store them as metadata. @param name name @param idref ID/IDREF flag @return result of
(final byte[] name, final boolean idref)
| 279 | * @return result of check |
| 280 | */ |
| 281 | public static boolean isId(final byte[] name, final boolean idref) { |
| 282 | final byte[] id = lc(local(name)); |
| 283 | return idref ? contains(id, REF) : contains(id, ID) && !contains(id, REF); |
| 284 | } |
| 285 | |
| 286 | /** |
| 287 | * Encodes a token to a valid NCName. |