Package com.volantis.xml.pipeline.sax

Examples of com.volantis.xml.pipeline.sax.XMLPipelineException


        SAXParseException x = getException(context);
        ExpressionFactory factory = context.getFactory();
        Value result = Sequence.EMPTY;

        if (x instanceof XMLPipelineException) {
            XMLPipelineException pipelineException = (XMLPipelineException) x;
            String codeURI = pipelineException.getErrorCodeURI();
            if (codeURI != null) {
                result = factory.createStringValue(codeURI);
            }
        }
       
View Full Code Here


                }
                catch (Exception e) {
                    // something went wrong when evaluating the xpath.
                    // Send an error down the pipeline
                    Locator locator = pipelineContext.getCurrentLocator();
                    XMLPipelineException se = new XMLPipelineException(
                            "Could not evaluate the expression " +
                            expressionStr,
                            locator,
                            e);
View Full Code Here

        transition(TemplateSchema.VALUE_START);

        TValue value = containingBlock.query(ref);
        if (value == null) {
            SAXParseException exception = new XMLPipelineException(
                    "Referenced value " + ref + " does not exist",
                    getPipelineContext().getCurrentLocator());
            fatalError(exception);
            throw exception;
        }
View Full Code Here

        Element containing = getContainingElement();
        if (containing.allowsAnyContent()) {
            contentHandler.characters(ch, start, length);
        } else {
            if (!WhitespaceUtilities.isWhitespace(ch, start, length)) {
                fatalError(new XMLPipelineException("Significant character data not allowed inside " +
                        containing.getName() + " - " + state,
                        getPipelineContext().getCurrentLocator()));
            }
        }
    }
View Full Code Here

        Element containing = getContainingElement();
        if (containing.allowsAnyContent()) {
            contentHandler.endElement(namespaceURI, localName, qName);
        } else {
            fatalError(new XMLPipelineException("Non " +
                    usage + " markup not allowed inside " +
                    containing.getName() + " - " + state,
                    getPipelineContext().getCurrentLocator()));
        }
    }
View Full Code Here

        Element containing = getContainingElement();
        if (containing.allowsAnyContent()) {
            contentHandler.processingInstruction(target, data);
        } else {
            fatalError(new XMLPipelineException("Non " +
                    usage + " markup not allowed inside " +
                    containing.getName() + " - " + state,
                    getPipelineContext().getCurrentLocator()));
        }
    }
View Full Code Here

        Element containing = getContainingElement();
        if (containing.allowsAnyContent()) {
            contentHandler.startElement(namespaceURI, localName, qName, atts);
        } else {
            fatalError(new XMLPipelineException("Non " +
                    usage + " markup not allowed inside " +
                    containing.getName() + " - " + state,
                    getPipelineContext().getCurrentLocator()));
        }
    }
View Full Code Here

    }

    // Javadoc inherited
    public void startDocument() throws SAXException {
        if (inDocument) {
            fatalError(new XMLPipelineException(
                    "A nested startDocument event was recieved.", locator));
        }
        inDocument = true;

        try {
            if (locator != null) {
                XMLPipelineContext pipelineContext = getPipelineContext();
                // store the locator away in the XMLPipelineContext. The Locator
                // is useful when reporting errors
                pipelineContext.pushLocator(locator);
                pipelineContext.pushBaseURI(locator.getSystemId());
            } else if (!allowNullLocator) {
                warning(new XMLPipelineException("The document does not " +
                                                 "have an associated Locator.", null));
            }
        } catch (MalformedURLException e) {
            // report the fatal error down the pipeline
            fatalError(new XMLPipelineException(
                    "Locators systemId is invalid " +
                    locator.getSystemId(),
                    locator, e));
        }
    }
View Full Code Here

                        getIndex(NamespaceSupport.XMLNS, BASE_ATTRIBUTE);
                cloneAttrs.removeAttribute(index);
                attributes = cloneAttrs;
            }
        } catch (MalformedURLException e) {
            fatalError(new XMLPipelineException(
                    "base uri attribute is malformed",
                    pipelineContext.getCurrentLocator(),
                    e));
        }
        // forward this event to the next process
View Full Code Here

    }

    // Javadoc inherited
    public void endDocument() throws SAXException {
        if (!inDocument) {
            fatalError(new XMLPipelineException("An endDocument event " +
                                                "was recieved without a matching startDocument event.",
                                                locator));
        }
        inDocument = false;
View Full Code Here

TOP

Related Classes of com.volantis.xml.pipeline.sax.XMLPipelineException

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.