Package org.pdf4j.saxon.functions

Examples of org.pdf4j.saxon.functions.StringFn


                return new Literal(new UntypedAtomicValue(((StringLiteral)select).getValue().getStringValueCS()));
            } catch (XPathException err) {
                throw new AssertionError(err);
            }
        } else {
            StringFn fn = (StringFn) SystemFunction.makeSystemFunction("string", new Expression[]{select});
            return new CastExpression(fn, BuiltInAtomicType.UNTYPED_ATOMIC, false);
        }
    }
View Full Code Here


    private void registerIdrefKey(Configuration config) {
        PatternFinder idref = IdrefTest.getInstance();
        //Expression eval = new Atomizer(new ContextItemExpression(), config);

        StringFn sf = (StringFn)SystemFunction.makeSystemFunction(
                "string", new Expression[]{new ContextItemExpression()});
        StringLiteral regex = new StringLiteral("\\s+");
        Tokenize use = (Tokenize)SystemFunction.makeSystemFunction("tokenize", new Expression[]{sf, regex});
        KeyDefinition key = new KeyDefinition(idref, use, null, null);
        key.setIndexedItemType(BuiltInAtomicType.STRING);
View Full Code Here

                cardOK = Cardinality.subsumes(reqCard, suppliedCard);
            }
            if (!itemTypeOK) {
                // rule 2
                if (reqItemType.equals(BuiltInAtomicType.STRING)) {
                    StringFn fn = (StringFn) SystemFunction.makeSystemFunction("string", new Expression[]{exp});
                    try {
                        exp = visitor.typeCheck(visitor.simplify(fn), AnyItemType.getInstance());
                    } catch (XPathException err) {
                        err.maybeSetLocation(exp);
                        throw err.makeStatic();
View Full Code Here

TOP

Related Classes of org.pdf4j.saxon.functions.StringFn

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.