Package org.apache.fop.fo

Examples of org.apache.fop.fo.ValidationException


     * @see org.apache.fop.fo.FONode#startOfNode()
     */
    protected void startOfNode() throws FOPException {
        if (parent.getNameId() != Constants.FO_DECLARATIONS
                && parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
          throw new ValidationException(getName()
          + " must be a child of fo:declarations or fo:simple-page-master.");           
        }
    }
View Full Code Here


    }

    /** {@inheritDoc} */
    void endTablePart() throws ValidationException {
        if (rows.size() > 0) {
            throw new ValidationException(
                    "A table-cell is spanning more rows than available in its parent element.");
        }
        setFlagForCols(GridUnit.LAST_IN_PART, lastRow);
        borderResolver.endPart();
    }
View Full Code Here

    /** {@inheritDoc} */
    protected void startOfNode() throws FOPException {
        super.startOfNode();
        if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
            throw new ValidationException(getName() + " must be a child of fo:simple-page-master.");
        }
    }
View Full Code Here

        int rowSpan = cell.getNumberRowsSpanned();

        Table t = getTable();
        if (t.hasExplicitColumns()) {
            if (colNumber + colSpan - 1 > t.getNumberOfColumns()) {
                throw new ValidationException(FONode.errorText(locator) + "column-number or "
                        + "number of cells in the row overflows the number of fo:table-column "
                        + "specified for the table.");
            }
        } else {
            t.ensureColumnNumber(colNumber + colSpan - 1);
View Full Code Here

        //if (!AFPElementMapping.NAMESPACE.equals(parent.getNamespaceURI())
        //    || !AFPElementMapping.PAGE.equals(parent.getLocalName())) {
        //    throw new ValidationException(getName() + " must be a child of afp:page.");
        //}
        if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
            throw new ValidationException(getName() + " must be a child of fo:simple-page-master.");
        }
    }
View Full Code Here

    /** {@inheritDoc} */
    public Throwable createException(Event event) {
        Locator loc = (Locator)event.getParam("loc");
        String msg = EventFormatter.format(event, Locale.ENGLISH);
        ValidationException ex = new ValidationException(msg, loc);
        if (!Locale.ENGLISH.equals(Locale.getDefault())) {
            ex.setLocalizedMessage(EventFormatter.format(event));
        }
        return ex;
    }
View Full Code Here

    /** @see org.apache.fop.fo.FONode#startOfNode() */
    protected void startOfNode() throws FOPException {
        super.startOfNode();
        if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
            throw new ValidationException(getName() + " must be a child of fo:simple-page-master.");
        }
    }
View Full Code Here

        //if (!AFPElementMapping.NAMESPACE.equals(parent.getNamespaceURI())
        //    || !AFPElementMapping.PAGE.equals(parent.getLocalName())) {
        //    throw new ValidationException(getName() + " must be a child of afp:page.");
        //}
        if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
            throw new ValidationException(getName() + " must be a child of fo:simple-page-master.");
        }
    }
View Full Code Here

   
    /** @see org.apache.fop.fo.FONode#startOfNode() */
    protected void startOfNode() throws FOPException {
        super.startOfNode();
        if (parent.getNameId() != Constants.FO_DECLARATIONS) {
            throw new ValidationException(getName() + " must be a child of fo:declarations.");
        }
    }
View Full Code Here

    /** @see org.apache.fop.fo.FONode#startOfNode() */
    protected void startOfNode() throws FOPException {
        super.startOfNode();
        if (parent.getNameId() != Constants.FO_SIMPLE_PAGE_MASTER) {
            throw new ValidationException(getName() + " must be a child of fo:simple-page-master.");
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.ValidationException

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.