Returns the name and namespace URI of the addressed element or attribute. @param pre PRE value @param kind node kind @return array with name and namespace URI
(final int pre, final int kind)
| 423 | * @return array with name and namespace URI |
| 424 | */ |
| 425 | public final byte[][] qname(final int pre, final int kind) { |
| 426 | final byte[] name = name(pre, kind); |
| 427 | byte[] uri = null; |
| 428 | final boolean hasPrefix = indexOf(name, ':') != -1; |
| 429 | if(hasPrefix || !nspaces.isEmpty()) { |
| 430 | final int uriId = uriId(pre, kind); |
| 431 | if(uriId > 0) { |
| 432 | uri = nspaces.uri(uriId); |
| 433 | } else if(hasPrefix && eq(prefix(name), XML)) { |
| 434 | uri = XMLToken.XML_URI; |
| 435 | } |
| 436 | } |
| 437 | return new byte[][] { name, uri == null ? EMPTY : uri }; |
| 438 | } |
| 439 | |
| 440 | /** |
| 441 | * Returns the namespace flag of the addressed element. |