Checks for namespace conflicts in attributes. @param list node list @param target target node @return specified node list @throws QueryException query exception
(final GNodeList list, final XNode target)
| 43 | * @throws QueryException query exception |
| 44 | */ |
| 45 | final GNodeList checkNS(final GNodeList list, final XNode target) throws QueryException { |
| 46 | for(final GNode node : list) { |
| 47 | final QNm name = node.qname(); |
| 48 | final byte[] prefix = name.prefix(); |
| 49 | // attributes without prefix have no namespace |
| 50 | if(prefix.length == 0) continue; |
| 51 | // check if attribute and target have the same namespace |
| 52 | final byte[] uri = target.uri(prefix); |
| 53 | if(uri != null && !eq(name.uri(), uri)) throw UPNSCONFL_X_X.get(info, name.uri(), uri); |
| 54 | } |
| 55 | return list; |
| 56 | } |
| 57 | |
| 58 | /** |
| 59 | * Creates a node builder. |