Package net.sf.saxon.om

Examples of net.sf.saxon.om.StructuredQName


     * @param code The local part of the name of the error code
     */

    public void maybeSetErrorCode(String code) {
        if (errorCode == null && code != null) {
            errorCode = new StructuredQName("err", NamespaceConstant.ERR, code);
        }
    }
View Full Code Here


        if (parent instanceof GeneralComparison && ((GeneralComparison)parent).getOperator() == Token.EQUALS) {
            indexed = true;
        }

        LetExpression let = new LetExpression();
        let.setVariableQName(new StructuredQName("zz", NamespaceConstant.SAXON, "zz" + let.hashCode()));
        SequenceType type = SequenceType.makeSequenceType(child.getItemType(th), child.getCardinality());
        let.setRequiredType(type);
        ExpressionTool.copyLocationInfo(containingExpression, let);
        let.setSequence(LazyExpression.makeLazyExpression(child));
        let.setAction(containingExpression);
View Full Code Here

     */

    public Expression makeSaxonFunction(String localName, StaticContext env, Expression[] arguments)
    throws XPathException {
        String uri = NamespaceConstant.SAXON;
        StructuredQName functionName = new StructuredQName("saxon", uri, localName);
        return bind(functionName, arguments, env);
    }
View Full Code Here

        }
        Class functionClass = entry.implementationClass;
        try {
            SystemFunction f = (SystemFunction)functionClass.newInstance();
            f.setDetails(entry);
            f.setFunctionName(new StructuredQName("", NamespaceConstant.FN, name));
            f.setArguments(arguments);
            return f;
        } catch (IllegalAccessException err) {
            return null;
        } catch (InstantiationException err) {
View Full Code Here

     * supplied does not conform to the required type that was specified when the variable was declared
     */

    public void setVariable(QName name, XdmValue value) throws SaxonApiException {
        XPathVariable var = null;
        StructuredQName qn = name.getStructuredQName();
        for (XPathVariable v : declaredVariables) {
            if (v.getVariableQName().equals(qn)) {
                var = v;
                break;
            }
View Full Code Here

     * Get the name of the function for display in messages
     * @return  the name of the function as a lexical QName
     */

    public final String getDisplayName() {
        StructuredQName fName = getFunctionName();
        return (fName == null ? "(anonymous)" : fName.getDisplayName());
    }
View Full Code Here

    public QName getDocumentElementTypeName() {
        if (documentElementType == null) {
            return null;
        } else {
            int fp = documentElementType.getFingerprint();
            return new QName(new StructuredQName(config.getNamePool(), fp));
        }
    }
View Full Code Here

                };
            }
            QName[] qnames = new QName[params.size()];
            int q=0;
            for (Iterator it=params.iterator(); it.hasNext();) {
                StructuredQName name = (StructuredQName)it.next();
                qnames[q++] = new QName(name.getNamespaceURI(), name.getLocalName(), name.getPrefix());
            }
            return qnames;
        }
    }
View Full Code Here

        return new SaxonXQSequenceType(staticType, connection.getConfiguration());
    }

    public XQSequenceType getStaticVariableType(QName name) throws XQException {
        checkNotClosed();
        StructuredQName qn = new StructuredQName(
                name.getPrefix(), name.getNamespaceURI(), name.getLocalPart());
        HashMap vars = expression.getExecutable().getCompiledGlobalVariables();
        GlobalVariable var = (vars == null ? null : (GlobalVariable)vars.get(qn));
        if (var == null) {
            throw new XQException("Variable " + name + " is not declared");
View Full Code Here

                    return s;
                }
            }
            switch (construct) {
                case Location.LITERAL_RESULT_ELEMENT: {
                    StructuredQName qName = info.getObjectName(pool);
                    String name = "element constructor";
                    if (context != null) {
                        name += " <" + qName.getDisplayName() + '>';
                    }
                    return name;
                }
                case Location.LITERAL_RESULT_ATTRIBUTE: {
                    StructuredQName qName = info.getObjectName(pool);
                    String name = "attribute constructor";
                    if (context != null) {
                        name += ' ' + qName.getDisplayName() + "=\"{...}\"";
                    }
                    return name;
                }
                case StandardNames.XSL_FUNCTION: {
                    StructuredQName qName = info.getObjectName(pool);
                    String name = "function";
                    if (context != null) {
                        name += ' ' + qName.getDisplayName() + "()";
                    }
                    return name;
                }
                case StandardNames.XSL_TEMPLATE: {
                    StructuredQName qName = info.getObjectName(pool);
                    String name = "template";
                    if (context != null && qName != null) {
                        name += " name=\"" + qName.getDisplayName() + '\"';
                    }
                    return name;
                }
                default:
                    return "";
View Full Code Here

TOP

Related Classes of net.sf.saxon.om.StructuredQName

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.