File tree Expand file tree Collapse file tree
basex-core/src/main/java/org/basex/query/expr Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010import org .basex .query .util .*;
1111import org .basex .query .value .*;
1212import org .basex .query .value .item .*;
13+ import org .basex .query .value .node .*;
1314import org .basex .query .value .type .*;
1415import org .basex .query .var .*;
1516import org .basex .util .*;
@@ -136,16 +137,6 @@ public Item next() throws QueryException {
136137 };
137138 }
138139
139- @ Override
140- public Value value (final QueryContext qc ) throws QueryException {
141- final ValueBuilder vb = new ValueBuilder (qc );
142- final Iter iter = exprs [0 ].iter (qc );
143- for (Item item ; (item = qc .next (iter )) != null ;) {
144- vb .add (valueFor (item , qc ));
145- }
146- return vb .value (this );
147- }
148-
149140 /**
150141 * Returns the looked up values for the specified input.
151142 * @param item input item
@@ -154,7 +145,9 @@ public Value value(final QueryContext qc) throws QueryException {
154145 * @throws QueryException query exception
155146 */
156147 private Value valueFor (final Item item , final QueryContext qc ) throws QueryException {
157- if (!(item instanceof final XQStruct struct )) throw LOOKUP_X .get (info , item );
148+ Item it = item ;
149+ if (it instanceof final JNode jnode ) it = jnode .value .item (qc , info );
150+ if (!(it instanceof final XQStruct struct )) throw LOOKUP_X .get (info , it );
158151 final Expr keys = exprs [1 ];
159152
160153 // wildcard: add all values
You can’t perform that action at this time.
0 commit comments