Apache FOP supports an extension mechanism to handle arbitrary XML namespaces in fo:instream-foreign-object. First of all, I'd upgrade to at least the latest release (0.91beta) or even FOP Trunk (the latest source code in the Subversion repository). There are several examples of extension implementations for instream-foreign-objects. Here's a list:
- SVG extension: in the package org.apache.fop.fo.extension.svg in src/java - MathML extension: in examples/mathml - Plan extension: in examples/plan - Barcode4J (barcode generator): http://barcode4j.krysalis.org The best and simplest example in your case is probably the plan extension. It defines an arbitrary XML dialect and converts it to SVG internally. After that, FOP will simply use Batik to render the SVG document to the target format. Barcode4J is a good example of an advanced extension which provides native rendering capabilities, for example directly using a Graphics2D interface. Note that you'll need FOP Trunk for the latter to work. The SVG approach works with 0.91beta or later. Key points for such an extension: - An ElementMapping descendant which tells FOP which namespace and elements are supported. - XMLObj descendants which represent the elements in the foreign namespace. - The JAR which will contain your extension will have to contain a file called "org.apache.fop.fo.ElementMapping" in the META-INF/services directory. Its contents is the fully qualified classname of the ElementMapping descendant. Good luck. On 09.03.2006 05:24:14 Debasish Jana wrote: > Hi: > > I was trying to use fop 0.90 alpha for PDF rendering from a XSL:FO document. > > But, I don't have any clue how to render fo:instream-foreign-object. > Suppose, I would like to render a chart using own chart drawing algorithm > and want to Hook up with the fop renderer as an extension to fo. > > Can you pass some pointer ro link with some code examples to do that? > > An early reply in this regard would be greatly appreciated. > > Warm regards, > Debasish Jana Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
