Package net.sf.saxon.value

Examples of net.sf.saxon.value.UntypedAtomicValue


        int annotation = getTypeAnnotation();
        if ((annotation & NodeInfo.IS_DTD_TYPE) != 0) {
            annotation = StandardNames.XS_UNTYPED_ATOMIC;
        }
        if (annotation == -1 || annotation == StandardNames.XS_UNTYPED_ATOMIC || annotation == StandardNames.XS_UNTYPED) {
            return new UntypedAtomicValue(getStringValueCS());
        } else {
            SchemaType stype = getConfiguration().getSchemaType(annotation);
            if (stype == null) {
                String typeName = getNamePool().getDisplayName(annotation);
                throw new XPathException("Unknown type annotation " +
View Full Code Here


        if ((typeCode & NodeInfo.IS_DTD_TYPE) != 0) {
            typeCode = StandardNames.XS_UNTYPED_ATOMIC;
        }
        // optimization: avoid creating the Node object if not needed
        if (typeCode == StandardNames.XS_UNTYPED_ATOMIC) {
            return new UntypedAtomicValue(tree.attValue[currentNodeNr]);
        } else if (typeCode == StandardNames.XS_STRING) {
            return new StringValue(tree.attValue[currentNodeNr]);
        } else {
            return ((NodeInfo)current()).atomize();
        }
View Full Code Here

            } else if (argname.startsWith("+")) {
                // parameters starting with "+" are taken as input documents
                Object sources = loadDocuments(argvalue, useURLs, config, true);
                t.setParameter(argname.substring(1), sources);
            } else {
                t.setParameter(argname, new UntypedAtomicValue(argvalue));
            }
        }
    }
View Full Code Here

        switch (getNodeKind()) {
            case Type.COMMENT:
            case Type.PROCESSING_INSTRUCTION:
                return new StringValue(getStringValueCS());
            default:
                return new UntypedAtomicValue(getStringValueCS());
        }
    }
View Full Code Here

        } catch (ArrayIndexOutOfBoundsException err) {
            throw new NullPointerException();
        }
        switch (kind) {
            case Type.TEXT: {
                return new UntypedAtomicValue(TinyTextImpl.getStringValue(tree, nextNodeNr));
            }
            case Type.WHITESPACE_TEXT: {
                return new UntypedAtomicValue(WhitespaceTextImpl.getStringValue(tree, nextNodeNr));
            }
            case Type.ELEMENT: {
                int type = tree.getTypeAnnotation(nextNodeNr);
                switch (type) {
                    case StandardNames.XS_UNTYPED:
View Full Code Here

        switch (getNodeKind()) {
            case Type.COMMENT:
            case Type.PROCESSING_INSTRUCTION:
                return new StringValue(getStringValueCS());
            default:
                return new UntypedAtomicValue(getStringValueCS());
        }
    }
View Full Code Here

     * @param node the node whose typed value is required
     * @return an iterator returning a single untyped atomic value, equivalent to the string value of the node.
     */

    public SequenceIterator getTypedValue(NodeInfo node) {
        return SingletonIterator.makeIterator(new UntypedAtomicValue(node.getStringValueCS()));
    }
View Full Code Here

     * @return the typed value.
     * @since 8.5
     */

    public Value atomize(NodeInfo node) {
        return new UntypedAtomicValue(node.getStringValueCS());
    }
View Full Code Here

     * @return an iterator over the atomic sequence comprising the typed value. The objects
     *         returned by this SequenceIterator will all be of type {@link net.sf.saxon.value.AtomicValue}
     */

    public SequenceIterator getTypedValue(CharSequence value, NamespaceResolver resolver, NameChecker nameChecker) {
        return SingletonIterator.makeIterator(new UntypedAtomicValue(value));
    }
View Full Code Here

     */

    public Expression getStringValueExpression(StaticContext env) {
        if (textOnly) {
            if (constantText != null) {
                return new StringLiteral(new UntypedAtomicValue(constantText));
            } else if (content instanceof ValueOf) {
                return ((ValueOf)content).convertToStringJoin(env);
            } else {
                StringJoin fn = (StringJoin)SystemFunction.makeSystemFunction(
                        "string-join", new Expression[]{content, new StringLiteral(StringValue.EMPTY_STRING)});
View Full Code Here

TOP

Related Classes of net.sf.saxon.value.UntypedAtomicValue

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.