Examples of StructuredQName


Examples of net.sf.saxon.om.StructuredQName

            return SequenceType.SINGLE_STRING;
        }

        @Override
        public StructuredQName getFunctionQName() {
            return new StructuredQName("efx", "http://test/saxon/ext", "simple");
        }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

        }
        // If we can't determine the primitive type at compile time, we generate a run-time typeswitch

        LetExpression let = new LetExpression();
        let.setRequiredType(SequenceType.OPTIONAL_ATOMIC);
        let.setVariableQName(new StructuredQName("nn", NamespaceConstant.SAXON, "nn" + let.hashCode()));
        let.setSequence(operand);

        LocalVariableReference var = new LocalVariableReference(let);
        Expression isDouble = new InstanceOfExpression(
                var, SequenceType.makeSequenceType(BuiltInAtomicType.DOUBLE, StaticProperty.ALLOWS_ZERO_OR_ONE));
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

     * @param localName The local part of the QName
     * @param type The type label, xs:QName or a subtype of xs:QName
     */

    public QNameValue(String prefix, String uri, String localName, AtomicType type) {
        qName = new StructuredQName(prefix, uri, localName);
        if (type == null) {
            type = BuiltInAtomicType.QNAME;
        }
        typeLabel = type;
    }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

     *          if a dynamic error occurs during evaluation of the function.
     */

    public Item evaluateItem(XPathContext context) throws XPathException {
        FunctionItem f = (FunctionItem)getArguments()[0].evaluateItem(context);
        StructuredQName name = f.getFunctionName();
        if (name == null) {
            return null;
        } else {
            return new QNameValue(name, BuiltInAtomicType.QNAME);
        }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

            if (argument[2] instanceof StringLiteral) {
                // common case, decimal format name is supplied as a string literal

                String lexicalName = ((StringLiteral)argument[2]).getStringValue();

                StructuredQName qName;
                try {
                    qName = StructuredQName.fromLexicalQName(lexicalName, false,
                        visitor.getConfiguration().getNameChecker(), env.getNamespaceResolver());
                } catch (XPathException e) {
                    XPathException se = new XPathException("Invalid decimal format name. " + e.getMessage());
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

            if (numArgs==2) {
                dfs = dfm.getDefaultDecimalFormat();
            } else {
                // the decimal-format name was given as a run-time expression
                String lexicalName = argument[2].evaluateItem(context).getStringValue();
                StructuredQName qName = null;
                try {
                    qName = StructuredQName.fromLexicalQName(lexicalName, false,
                        context.getConfiguration().getNameChecker(), nsContext);
                } catch (XPathException e) {
                    XPathException err = new XPathException("Invalid decimal format name. " + e.getMessage());
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

     * Get the qualified of the function being called
     * @return the qualified name
     */

    public final StructuredQName getFunctionName() {
        StructuredQName n = super.getFunctionName();
        if (n == null) {
            return function.getFunctionName();
        } else {
            return n;
        }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

    public SourceLocator getLocator() {
        return this;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = new StructuredQName("err", NamespaceConstant.ERR, errorCode);
    }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

            } catch (XPathException err) {
                compileError(err.getMessage(), err.getErrorCodeQName());
            }
        } else {
            try {
                StructuredQName formatName = makeQName(name);
                try {
                    dfm.setNamedDecimalFormat(formatName, d, getPrecedence());
                } catch (XPathException err) {
                    compileError(err.getMessage(), err.getErrorCodeQName());
                }
View Full Code Here

Examples of net.sf.saxon.om.StructuredQName

            UserFunctionCall ufc = (UserFunctionCall)unboundFunctionCalls.get(i);
            QueryModule importingModule = (QueryModule)correspondingStaticContext.get(i);
            correspondingStaticContext.set(i, null);    // for garbage collection purposes
            // The original UserFunctionCall is effectively a dummy: we weren't able to find a function
            // definition at the time. So we try again.
            final StructuredQName q = ufc.getFunctionName();
            final int arity = ufc.getNumberOfArguments();

            XQueryFunction fd = lib.getDeclaration(q, ufc.getArguments());
            if (fd != null) {
                fd.registerReference(ufc);
                ufc.setStaticType(fd.getResultType());
                ufc.setConfirmed(true);
                // Check that the result type and all the argument types are in the static context of the
                // calling module
                importingModule.checkImportedFunctionSignature(fd);
            } else {
                String msg = "Cannot find a matching " + arity +
                        "-argument function named " + q.getClarkName() + "()";
                if (!config.isAllowExternalFunctions()) {
                    msg += ". Note: external function calls have been disabled";
                }
                XPathException err = new XPathException(msg, ufc);
                err.setErrorCode("XPST0017");
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.