Evaluates the name expression as an NCName. @param empty allow empty name @param qc query context @return name @throws QueryException query exception
(final boolean empty, final QueryContext qc)
| 77 | * @throws QueryException query exception |
| 78 | */ |
| 79 | final byte[] ncname(final boolean empty, final QueryContext qc) throws QueryException { |
| 80 | final Item item = name.atomItem(qc, info); |
| 81 | if(item == Empty.VALUE) { |
| 82 | if(empty) return EMPTY; |
| 83 | } else { |
| 84 | final Type type = item.type; |
| 85 | if(type.isStringOrUntyped() && type != BasicType.ANY_URI) return trim(item.string(info)); |
| 86 | } |
| 87 | throw STRNCN_X_X.get(info, item.seqType(), item); |
| 88 | } |
| 89 | |
| 90 | @Override |
| 91 | public boolean inlineable(final InlineContext ic) { |