Package net.sf.saxon.event

Examples of net.sf.saxon.event.Receiver.startElement()


            case START_DOCUMENT:
                out.startDocument(0);
                break;

            case START_ELEMENT:
                out.startElement(in.getNameCode(), in.getTypeAnnotation(), 0, 0);

                NamespaceDeclarations decl = in.getNamespaceDeclarations();
                for (int i=0; i<decl.getNumberOfNamespaces(); i++) {
                    out.namespace(decl.getNamespaceCode(i), 0);
                }
View Full Code Here


                Receiver out = context.getReceiver();
                String result = "";
                int icol = rs.getMetaData().getColumnCount();
                while (rs.next()) {                            // next row
                    //System.out.print("<- SQL : "+ rowStart);
                    out.startElement(rowCode, StandardNames.XS_UNTYPED, locationId, 0);
                    for (int col = 1; col <= icol; col++) {     // next column
                        // Read result from RS only once, because
                        // of JDBC-Specifications
                        result = rs.getString(col);
                        out.startElement(colCode, StandardNames.XS_UNTYPED, locationId, 0);
View Full Code Here

                    out.startElement(rowCode, StandardNames.XS_UNTYPED, locationId, 0);
                    for (int col = 1; col <= icol; col++) {     // next column
                        // Read result from RS only once, because
                        // of JDBC-Specifications
                        result = rs.getString(col);
                        out.startElement(colCode, StandardNames.XS_UNTYPED, locationId, 0);
                        if (result != null) {
                            out.characters(result, locationId, options);
                        }
                        out.endElement();
                    }
View Full Code Here

        int resultNamespace = pool.allocate("result", RESULT_NS, "namespace");
        int resultAtomicValue = pool.allocate("result", RESULT_NS, "atomic-value");
        int resultType = pool.allocate("", RESULT_NS, "type");


        tree.startElement(resultSequence, -1, 0, 0);
        tree.namespace(pool.allocateNamespaceCode("result", RESULT_NS), 0);
        tree.startContent();

        while (true) {
            Item next = iterator.next();
View Full Code Here

                break;
            }
            if (next instanceof NodeInfo) {
                switch (((NodeInfo)next).getNodeKind()) {
                    case Type.DOCUMENT:
                        tree.startElement(resultDocument, -1, 0, 0);
                        tree.startContent();
                        ((DocumentInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.ELEMENT:
View Full Code Here

                        tree.startContent();
                        ((DocumentInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.ELEMENT:
                        tree.startElement(resultElement, -1, 0, 0);
                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.ATTRIBUTE:
View Full Code Here

                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.ATTRIBUTE:
                        tree.startElement(resultAttribute, -1, 0, 0);
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.startContent();
                        tree.endElement();
                        break;
                    case Type.TEXT:
View Full Code Here

                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.startContent();
                        tree.endElement();
                        break;
                    case Type.TEXT:
                        tree.startElement(resultText, -1, 0, 0);
                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.COMMENT:
View Full Code Here

                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.COMMENT:
                        tree.startElement(resultComment, -1, 0, 0);
                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.PROCESSING_INSTRUCTION:
View Full Code Here

                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.PROCESSING_INSTRUCTION:
                        tree.startElement(resultPI, -1, 0, 0);
                        tree.startContent();
                        ((NodeInfo)next).copy(tree, NodeInfo.ALL_NAMESPACES, true, 0);
                        tree.endElement();
                        break;
                    case Type.NAMESPACE:
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.