gmazza 2004/07/26 22:12:42 Modified: src/java/org/apache/fop/fo FONode.java FOTreeBuilder.java src/java/org/apache/fop/fo/extensions Bookmarks.java src/java/org/apache/fop/fo/flow BasicLink.java Block.java Footnote.java FootnoteBody.java Inline.java ListBlock.java ListItem.java ListItemLabel.java PageNumber.java Table.java TableBody.java TableCell.java TableColumn.java TableRow.java src/java/org/apache/fop/fo/pagination ColorProfile.java ConditionalPageMasterReference.java Declarations.java Flow.java LayoutMasterSet.java PageSequence.java PageSequenceMaster.java Region.java RegionBA.java RegionBASE.java RepeatablePageMasterAlternatives.java RepeatablePageMasterReference.java Root.java SinglePageMasterReference.java StaticContent.java Title.java Log: Switch from IllegalArgumentException to SAXParseException for errors found in the input FO. Revision Changes Path 1.32 +21 -19 xml-fop/src/java/org/apache/fop/fo/FONode.java Index: FONode.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FONode.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- FONode.java 27 Jul 2004 03:38:11 -0000 1.31 +++ FONode.java 27 Jul 2004 05:12:39 -0000 1.32 @@ -26,6 +26,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -134,9 +135,10 @@ * called within FObj constructor * @param namespaceURI namespace of incoming node * @param localName (e.g. "table" for "fo:table") - * @throws IllegalArgumentException if incoming node not valid for parent + * @throws SAXParseException if incoming node not valid for parent */ - protected void validateChildNode(Locator loc, String namespaceURI, String localName) {} + protected void validateChildNode(Locator loc, String namespaceURI, String localName) + throws SAXParseException {} /** * Adds characters (does nothing here) @@ -160,7 +162,7 @@ /** * */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { // do nothing by default } @@ -242,10 +244,10 @@ * @param loc org.xml.sax.Locator object of the error (*not* parent node) * @param offendingNode incoming node that would cause a duplication. */ - protected void tooManyNodesError(Locator loc, String offendingNode) { - throw new IllegalArgumentException( - errorText(loc) + getName() + ", only one " - + offendingNode + " may be declared."); + protected void tooManyNodesError(Locator loc, String offendingNode) + throws SAXParseException { + throw new SAXParseException (errorText(loc) + getName() + ", only one " + + offendingNode + " may be declared.", loc); } /** @@ -256,10 +258,9 @@ * @param tooEarlyNode string name of node that should be later in document */ protected void nodesOutOfOrderError(Locator loc, String tooLateNode, - String tooEarlyNode) { - throw new IllegalArgumentException( - errorText(loc) + "For " + getName() + ", " + tooLateNode - + " must be declared before " + tooEarlyNode + "."); + String tooEarlyNode) throws SAXParseException { + throw new SAXParseException (errorText(loc) + "For " + getName() + ", " + tooLateNode + + " must be declared before " + tooEarlyNode + ".", loc); } /** @@ -269,10 +270,10 @@ * @param nsURI namespace URI of incoming invalid node * @param lName local name (i.e., no prefix) of incoming node */ - protected void invalidChildError(Locator loc, String nsURI, String lName) { - throw new IllegalArgumentException( - errorText(loc) + getNodeString(nsURI, lName) + - " is not a valid child element of " + getName() + "."); + protected void invalidChildError(Locator loc, String nsURI, String lName) + throws SAXParseException { + throw new SAXParseException (errorText(loc) + getNodeString(nsURI, lName) + + " is not a valid child element of " + getName() + ".", loc); } /** @@ -281,10 +282,11 @@ * @param contentModel The XSL Content Model for the fo: object. * or a similar description indicating child elements needed. */ - protected void missingChildElementError(String contentModel) { - throw new IllegalArgumentException( - errorText(line, column) + getName() + " is missing child elements. \n" + - "Required Content Model: " + contentModel); + protected void missingChildElementError(String contentModel) + throws SAXParseException { + throw new SAXParseException(errorText(line, column) + getName() + + " is missing child elements. \nRequired Content Model: " + + contentModel, null, null, line, column); } /** 1.44 +5 -5 xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java Index: FOTreeBuilder.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOTreeBuilder.java,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- FOTreeBuilder.java 27 Jul 2004 03:38:11 -0000 1.43 +++ FOTreeBuilder.java 27 Jul 2004 05:12:39 -0000 1.44 @@ -255,8 +255,8 @@ } else { // check that incoming node is valid for currentFObj try { currentFObj.validateChildNode(locator, namespaceURI, localName); - } catch (IllegalArgumentException e) { - throw new SAXException(e); + } catch (SAXParseException e) { + throw e; } } @@ -287,11 +287,11 @@ * @see org.xml.sax.ContentHandler#endElement(String, String, String) */ public void endElement(String uri, String localName, String rawName) - throws SAXException { + throws SAXParseException { try { currentFObj.endOfNode(); - } catch (IllegalArgumentException e) { - throw new SAXException(e); + } catch (SAXParseException e) { + throw e; } currentFObj = currentFObj.getParent(); 1.9 +5 -2 xml-fop/src/java/org/apache/fop/fo/extensions/Bookmarks.java Index: Bookmarks.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/extensions/Bookmarks.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Bookmarks.java 27 Jul 2004 03:38:11 -0000 1.8 +++ Bookmarks.java 27 Jul 2004 05:12:40 -0000 1.9 @@ -21,6 +21,9 @@ // Java import java.util.ArrayList; +// XML +import org.xml.sax.SAXParseException; + // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; @@ -57,7 +60,7 @@ * the bookmark data from the child elements and add * the extension to the area tree. */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { ((Root) parent).setBookmarks(this); } 1.17 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java Index: BasicLink.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/BasicLink.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- BasicLink.java 27 Jul 2004 03:38:11 -0000 1.16 +++ BasicLink.java 27 Jul 2004 05:12:40 -0000 1.17 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -140,7 +141,7 @@ /** * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endLink(); } 1.24 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/Block.java Index: Block.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Block.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- Block.java 27 Jul 2004 03:38:11 -0000 1.23 +++ Block.java 27 Jul 2004 05:12:40 -0000 1.24 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -237,7 +238,7 @@ /** * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { handleWhiteSpace(); getFOInputHandler().endBlock(this); } 1.15 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/Footnote.java Index: Footnote.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Footnote.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Footnote.java 27 Jul 2004 03:38:11 -0000 1.14 +++ Footnote.java 27 Jul 2004 05:12:40 -0000 1.15 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -78,7 +79,7 @@ fotv.serveFootnote(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endFootnote(this); } 1.13 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/FootnoteBody.java Index: FootnoteBody.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/FootnoteBody.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- FootnoteBody.java 27 Jul 2004 03:38:11 -0000 1.12 +++ FootnoteBody.java 27 Jul 2004 05:12:40 -0000 1.13 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -60,7 +61,7 @@ fotv.serveFootnoteBody(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endFootnoteBody(this); } 1.17 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/Inline.java Index: Inline.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Inline.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- Inline.java 27 Jul 2004 03:38:11 -0000 1.16 +++ Inline.java 27 Jul 2004 05:12:40 -0000 1.17 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -138,7 +139,7 @@ /** * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endInline(this); } 1.16 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/ListBlock.java Index: ListBlock.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListBlock.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ListBlock.java 27 Jul 2004 03:38:11 -0000 1.15 +++ ListBlock.java 27 Jul 2004 05:12:40 -0000 1.16 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -136,7 +137,7 @@ fotv.serveListBlock(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endList(this); } 1.18 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/ListItem.java Index: ListItem.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListItem.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ListItem.java 27 Jul 2004 03:38:11 -0000 1.17 +++ ListItem.java 27 Jul 2004 05:12:40 -0000 1.18 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -145,7 +146,7 @@ fotv.serveListItem(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endListItem(this); } 1.19 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/ListItemLabel.java Index: ListItemLabel.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/ListItemLabel.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- ListItemLabel.java 27 Jul 2004 03:38:11 -0000 1.18 +++ ListItemLabel.java 27 Jul 2004 05:12:40 -0000 1.19 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -83,7 +84,7 @@ fotv.serveListItemLabel(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); getFOInputHandler().endListLabel(); } 1.26 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java Index: PageNumber.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/PageNumber.java,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- PageNumber.java 27 Jul 2004 03:38:12 -0000 1.25 +++ PageNumber.java 27 Jul 2004 05:12:40 -0000 1.26 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -128,7 +129,7 @@ fotv.servePageNumber(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endPageNumber(this); } 1.21 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/Table.java Index: Table.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/Table.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Table.java 27 Jul 2004 03:38:12 -0000 1.20 +++ Table.java 27 Jul 2004 05:12:40 -0000 1.21 @@ -23,6 +23,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -201,7 +202,7 @@ fotv.serveTable(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endTable(this); } 1.17 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableBody.java Index: TableBody.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableBody.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- TableBody.java 27 Jul 2004 03:38:12 -0000 1.16 +++ TableBody.java 27 Jul 2004 05:12:40 -0000 1.17 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -104,7 +105,7 @@ fotv.serveTableBody(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endBody(this); } 1.19 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java Index: TableCell.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableCell.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- TableCell.java 27 Jul 2004 03:38:12 -0000 1.18 +++ TableCell.java 27 Jul 2004 05:12:40 -0000 1.19 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -348,7 +349,7 @@ fotv.serveTableCell(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endCell(this); } 1.21 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java Index: TableColumn.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableColumn.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- TableColumn.java 27 Jul 2004 03:38:12 -0000 1.20 +++ TableColumn.java 27 Jul 2004 05:12:40 -0000 1.21 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -123,7 +124,7 @@ fotv.serveTableColumn(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endColumn(this); } 1.21 +2 -1 xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java Index: TableRow.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- TableRow.java 27 Jul 2004 03:38:12 -0000 1.20 +++ TableRow.java 27 Jul 2004 05:12:40 -0000 1.21 @@ -20,6 +20,7 @@ // XML import org.xml.sax.Attributes; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -144,7 +145,7 @@ fotv.serveTableRow(this); } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { getFOInputHandler().endRow(this); } 1.12 +5 -4 xml-fop/src/java/org/apache/fop/fo/pagination/ColorProfile.java Index: ColorProfile.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/ColorProfile.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ColorProfile.java 27 Jul 2004 03:38:13 -0000 1.11 +++ ColorProfile.java 27 Jul 2004 05:12:41 -0000 1.12 @@ -27,7 +27,7 @@ // XML import org.xml.sax.Locator; -import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.datatypes.ColorType; @@ -56,7 +56,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) XSL 1.0/FOP: EMPTY (no child nodes permitted) */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { invalidChildError(loc, nsURI, localName); } @@ -65,7 +66,7 @@ * Extract instance variables from the collection of properties for this * object. */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { src = this.propertyList.get(PR_SRC).getString(); profileName = this.propertyList.get(PR_COLOR_PROFILE_NAME).getString(); intent = this.propertyList.get(PR_RENDERING_INTENT).getEnum(); 1.12 +3 -1 xml-fop/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java Index: ConditionalPageMasterReference.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- ConditionalPageMasterReference.java 22 Jun 2004 00:44:46 -0000 1.11 +++ ConditionalPageMasterReference.java 27 Jul 2004 05:12:41 -0000 1.12 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -57,7 +58,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: empty */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { invalidChildError(loc, nsURI, localName); } 1.13 +5 -3 xml-fop/src/java/org/apache/fop/fo/pagination/Declarations.java Index: Declarations.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Declarations.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Declarations.java 27 Jul 2004 03:38:13 -0000 1.12 +++ Declarations.java 27 Jul 2004 05:12:41 -0000 1.13 @@ -26,6 +26,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FOElementMapping; @@ -60,7 +61,8 @@ XSL 1.0: (color-profile)+ (and non-XSL NS nodes) FOP/XSL 1.1: (color-profile)* (and non-XSL NS nodes) */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI) { if (!localName.equals("color-profile")) { invalidChildError(loc, nsURI, localName); @@ -72,7 +74,7 @@ * At the end of this element sort out the child into * a hashmap of color profiles and a list of external xml. */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (childNodes != null) { for (Iterator iter = childNodes.iterator(); iter.hasNext();) { FONode node = (FONode)iter.next(); 1.19 +5 -3 xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java Index: Flow.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Flow.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- Flow.java 27 Jul 2004 03:38:13 -0000 1.18 +++ Flow.java 27 Jul 2004 05:12:41 -0000 1.19 @@ -24,6 +24,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -73,7 +74,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: marker* (%block;)+ */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI && localName.equals("marker")) { if (blockItemFound) { nodesOutOfOrderError(loc, "fo:marker", "(%block;)"); @@ -90,7 +92,7 @@ * StructureRenderer that we are at the end of the flow. * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (!blockItemFound) { missingChildElementError("marker* (%block;)+"); } 1.16 +4 -2 xml-fop/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java Index: LayoutMasterSet.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/LayoutMasterSet.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- LayoutMasterSet.java 27 Jul 2004 03:38:13 -0000 1.15 +++ LayoutMasterSet.java 27 Jul 2004 05:12:41 -0000 1.16 @@ -25,6 +25,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -58,7 +59,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) XSL/FOP: (simple-page-master|page-sequence-master)+ */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI) { if (!localName.equals("simple-page-master") && !localName.equals("page-sequence-master")) { @@ -72,7 +74,7 @@ /** * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (childNodes == null) { missingChildElementError("(simple-page-master|page-sequence-master)+"); } 1.30 +4 -2 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java Index: PageSequence.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequence.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- PageSequence.java 27 Jul 2004 03:38:13 -0000 1.29 +++ PageSequence.java 27 Jul 2004 05:12:41 -0000 1.30 @@ -24,6 +24,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -136,7 +137,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) XSL/FOP Content Model: (title?,static-content*,flow) */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI) { if (localName.equals("title")) { if (titleFO != null) { @@ -167,7 +169,7 @@ * This passes the end page sequence to the structure handler * so it can act upon that. */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (mainFlow == null) { missingChildElementError("(title?,static-content*,flow)"); } 1.13 +4 -2 xml-fop/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java Index: PageSequenceMaster.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/PageSequenceMaster.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- PageSequenceMaster.java 27 Jul 2004 03:38:13 -0000 1.12 +++ PageSequenceMaster.java 27 Jul 2004 05:12:41 -0000 1.13 @@ -24,6 +24,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.Constants; @@ -67,7 +68,8 @@ * XSL/FOP: (single-page-master-reference|repeatable-page-master-reference| * repeatable-page-master-alternatives)+ */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI) { if (!localName.equals("single-page-master-reference") && !localName.equals("repeatable-page-master-reference") @@ -79,7 +81,7 @@ } } - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (childNodes == null) { missingChildElementError("(single-page-master-reference|" + "repeatable-page-master-reference|repeatable-page-master-alternatives)+"); 1.21 +5 -2 xml-fop/src/java/org/apache/fop/fo/pagination/Region.java Index: Region.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Region.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Region.java 25 Jun 2004 23:35:00 -0000 1.20 +++ Region.java 27 Jul 2004 05:12:41 -0000 1.21 @@ -23,7 +23,9 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; +// FOP import org.apache.fop.apps.FOPException; import org.apache.fop.datatypes.FODimension; import org.apache.fop.fo.FONode; @@ -68,8 +70,9 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: empty */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { - invalidChildError(loc, nsURI, localName); + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { + invalidChildError(loc, nsURI, localName); } /** 1.11 +4 -1 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBA.java Index: RegionBA.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBA.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RegionBA.java 27 Jul 2004 03:38:13 -0000 1.10 +++ RegionBA.java 27 Jul 2004 05:12:41 -0000 1.11 @@ -21,6 +21,9 @@ // Java import java.awt.Rectangle; +// XML +import org.xml.sax.SAXParseException; + // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FOTreeVisitor; @@ -50,7 +53,7 @@ /** * @see org.apache.fop.fo.FONode#endOfNode() */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { super.endOfNode(); bPrecedence = (this.propertyList.get(PR_PRECEDENCE).getEnum() == Precedence.TRUE); 1.10 +2 -1 xml-fop/src/java/org/apache/fop/fo/pagination/RegionBASE.java Index: RegionBASE.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RegionBASE.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- RegionBASE.java 27 Jul 2004 03:38:13 -0000 1.9 +++ RegionBASE.java 27 Jul 2004 05:12:41 -0000 1.10 @@ -20,6 +20,7 @@ // XML import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -43,7 +44,7 @@ /** * @see org.apache.fop.fo.FONode#endOfNode() */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { // The problem with this is that it might not be known yet.... // Supposing extent is calculated in terms of percentage this.extent = this.propertyList.get(PR_EXTENT).getLength().getValue(); 1.11 +4 -2 xml-fop/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java Index: RepeatablePageMasterAlternatives.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterAlternatives.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- RepeatablePageMasterAlternatives.java 27 Jul 2004 03:38:13 -0000 1.10 +++ RepeatablePageMasterAlternatives.java 27 Jul 2004 05:12:41 -0000 1.11 @@ -24,6 +24,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FOElementMapping; @@ -63,7 +64,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) XSL/FOP: (conditional-page-master-reference+) */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (!(nsURI == FOElementMapping.URI && localName.equals("conditional-page-master-reference"))) { invalidChildError(loc, nsURI, localName); @@ -73,7 +75,7 @@ /** * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (childNodes == null) { missingChildElementError("(conditional-page-master-reference+)"); } 1.9 +3 -1 xml-fop/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java Index: RepeatablePageMasterReference.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/RepeatablePageMasterReference.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- RepeatablePageMasterReference.java 20 Jun 2004 05:15:40 -0000 1.8 +++ RepeatablePageMasterReference.java 27 Jul 2004 05:12:41 -0000 1.9 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -53,7 +54,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: empty */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { invalidChildError(loc, nsURI, localName); } 1.18 +6 -2 xml-fop/src/java/org/apache/fop/fo/pagination/Root.java Index: Root.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Root.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- Root.java 16 Jun 2004 23:40:58 -0000 1.17 +++ Root.java 27 Jul 2004 05:12:41 -0000 1.18 @@ -21,6 +21,10 @@ // java import java.util.List; +// XML +import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; + // FOP import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; @@ -29,7 +33,6 @@ import org.apache.fop.fo.extensions.Bookmarks; import org.apache.fop.fo.FOInputHandler; import org.apache.fop.fo.FOTreeVisitor; -import org.xml.sax.Locator; /** * The fo:root formatting object. Contains page masters, page-sequences. @@ -70,7 +73,8 @@ XSL 1.0 Spec: (layout-master-set,declarations?,page-sequence+) FOP: (layout-master-set, declarations?, fox:bookmarks?, page-sequence+) */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (nsURI == FOElementMapping.URI) { if (localName.equals("layout-master-set")) { if (layoutMasterSet != null) { 1.7 +3 -1 xml-fop/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java Index: SinglePageMasterReference.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/SinglePageMasterReference.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- SinglePageMasterReference.java 19 Jun 2004 13:35:33 -0000 1.6 +++ SinglePageMasterReference.java 27 Jul 2004 05:12:41 -0000 1.7 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.fo.FONode; @@ -51,7 +52,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: empty */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { invalidChildError(loc, nsURI, localName); } 1.14 +5 -3 xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java Index: StaticContent.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/StaticContent.java,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- StaticContent.java 27 Jul 2004 03:38:13 -0000 1.13 +++ StaticContent.java 27 Jul 2004 05:12:41 -0000 1.14 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.apps.FOPException; @@ -48,7 +49,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) * XSL/FOP Content Model: (%block;)+ */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (!isBlockItem(nsURI, localName)) { invalidChildError(loc, nsURI, localName); } @@ -59,7 +61,7 @@ * StructureRenderer that we are at the end of the flow. * @see org.apache.fop.fo.FONode#end */ - protected void endOfNode() { + protected void endOfNode() throws SAXParseException { if (childNodes == null) { missingChildElementError("(%block;)+"); } 1.21 +4 -2 xml-fop/src/java/org/apache/fop/fo/pagination/Title.java Index: Title.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/pagination/Title.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- Title.java 7 Jul 2004 01:51:50 -0000 1.20 +++ Title.java 27 Jul 2004 05:12:41 -0000 1.21 @@ -21,6 +21,7 @@ // XML import org.xml.sax.Attributes; import org.xml.sax.Locator; +import org.xml.sax.SAXParseException; // FOP import org.apache.fop.datatypes.ColorType; @@ -54,7 +55,8 @@ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String) XSL/FOP: (#PCDATA|%inline;)* */ - protected void validateChildNode(Locator loc, String nsURI, String localName) { + protected void validateChildNode(Locator loc, String nsURI, String localName) + throws SAXParseException { if (!isInlineItem(nsURI, localName)) { invalidChildError(loc, nsURI, localName); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]