Examples of StringCollator


Examples of net.sf.saxon.sort.StringCollator

//            throw new XPathException("Key " + context.getNamePool().getDisplayName(keyNameFingerprint) +
//                          " has not been defined", "XTDE1260", context);
//        }
        KeyDefinition definition = (KeyDefinition)definitions.get(0);
               // the itemType and collation and BC mode will be the same for all keys with the same name
        StringCollator collation = definition.getCollation();
       
        if (keySet.isBackwardsCompatible()) {
            // if backwards compatibility is in force, treat all values as strings
            soughtValue = soughtValue.convert(BuiltInAtomicType.STRING, true, context).asAtomic();
        } else {
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

    /**
    * Evaluate the function
    */

    public Item evaluateItem(XPathContext context) throws XPathException {
        StringCollator collator = getCollator(1, context);
        //AtomicComparer comparer = getAtomicComparer(1, context);
        BuiltInAtomicType type = argumentType;
        if (type == BuiltInAtomicType.UNTYPED_ATOMIC) {
            type = BuiltInAtomicType.DOUBLE;
        }
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

    public final StringCollator getCollation(String name) throws XPathException {
        if (name.equals(NamespaceConstant.CODEPOINT_COLLATION_URI)) {
            return CodepointCollator.getInstance();
        }
        StringCollator collation = null;
        if (controller != null) {
            collation = controller.getExecutable().getNamedCollation(name);

            if (collation == null) {
                Configuration config = controller.getConfiguration();
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

    public StringCollator getNamedCollation(String name) {
        if (name.equals(NamespaceConstant.CODEPOINT_COLLATION_URI)) {
            return CodepointCollator.getInstance();
        }
        if (map != null) {
            StringCollator c = (StringCollator)map.get(name);
            if (c != null) {
                return c;
            }
        }
        return config.getCollationURIResolver().resolve(name, null, config);
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

            return visitor.typeCheck(visitor.simplify(vc), contextItemType);
        }

        StaticContext env = visitor.getStaticContext();
        final String defaultCollationName = env.getDefaultCollationName();
        StringCollator collation = env.getCollation(defaultCollationName);
        if (collation == null) {
            collation = CodepointCollator.getInstance();
        }
        comparer = GenericAtomicComparer.makeAtomicComparer(
                pt0, pt1, collation, visitor.getConfiguration().getConversionContext());
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

            ExpressionTool.copyLocationInfo(this, vc);
            return visitor.optimize(visitor.typeCheck(visitor.simplify(vc), contextItemType), contextItemType);
        }

        final String defaultCollationName = env.getDefaultCollationName();
        StringCollator comp = env.getCollation(defaultCollationName);
        if (comp == null) {
            comp = CodepointCollator.getInstance();
        }
        BuiltInAtomicType pt0 = (BuiltInAtomicType)t0.getPrimitiveItemType();
        BuiltInAtomicType pt1 = (BuiltInAtomicType)t1.getPrimitiveItemType();
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

                    err.setErrorCode("FOCH0002");
                    err.setIsStaticError(true);
                    err.setLocator(this);
                    throw err;
                }
                StringCollator comp = env.getCollation(collationName);
                if (comp == null) {
                    XPathException err = new XPathException("Unknown collation " + Err.wrap(collationName, Err.URI));
                    err.setErrorCode("FOCH0002");
                    err.setIsStaticError(true);
                    err.setLocator(this);
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

                    err.setLocator(this);
                    throw err;
                }
                return context.getCollation(collationName);
            } else {
                StringCollator collator = context.getDefaultCollation();
                return (collator == null ? CodepointCollator.getInstance() : collator);
            }
        }
    }
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

        operand0 = visitor.typeCheck(operand0, contextItemType);
        operand1 = visitor.typeCheck(operand1, contextItemType);

        StaticContext env = visitor.getStaticContext();
        StringCollator comp = env.getCollation(env.getDefaultCollationName());
        if (comp==null) {
            comp = CodepointCollator.getInstance();
        }

        XPathContext context = env.makeEarlyEvaluationContext();
View Full Code Here

Examples of net.sf.saxon.sort.StringCollator

        if (useDefaultCollation) {
            collationName = new StringLiteral(getDefaultCollationName());
        }

        StringCollator stringCollator = null;
        if (collationName instanceof StringLiteral) {
            String collationString = ((StringLiteral)collationName).getStringValue();
            try {
                URI collationURI = new URI(collationString);
                if (!collationURI.isAbsolute()) {
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.