Examples of AxisNodes


Examples of com.xmlcalabash.util.AxisNodes

                throw new XProcException(e);
            }
        }

        private void scan(XdmNode pipeline) throws SaxonApiException {
            for (XdmNode node : new AxisNodes(runtime, pipeline,Axis.CHILD, AxisNodes.PIPELINE)) {
                if (t_title.equals(node.getNodeName())) {
                    title = node;
                    continue;
                }
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

            String href = input.getAttributeValue(_href);
            if (href != null) {
                add(input, port, href);
            } else {
                for (XdmNode node : new AxisNodes(input, Axis.CHILD, AxisNodes.ALL)) {
                    if (node.getNodeKind() != XdmNodeKind.ELEMENT) {
                        continue;
                    }

                    if (t_document.equals(node.getNodeName())) {
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

            if (href != null) {
                add(input, null, baseURI.resolve(href).toASCIIString());
            } else {
                XdmNode docroot = null;
                for (XdmNode node : new AxisNodes(runtime, input, Axis.CHILD, AxisNodes.PIPELINE)) {
                    if (node.getNodeKind() == XdmNodeKind.ELEMENT) {
                        docroot = node;
                    }
                }
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

                } else {
                    parameters.put(name, value);
                }
            }

            for (XdmNode node : new AxisNodes(runtime, input, Axis.CHILD, AxisNodes.PIPELINE)) {
                throw new IllegalArgumentException("Options and parameters must be empty.");
            }
        }
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

        public XdmNode pipeline = null;

        public XProcPipeline (XdmNode root) {
            pipeline = root;

            for (XdmNode node : new AxisNodes(runtime, root, Axis.CHILD, AxisNodes.PIPELINE)) {
                if (XProcConstants.p_input.equals(node.getNodeName())) {
                    inputPorts.add(node.getAttributeValue(_port));
                }
                if (XProcConstants.p_output.equals(node.getNodeName())) {
                    outputPorts.add(node.getAttributeValue(_port));
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

        Model model = dataset.getDefaultModel();
        String graphName = null;

        XdmNode root = S9apiUtils.getDocumentElement(doc);
        if (root.getNodeName().equals(sem_triples)) {
            for (XdmNode node : new AxisNodes(root, Axis.CHILD, AxisNodes.SIGNIFICANT)) {
                if (node.getNodeName().equals(cx_graph_name)) {
                    graphName = node.getStringValue();
                    model = dataset.getNamedModel(graphName);
                    // ModelFactory.createDefaultModel();
                } else if (node.getNodeName().equals(sem_triple)) {
                    XdmNode subj = null;
                    XdmNode pred = null;
                    XdmNode obj = null;

                    for (XdmNode child : new AxisNodes(node, Axis.CHILD)) {
                        if (child.getNodeName().equals(sem_subject)) {
                            subj = child;
                        } else if (child.getNodeName().equals(sem_predicate)) {
                            pred = child;
                        } else if (child.getNodeName().equals(sem_object)) {
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

                            XdmNode node = source.read();
                            XdmNode docelem = S9apiUtils.getDocumentElement(node);

                            if (XProcConstants.c_param_set.equals(docelem.getNodeName())) {
                                // Check the attributes...
                                for (XdmNode attr : new AxisNodes(docelem, Axis.ATTRIBUTE)) {
                                    QName aname = attr.getNodeName();
                                    if ("".equals(aname.getNamespaceURI())
                                        || XProcConstants.NS_XPROC.equals(aname.getNamespaceURI())) {
                                        throw XProcException.dynamicError(14, step.getNode(), "Attribute not allowed");
                                    }
                                }

                                for (XdmNode child : new AxisNodes(runtime, docelem, Axis.CHILD, AxisNodes.SIGNIFICANT)) {
                                    if (child.getNodeKind() == XdmNodeKind.ELEMENT) {
                                        if (!child.getNodeName().equals(XProcConstants.c_param)) {
                                            throw XProcException.dynamicError(18, step.getNode(), "Element not allowed: " + child.getNodeName());
                                        }
                                        parseParameterNode(xstep,child);
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

            throw XProcException.dynamicError(31);
        }

        p.setName(pname);

        for (XdmNode attr : new AxisNodes(pnode, Axis.ATTRIBUTE)) {
            QName aname = attr.getNodeName();
            if ("".equals(aname.getNamespaceURI())) {
                if (!aname.equals(_name) && !aname.equals(_namespace) && !aname.equals(_value)) {
                    throw XProcException.dynamicError(14);
                }
View Full Code Here

Examples of com.xmlcalabash.util.AxisNodes

            pname = new QName(ns,name);
        }

        p.setName(pname);

        for (XdmNode attr : new AxisNodes(pnode, Axis.ATTRIBUTE)) {
            QName aname = attr.getNodeName();
            if ("".equals(aname.getNamespaceURI())) {
                if (!aname.equals(_name) && !aname.equals(_namespace)) {
                    throw XProcException.dynamicError(14);
                }
            }
        }

        String stringValue = "";
        Vector<XdmItem> items = new Vector<XdmItem> ();
        for (XdmNode child : new AxisNodes(runtime, pnode, Axis.CHILD, AxisNodes.PIPELINE)) {
            if (child.getNodeKind() == XdmNodeKind.ELEMENT) {
               if (!child.getNodeName().equals(cx_item)) {
                    throw XProcException.dynamicError(18, step.getNode(), "Element not allowed: " + child.getNodeName());
                }
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.