Examples of axisIterator()


Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

        if (instream != null) {
            try {
                SAXSource source = new SAXSource(new InputSource(instream));
                DocumentBuilder builder = runtime.getProcessor().newDocumentBuilder();
                XdmNode doc = builder.build(source);
                XdmSequenceIterator iter = doc.axisIterator(Axis.DESCENDANT, new QName("error"));
                while (iter.hasNext()) {
                    XdmNode error = (XdmNode) iter.next();
                    if (code.getLocalName().equals(error.getAttributeValue(_code))) {
                        return error.getStringValue();
                    }
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

            }
        }

        while (report.moreDocuments()) {
            XdmNode doc = report.read();
            XdmSequenceIterator iter = doc.axisIterator(Axis.DESCENDANT, c_error);
            if (iter.hasNext()) {
                while (iter.hasNext()) {
                    runtime.warning(this, doc, iter.next().getStringValue());
                }
            } else {
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

                    port = root.getAttributeValue(_port);
                    // FIXME: support exclude-inline-prefixes
                    boolean seenelem = false;
                    XdmDestination dest = new XdmDestination();
                    Vector<XdmValue> nodes = new Vector<XdmValue> ();
                    XdmSequenceIterator iter = root.axisIterator(Axis.CHILD);
                    while (iter.hasNext()) {
                        XdmNode child = (XdmNode) iter.next();
                        if (child.getNodeKind() == XdmNodeKind.ELEMENT) {
                            if (seenelem) {
                                throw new IllegalArgumentException("Not a well-formed inline document");
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

        transformer.transform();

        XdmNode xformed = result.getXdmNode();
        System.err.println("Document base: " + xformed.getBaseURI());

        XdmSequenceIterator nodes = xformed.axisIterator(Axis.CHILD);
        XdmNode docNode = (XdmNode) nodes.next();

        nodes = docNode.axisIterator(Axis.CHILD);
        XdmNode paraNode = (XdmNode) nodes.next();
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

        System.err.println("Document base: " + xformed.getBaseURI());

        XdmSequenceIterator nodes = xformed.axisIterator(Axis.CHILD);
        XdmNode docNode = (XdmNode) nodes.next();

        nodes = docNode.axisIterator(Axis.CHILD);
        XdmNode paraNode = (XdmNode) nodes.next();

        System.err.println("doc base: " + docNode.getBaseURI());
        System.err.println("para base: " + paraNode.getBaseURI());
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

                    if (element == null) {
                        throw XProcException.dynamicError(9);
                    }

                    XdmSequenceIterator nsIter = element.axisIterator(Axis.NAMESPACE);
                    while (nsIter.hasNext()) {
                        XdmNode ns = (XdmNode) nsIter.next();
                        QName prefix = ns.getNodeName();
                        localBindings.put(prefix == null ? "" : prefix.getLocalName(),ns.getStringValue());
                    }
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

        // namespaces from the first node in the selected node-set (or, if it's not an element, its parent) are used.
        if (results.size() > 0 && results.get(0) instanceof XdmNode) {
            XdmNode node = (XdmNode) results.get(0);
            nsBindings.clear();

            XdmSequenceIterator nsIter = node.axisIterator(Axis.NAMESPACE);
            while (nsIter.hasNext()) {
                XdmNode ns = (XdmNode) nsIter.next();
                nsBindings.put((ns.getNodeName()==null ? "" : ns.getNodeName().getLocalName()),ns.getStringValue());
            }
        }
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

    private String errorMessage(QName code) {
        InputStream instream = getClass().getResourceAsStream("/etc/error-list.xml");
        if (instream != null) {
            XdmNode doc = runtime.parse(new InputSource(instream));
            XdmSequenceIterator iter = doc.axisIterator(Axis.DESCENDANT, new QName(XProcConstants.NS_XPROC_ERROR,"error"));
            while (iter.hasNext()) {
                XdmNode error = (XdmNode) iter.next();
                if (code.getLocalName().equals(error.getAttributeValue(_code))) {
                    return error.getStringValue();
                }
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

            session.setDebug(runtime.getDebug());

            MimeMessage msg = new MimeMessage(session);

            // Now parse the message...
            XdmSequenceIterator iter = email.axisIterator(Axis.CHILD);
            while (iter.hasNext()) {
                XdmNode field = (XdmNode) iter.next();
                if (!field.getNodeKind().equals(XdmNodeKind.ELEMENT)) {
                    continue;
                }
View Full Code Here

Examples of net.sf.saxon.s9api.XdmNode.axisIterator()

        if (!c_request.equals(start.getNodeName())) {
            throw XProcException.stepError(40);
        }

        // Check for valid attributes
        XdmSequenceIterator iter = start.axisIterator(Axis.ATTRIBUTE);
        boolean ok = true;
        while (iter.hasNext()) {
            XdmNode attr = (XdmNode) iter.next();
            QName name = attr.getNodeName();
            if (_method.equals(name) || _href.equals(name) || _detailed.equals(name)
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.