/** * Iterate over the sequence of values */ public SequenceIterator iterate(XPathContext context) throws XPathException { SequenceIterator base = operand.iterate(context); return getAtomizingIterator(base); }
/** * Iterate over the sequence of values */ public SequenceIterator iterate(XPathContext context) throws XPathException { SequenceIterator base = operand.iterate(context); return getAtomizingIterator(base); }
/** * Iterate over the sequence of values */ public SequenceIterator iterate(XPathContext context) throws XPathException { SequenceIterator base = operand.iterate(context); return getAtomizingIterator(base); }
private static GroundedValue<? extends AtomicValue> atomize(Sequence<?> input) throws XPathException { SequenceIterator<?> iterator = input.iterate(); SequenceIterator<? extends AtomicValue> mapper = Atomizer.getAtomizingIterator(iterator, false); return mapper.materialize(); } }
private static GroundedValue<? extends AtomicValue> atomize(Sequence<?> input) throws XPathException { SequenceIterator<?> iterator = input.iterate(); SequenceIterator<? extends AtomicValue> mapper = Atomizer.getAtomizingIterator(iterator, false); return mapper.materialize(); } }
/** * Iterate over the sequence of values */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { SequenceIterator base = getBaseExpression().iterate(context); return getAtomizingIterator(base, untyped && operandItemType instanceof NodeTest); }
public static AtomicSequence atomize(Sequence<?> sequence) throws XPathException { if (sequence instanceof AtomicSequence) { return (AtomicSequence)sequence; } else if (sequence instanceof EmptySequence) { return EmptyAtomicSequence.getInstance(); } else { SequenceIterator<? extends AtomicValue> iter = getAtomizingIterator(sequence.iterate(), false); return new AtomicArray(iter); } }
public static AtomicSequence atomize(Sequence<?> sequence) throws XPathException { if (sequence instanceof AtomicSequence) { return (AtomicSequence)sequence; } else if (sequence instanceof EmptySequence) { return EmptyAtomicSequence.getInstance(); } else { SequenceIterator<? extends AtomicValue> iter = getAtomizingIterator(sequence.iterate(), false); return new AtomicArray(iter); } }
/** * Evaluate the expression. (Used for run-time evaluation only) * * @param context the dynamic evaluation context * @param arguments the values of the arguments, supplied as Sequences * @return the result of the evaluation, in the form of a Sequence * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs during the evaluation of the expression */ public Sequence<? extends AtomicValue> call(XPathContext context, Sequence[] arguments) throws XPathException { Sequence<?> arg = arguments[0]; if (arg instanceof Item) { return ((Item)arg).atomize(); } else { SequenceIterator<? extends AtomicValue> a = Atomizer.getAtomizingIterator(arg.iterate(), false); return SequenceTool.toLazySequence(a); } } }
protected static void checkGroupingValues(Sequence[] groupingValues) throws XPathException { for (int i = 0; i < groupingValues.length; i++) { Sequence<?> v = groupingValues[i]; if (!(v instanceof EmptySequence || v instanceof AtomicValue)) { v = Atomizer.getAtomizingIterator(v.iterate(), false).materialize(); if (SequenceTool.getLength(v) > 1) { throw new XPathException("Grouping key value cannot be a sequence of more than one item", "XPTY0004"); } groupingValues[i] = v; } } }
/** * Evaluate the expression. (Used for run-time evaluation only) * * @param context the dynamic evaluation context * @param arguments the values of the arguments, supplied as Sequences * @return the result of the evaluation, in the form of a Sequence * @throws net.sf.saxon.trans.XPathException * if a dynamic error occurs during the evaluation of the expression */ public Sequence<? extends AtomicValue> call(XPathContext context, Sequence[] arguments) throws XPathException { Sequence<?> arg = arguments[0]; if (arg instanceof Item) { return ((Item)arg).atomize(); } else { SequenceIterator<? extends AtomicValue> a = Atomizer.getAtomizingIterator(arg.iterate(), false); return SequenceTool.toLazySequence(a); } } }
protected static void checkGroupingValues(Sequence[] groupingValues) throws XPathException { for (int i = 0; i < groupingValues.length; i++) { Sequence<?> v = groupingValues[i]; if (!(v instanceof EmptySequence || v instanceof AtomicValue)) { v = Atomizer.getAtomizingIterator(v.iterate(), false).materialize(); if (SequenceTool.getLength(v) > 1) { throw new XPathException("Grouping key value cannot be a sequence of more than one item", "XPTY0004"); } groupingValues[i] = v; } } }
/** * Iterate over the sequence of values */ /*@NotNull*/ public SequenceIterator<?> iterate(XPathContext context) throws XPathException { try { SequenceIterator base = getBaseExpression().iterate(context); return getAtomizingIterator(base, untyped && operandItemType instanceof NodeTest); } catch (XPathException e) { if (roleDiagnostic == null) { throw e; } else { String message = e.getMessage() + ". Failed while atomizing the " + roleDiagnostic.getMessage(); XPathException e2 = new XPathException(message, e.getErrorCodeLocalPart(), e.getLocator()); e2.setXPathContext(context); e2.maybeSetLocation(getLocation()); throw e2; } } }
iter0 = Atomizer.getAtomizingIterator(iter0); iter1 = Atomizer.getAtomizingIterator(iter1);
iter0 = Atomizer.getAtomizingIterator(iter0); iter1 = Atomizer.getAtomizingIterator(iter1);
iter = Atomizer.getAtomizingIterator(iter);
iter = Atomizer.getAtomizingIterator(iter);
iter0 = Atomizer.getAtomizingIterator(iter0, false); iter1 = Atomizer.getAtomizingIterator(iter1, false);
iterator = Atomizer.getAtomizingIterator(iterator); suppliedItemType = suppliedItemType.getAtomizedItemType();
iterator = Atomizer.getAtomizingIterator(iterator, false); } catch (XPathException e) { ValidationFailure vf = new ValidationFailure(