gmazza 2004/09/17 14:27:36 Modified: src/java/org/apache/fop/fo FOTreeBuilder.java Removed: src/java/org/apache/fop/fo Unknown.java Log: Removed Unknown.java; for mappings in which it is desired to process invalid nodes, such as "svg:retc" or "svg:rekt" for svg:rect, the DEFAULT mapping option is already provided within an ElementMapping. Removing Unknown gives the ElementMapping implementor the option of halting FOP processing and returning an error for such cases instead. Revision Changes Path 1.52 +7 -7 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.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- FOTreeBuilder.java 13 Sep 2004 03:46:04 -0000 1.51 +++ FOTreeBuilder.java 17 Sep 2004 21:27:36 -0000 1.52 @@ -301,12 +301,13 @@ } /** - * Finds the Maker used to create FO objects of a particular type + * Finds the Maker used to create node objects of a particular type * @param namespaceURI URI for the namespace of the element * @param localName name of the Element * @return the ElementMapping.Maker that can create an FO object for this element + * @throws SAXParseException if a Maker could not be found for a bound namespace. */ - private Maker findFOMaker(String namespaceURI, String localName) { + private Maker findFOMaker(String namespaceURI, String localName) throws SAXParseException { Map table = (Map)fobjTable.get(namespaceURI); Maker fobjMaker = null; if (table != null) { @@ -318,13 +319,12 @@ } if (fobjMaker == null) { - if (log.isWarnEnabled()) { - log.warn("Unknown formatting object " + namespaceURI + "^" + localName); - } if (namespaces.contains(namespaceURI.intern())) { - // fall back - fobjMaker = new Unknown.Maker(); + throw new SAXParseException (FONode.errorText(locator) + + "No element mapping definition found for " + + FONode.getNodeString(namespaceURI, localName), locator); } else { + log.warn("Unknown formatting object " + namespaceURI + "^" + localName); fobjMaker = new UnknownXMLObj.Maker(namespaceURI); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]