cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Identified problem with FOP 0.14
Date Fri, 18 Aug 2000 15:27:26 GMT
This a bug report.

The method

org.apache.fop.apps.Driver.buildFOTree(Document document)

is aware of SAX1, while FOTreeBuilder is based on SAX2.

The problem is 

		case Node.ELEMENT_NODE:
		    NamedNodeMap map = currentNode.getAttributes();
		    currentAtts.clear();
		    for (int i = map.getLength() - 1; i >= 0; i--) {
			Attr att = (Attr)map.item(i);
			currentAtts.addAttribute("",
                         att.getName(),
                         "",
                         "CDATA",
                         att.getValue());
		    }
		    this.treeBuilder.startElement(
			"", currentNode.getNodeName(), "", currentAtts);
                       ^^^^

where the namespace is _always_ set to default, leaving to NPE when the
namespace property list is queried by the FOTreeBuilder.

FOP needs a better DOM->SAX2 tree walker in order to function.

Cocoon1 could provide this adaptation inside the FOPFormatter class that
calls FOP, but FOP should provide this directly since it could influence
other users.

Cocoon2 provides some code that performs SAX1 to SAX2 adaptation (look
under the org.apache.cocoon.xml.util package in the xml-cocoon2 CVS
branch of the xml-cocoon CVS module)

I don't have time to fix this myself and I don't want this to stop the
Cocoon 1.8 release so we'll ship FOP 0.13 until this is fixed.

Hope this helps.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------


Mime
View raw message