Examples of itemAt()


Examples of client.net.sf.saxon.ce.value.Value.itemAt()

        SequenceIterator forwards = operand.iterate(context);
        if ((forwards.getProperties() & SequenceIterator.GROUNDED) != 0) {
            ValueRepresentation repr = ((GroundedIterator)forwards).materialize();
            Value val = Value.asValue(repr);
            int length = val.getLength();
            return val.itemAt(length - 1);
        } else {
            Item current = null;
            while (true) {
                Item item = forwards.next();
                if (item == null) {
View Full Code Here

Examples of com.marklogic.xcc.ResultSequence.itemAt()

  public void testRelToAbs9() throws Exception {
    XdmValue[] params = new XdmValue[] {
        ValueFactory.newXSString(absURL),
        ValueFactory.newXSString("http://www.google.com")};
    ResultSequence rs = executeLibraryModule(modulePath, moduleNamespace, "rel-to-abs", params);
    String s = (String)rs.itemAt(0).asString();
    assertEquals(s, "http://www.google.com");         
  }
 
  public void testRelToAbs10() throws Exception {
    XdmValue[] params = new XdmValue[] {
View Full Code Here

Examples of net.sf.saxon.om.GroundedValue.itemAt()

            SequenceIterator base = argument[0].iterate(context);
            if (intindex == 1) {
                return base.next();
            } else if (base instanceof GroundedIterator) {
                GroundedValue value = ((GroundedIterator)base).materialize();
                return value.itemAt(intindex-1);
            } else {
                SequenceIterator tail = TailIterator.make(base, intindex);
                return tail.next();
            }
        } else {
View Full Code Here

Examples of net.sf.saxon.s9api.XdmValue.itemAt()

            if (runtime.getAllowGeneralExpressions()) {
                XdmValue xdmvalue = parameters.get(param).getValue();
                XdmAtomicValue atom = null;
                if (xdmvalue.size() == 1) {
                    XdmItem item = xdmvalue.itemAt(0);
                    if (item.isAtomicValue()) {
                        atom = (XdmAtomicValue) item;
                    }
                }
View Full Code Here

Examples of net.sf.saxon.value.Value.itemAt()

                if (found > 1) {
                     typeError(
                        "A sequence of more than one item is not allowed as the " +
                        role.getMessage(), role.getErrorCode(), context);
                }
                result = value.itemAt(0);
            }
        }
        if (found == 0 && !allowEmpty) {
            typeError("An empty sequence is not allowed as the " +
                             role.getMessage(), role.getErrorCode(), null);
View Full Code Here

Examples of net.sf.saxon.value.Value.itemAt()

                if (found > 1) {
                     typeError(
                        "A sequence of more than one item is not allowed as the " +
                        role.getMessage(), role.getErrorCode(), context);
                }
                result = value.itemAt(0);
            }
        }
        if (found == 0 && !allowEmpty) {
            typeError("An empty sequence is not allowed as the " +
                             role.getMessage(), role.getErrorCode(), null);
View Full Code Here

Examples of net.sf.saxon.value.Value.itemAt()

                count += length;
                if (count > 1) {
                    return false;
                }
                if (length != 0) {
                    AtomicValue av = (AtomicValue)atomizedValue.itemAt(0);
                    if (!isCastable(av, targetType, context)) {
                        return false;
                    }
                }
            } else {
View Full Code Here

Examples of org.exist.dom.NewArrayNodeSet.itemAt()

                            if (!v.hasFractionalPart() && !v.isZero()) {
                                final int pos = (reverseAxis ?
                                    temp.getItemCount() - v.getInt() : v.getInt() - 1);
                                // Other positions are ignored
                                if (pos >= 0 && pos < temp.getItemCount()) {
                                    final NodeProxy t = (NodeProxy) temp.itemAt(pos);
                                    // for the current context: filter out those
                                    // context items not selected by the positional predicate
                                    ContextItem ctx = t.getContext();
                                    t.clearContext(Expression.IGNORE_CONTEXT);
                                    while (ctx != null) {
View Full Code Here

Examples of org.exist.xquery.value.Sequence.itemAt()

        filterParams[0] = new StringValue(name);
        filterParams[1] = new StringValue(dataType);
        filterParams[2] = filterParam;
        Sequence entryFilterFunctionResult = entryFilterFunction.evalFunction(contextSequence, null, filterParams);

        if(BooleanValue.FALSE == entryFilterFunctionResult.itemAt(0))
        {
            return Sequence.EMPTY_SEQUENCE;
        }
        else
        {
View Full Code Here

Examples of org.exist.xquery.value.Sequence.itemAt()

            final Sequence nameSeq = qnameExpr.eval(contextSequence, contextItem);
            if(!nameSeq.hasOne())
              {throw new XPathException(this, "The name expression should evaluate to a single value");}

            final Item qnItem = nameSeq.itemAt(0);
            QName qn;
            if (qnItem.getType() == Type.QNAME)
                {qn = ((QNameValue) qnItem).getQName();}
            else
              try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.