| 30 | } |
| 31 | |
| 32 | @Override |
| 33 | public FNode item(final QueryContext qc, final InputInfo ii) throws QueryException { |
| 34 | final FBuilder doc = FDoc.build(); |
| 35 | |
| 36 | final Constr constr = new Constr(doc, info, qc).add(exprs); |
| 37 | if(constr.errAtt != null) throw DOCATTS_X.get(info, constr.errAtt); |
| 38 | if(constr.errNS != null) throw DOCNS_X.get(info, constr.errNS); |
| 39 | final Atts ns = doc.namespaces; |
| 40 | if(ns != null) throw DOCNS_X.get(info, ns.name(0)); |
| 41 | final GNodeList attributes = doc.attributes; |
| 42 | if(attributes != null) throw DOCATTS_X.get(info, attributes.get(0).name()); |
| 43 | |
| 44 | return doc.finish(); |
| 45 | } |
| 46 | |
| 47 | @Override |
| 48 | public Expr copy(final CompileContext cc, final IntObjectMap<Var> vm) { |