Returns an annotation argument as QName. @param sf static function @param ann annotation @return QName or null @throws QueryException query exception
(final StaticFunc sf, final Ann ann)
| 198 | * @throws QueryException query exception |
| 199 | */ |
| 200 | private static QNm name(final StaticFunc sf, final Ann ann) throws QueryException { |
| 201 | final Value value = ann.value(); |
| 202 | if(!value.isEmpty()) { |
| 203 | final byte[] name = value.itemAt(0).string(null); |
| 204 | if(name.length != 0) return QNm.parse(name, sf.name.uri(), null, sf.sc, sf.info); |
| 205 | } |
| 206 | return null; |
| 207 | } |
| 208 | |
| 209 | /** |
| 210 | * Adds an error element to the specified test case. |