Package com.xmlcalabash.core

Examples of com.xmlcalabash.core.XProcException


            Iterator<XdmItem> iter = xqeval.iterator();
            while (iter.hasNext()) {
                XdmItem item = iter.next();
                if (item.isAtomicValue()) {
                    throw new XProcException(step.getNode(), "Not expecting atomic values back from XQuery!");
                }
                XdmNode node = (XdmNode) item;

                if (node.getNodeKind() != XdmNodeKind.DOCUMENT) {
                    // Make a document for this node...is this the right thing to do?
View Full Code Here


                SequenceIterator<?> results = xexpr.iterate(xdc);
                // FIXME: What if the expression returns a sequence?
                item = results.next();
            } catch (XPathException xe) {
                throw new XProcException(xe);
            }

            //
            //  Good luck!
            //
View Full Code Here

                }
            }
        }

        if (exception instanceof XProcException) {
            XProcException err = (XProcException) exception;
            loc = err.getLocator();
            if (err.getErrorCode() != null) {
                QName n = err.getErrorCode();
                qCode = new StructuredQName(n.getPrefix(),n.getNamespaceURI(),n.getLocalName());
            }
            if (err.getStep() != null) {
                message = message + err.getStep() + ":";
            }
        }

        if (loc != null) {
            if (loc.getSystemId() != null && !"".equals(loc.getSystemId())) {
View Full Code Here

            }
        }

        for (String port : allPorts) {
            if (!ports.contains(port)) {
                throw new XProcException("There is a binding for the port '" + port + "' but the pipeline declares no such port.");
            }

            pipeline.clearInputs(port);

            if (userArgsInputPorts.contains(port)) {
View Full Code Here

            // It can't be called so it doesn't really matter...
            return;
        }

        if (declaredSteps.contains(type)) {
            throw new XProcException(step.getNode(), "You aren't allowed to do this");
        }

        steps.add(step);
        declaredSteps.put(type, step);
    }
View Full Code Here

        treeWriter.endDocument();

        step.reportError(treeWriter.getResult());

        if (doc == null) {
            throw new XProcException(errorCode);
        } else {
            throw new XProcException(errorCode, doc, doc.getStringValue());
        }
    }
View Full Code Here

    public void run() throws SaxonApiException {
        super.run();

        String uris = getOption(_uri, (String) null);
        if (uris == null) {
            throw new XProcException("URI is required");
        }

        baseURI = getOption(_uri).getBaseURI().resolve(uris);

        XdmNode doc = source.read();
View Full Code Here

                break;
            case PROCESSING_INSTRUCTION:
                tree.addSubtree(node);
                break;
            default:
                throw new XProcException("Unexpected node kind!?");
        }
    }
View Full Code Here

            Vector<XdmNode> nodes = xptr.selectNodes(runtime, doc);

            if (nodes.size() == 1) {
                doc = nodes.get(0);
            } else if (nodes.size() != 0) {
                throw new XProcException(node, "XPointer matches more than one node!?");
            }
        }
        return doc;
    }
View Full Code Here

            throw new NullPointerException();
        }

        String line = getLine();
        if (!separator.equals(line)) {
            throw new XProcException("MIME multipart doesn't start with separator?");
        }
    }
View Full Code Here

TOP

Related Classes of com.xmlcalabash.core.XProcException

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.