Package client.net.sf.saxon.ce.expr.sort

Examples of client.net.sf.saxon.ce.expr.sort.AtomicComparer


     * @return the AtomicComparer already allocated if one has been allocated at compile time; otherwise
     * allocate one from knowledge of the collation at run-time
     */

    public AtomicComparer makeAtomicComparer(XPathContext context) throws XPathException {
        AtomicComparer comp = atomicComparer;
        if (comp == null) {
            int type = argument[0].getItemType(context.getConfiguration().getTypeHierarchy()).getPrimitiveType();
            comp = makeAtomicSortComparer(type, context);
        } else {
            comp = comp.provideContext(context);
        }
        return comp;
    }
View Full Code Here


    /**
    * Evaluate the function to return an iteration of selected values or nodes.
    */

    public SequenceIterator iterate(XPathContext context) throws XPathException {
        AtomicComparer comp = makeAtomicComparer(context);
        SequenceIterator iter = argument[0].iterate(context);
        return new DistinctIterator(iter, comp);
    }
View Full Code Here

    /**
    * Evaluate the function
    */

    public Item evaluateItem(XPathContext context) throws XPathException {
        AtomicComparer comparer = getAtomicComparer(context);
        SequenceIterator iter = argument[0].iterate(context);
        try {
            return minimax(iter, operation, comparer, ignoreNaN, context);
        } catch (XPathException err) {
            err.maybeSetLocation(getSourceLocator());
View Full Code Here

        StringCollator collator = getCollator(1, context);
        BuiltInAtomicType type = argumentType;
        if (type == BuiltInAtomicType.UNTYPED_ATOMIC) {
            type = BuiltInAtomicType.DOUBLE;
        }
        AtomicComparer comparer =
                GenericAtomicComparer.makeAtomicComparer(type, type, collator, context);
        return comparer;
    }
View Full Code Here

TOP

Related Classes of client.net.sf.saxon.ce.expr.sort.AtomicComparer

Copyright © 2018 www.massapicom. 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.