Package net.sf.saxon.expr

Examples of net.sf.saxon.expr.StringLiteral


        }
        table = makeAttributeValueTemplate(dbTab);

        String dbWhere = getAttributeValue("", "where");
        if (dbWhere == null) {
            where = new StringLiteral(StringValue.EMPTY_STRING);
        } else {
            where = makeAttributeValueTemplate(dbWhere);
        }

        String connectAtt = getAttributeValue("", "connection");
View Full Code Here


        }
        table = SQLConnect.quoteSqlName(table);

        String dbWhere = getAttributeList().getValue("", "where");
        if (dbWhere == null) {
            where = new StringLiteral(StringValue.EMPTY_STRING);
        } else {
            where = makeAttributeValueTemplate(dbWhere);
        }

View Full Code Here

        if (useCharacterMapsAtt != null) {
            String s = XSLOutput.prepareCharacterMaps(this, useCharacterMapsAtt, new Properties());
            serializationAttributes.put(
                    getNamePool().allocate("", "", StandardNames.USE_CHARACTER_MAPS),
                    new StringLiteral(s));
        }
    }
View Full Code Here

        }

        if (select == null) {
            if (countChildren == 0) {
                // there are no child nodes and no select attribute
                select = new StringLiteral(StringValue.EMPTY_STRING);
            } else if (countChildren == 1) {
                // there is exactly one child node
                if (firstChild.getNodeKind() == Type.TEXT) {
                    // it is a text node: optimize for this case
                    select = new StringLiteral(firstChild.getStringValueCS());
                }
            }
        }
    }
View Full Code Here

        return "XTSE0910";
    }

    public Expression compile(Executable exec) throws XPathException {
        NamespaceConstructor inst = new NamespaceConstructor(name);
        compileContent(exec, inst, new StringLiteral(StringValue.SINGLE_SPACE));
        return inst;
    }
View Full Code Here

                if (namespaceAtt == null) {
                    invalidAttributeName("Invalid attribute name: " + Err.wrap(nameAtt));
                } else {
                    // ignore the prefix "xmlns"
                    nameAtt = nameAtt.substring(6);
                    attributeName = new StringLiteral(nameAtt);
                }
            }
        }


        if (namespaceAtt!=null) {
            namespace = makeAttributeValueTemplate(namespaceAtt);
            if (namespace instanceof StringLiteral) {
                if (!AnyURIValue.isValidURI(((StringLiteral)namespace).getStringValue())) {
                    compileError("The value of the namespace attribute must be a valid URI", "XTDE0865");
                }
            }
        }

        if (selectAtt!=null) {
            select = makeExpression(selectAtt);
        }

        if (separatorAtt == null) {
            if (selectAtt == null) {
                separator = new StringLiteral(StringValue.EMPTY_STRING);
            } else {
                separator = new StringLiteral(StringValue.SINGLE_SPACE);
            }
        } else {
            separator = makeAttributeValueTemplate(separatorAtt);
        }
View Full Code Here

//            err.setLocator(this);
//            attributeName = new ErrorExpression(err);
//        } else {
            compileError(message, "XTDE0850");
            // prevent a duplicate error message...
            attributeName = new StringLiteral("saxon-error-attribute");
//        }
    }
View Full Code Here

                if (!getConfiguration().getNameChecker().isQName(((StringLiteral)elementName).getStringValue())) {
                    compileError("Element name " +
                            Err.wrap(((StringLiteral)elementName).getStringValue(), Err.ELEMENT) +
                            " is not a valid QName", "XTDE0820");
                    // to prevent duplicate error messages:
                    elementName = new StringLiteral("saxon-error-element");
                }
            }
        }

        if (namespaceAtt != null) {
View Full Code Here

     * @param visitor an expression visitor
     */

    public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {
        final XPathContext context = visitor.getStaticContext().makeEarlyEvaluationContext();
        return new StringLiteral(
            unicodeToString(argument[0].iterate(context), context));
    }
View Full Code Here

     * @param visitor an expression visitor
     */

    public Expression preEvaluate(ExpressionVisitor visitor) throws XPathException {
        if (propertyName != null && NamespaceConstant.XSLT.equals(propertyName.getNamespaceURI())) {
            return new StringLiteral(
                    getProperty(NamespaceConstant.XSLT, propertyName.getLocalName(), visitor.getConfiguration()));
        } else {
           return this;
        }
    }
View Full Code Here

TOP

Related Classes of net.sf.saxon.expr.StringLiteral

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.