MCPcopy Create free account
hub / github.com/BaseXdb/basex / item

Method item

basex-core/src/main/java/org/basex/query/expr/constr/CPI.java:48–61  ·  view source on GitHub ↗
(final QueryContext qc, final InputInfo ii)

Source from the content-addressed store, hash-verified

46 }
47
48 @Override
49 public FPI item(final QueryContext qc, final InputInfo ii) throws QueryException {
50 final byte[] nm = ncname(false, qc);
51 if(eq(lc(nm), XML)) throw CPIXML_X.get(info, nm);
52 if(!XMLToken.isNCName(nm)) throw CPIINVAL_X.get(info, nm);
53
54 byte[] value = atomValue(qc, true);
55 int i = -1;
56 final int vl = value.length;
57 while(++i < vl && ws(value[i]));
58 value = substring(value, i);
59
60 return new FPI(qc.shared.qName(nm), qc.shared.token(FPI.parse(value, info)));
61 }
62
63 @Override
64 public Expr copy(final CompileContext cc, final IntObjectMap<Var> vm) {

Callers

nothing calls this directly

Calls 11

isNCNameMethod · 0.95
parseMethod · 0.95
ncnameMethod · 0.80
eqMethod · 0.65
getMethod · 0.65
tokenMethod · 0.65
lcMethod · 0.45
atomValueMethod · 0.45
wsMethod · 0.45
substringMethod · 0.45
qNameMethod · 0.45

Tested by

no test coverage detected