Differences between revisions 4 and 5
Revision 4 as of 2005-02-19 19:34:16
Size: 5504
Editor: zux221-192-124
Comment: Some notes on the directory layout
Revision 5 as of 2005-02-19 19:40:02
Size: 5621
Editor: zux221-192-124
Comment: Additional info on parts coming from Batik
Deletions are marked like this. Additions are marked like this.
Line 61: Line 61:
 * ParsedURL (could be used by FOP, too. Benefits: RFC2397 data: URLs, automatic gzip decompression (SVGZ))
 * image codecs
 * ParsedURL (org.apache.batik.util, could be used by FOP, too. Benefits: RFC2397 data: URLs, automatic gzip decompression (SVGZ))
 * image codecs (org.apache.batik.ext.awt.image.codec)
 * Base64 encoder and decoder (org.apache.batik.util)

XML Graphics common components

The problem

The FOP codebase contains two Batik transcoders for PDF and PostScript which can be used independently of FOP and are distributed with Batik. The Batik team should be empowered to help maintain these transcoders, for example, after changes in Batik itself. Since Batik and FOP are both implementing an XML standard that creates graphical output there is some overlap between the two efforts. Last but not least, a Batik release didn't involve a FOP release until now which is something that must change.

The idea

The idea now is to create a common area where the parts of common interest between the two subprojects are jointly developed and maintained.


  • Clear dependencies
  • More structured codebase
  • Easier for newbies to contribute to certain parts (They are afraid now of the big blob of code)
  • New (and now easily visible) use cases for certain components (examples: JPS services to allow Java applications to print to PDF and PS through Printables, PDF lib can be used independetly of FOP, etc.)
  • Faciliating collaboration with "competing" projects like FOray and Defoe, i.e. work together on undisputed parts of an XSL-FO processor.

The plan

(Subject of discussion. Input welcome.)

Common repository

For the joint operations we need a common repository. Since we are supposed to move to Subversion sooner or later we may just as well go for Subversion for the common repository, especially now that we've already got an SVN repo for the XML Graphics site.


  • Everybody comfortable with going for SVN for this?
  • We could consider moving both Batik and FOP to SVN rather sooner than later which would have the added benefit of preserving history on any file moves (all files would be in the same repository, only in different directories).

Parts affected in FOP


  • PDF transcoder (org.apache.fop.svg)
  • PostScript transcoder (org.apache.fop.render.ps)


  • PDF library (org.apache.fop.pdf, by PDF transcoder)
  • PS generation code (org.apache.fop.ps, by PS transcoder)
  • font support (org.apache.fop.fonts, by PDF lib, PDF and PS transcoders)
  • IO helpers (org.apache.fop.util, by PDF and PS transcoders) [1]
  • Image adapters (org.apache.fop.image, by PDF and PS transcoders)
  • Basic FOP exceptions (org.apache.fop.apps)

[1] Some of these classes could be candidates to go into Jakarta Commons IO.

External dependencies:

  • Avalon Framework
  • Jakarta Commons Logging
  • Jakarta Commons IO

Parts affected in Batik

The transcoders depend on several packages inside Batik. Obviously, we can't create a clean hierarchy without dependencies on Batik, at least for the PDF and PS transcoders. But we should do that for the parts where this is possible (PDF lib, fonts, images etc.).

Possible components coming from Batik:

  • ParsedURL (org.apache.batik.util, could be used by FOP, too. Benefits: RFC2397 data: URLs, automatic gzip decompression (SVGZ))
  • image codecs (org.apache.batik.ext.awt.image.codec)
  • Base64 encoder and decoder (org.apache.batik.util)
  • ...

Organization and naming

The common area may need to be logically divided into two parts:

  1. The common components with no dependencies to either FOP or Batik.
  2. The PDF and PS Transcoders (with a dependency on Batik)

Naming the individual parts (just an idea)

(axgc = Apache XML Graphics Commons)

  • axgc-pdf (PDF library)
  • axgc-ps (PostScript generation and manipulation/post-processing code)

  • axgc-fonts (Font library)
  • axgc-codecs (Image codecs)
  • axgc-image-adapter (Image library adapters and analyzers)
  • axgc-utils (IO classes, Exception classes, ParsedURL)
  • batik-transcoders (PDF, PS and future transcoders)

Possible layout in SVN

Proposal 1:

  +-- commons
        +-- branches
        +-- tags
        +-- trunk
             +-- axgc-codecs
             +-- axgc-fonts
             +-- axgc-image-adapters
             +-- axgc-pdf
             +-- axgc-ps
             +-- axgc-utils
  +-- (batik)
        +-- branches
        +-- tags
        +-- trunk
  +-- batik-transcoders
        +-- branches
        +-- tags
        +-- trunk
  +-- (fop)
        +-- branches
        +-- tags
        +-- trunk
  +-- site


  • this layout has the effect that we have four major products (batik, batik-transcoders, fop and axgc), where axgc may have additional (sub-)products for each individual components (if necessary).
  • batik and batik-transcoders will always be released (tagged) at the same time but they have different committer sets.
  • axgc builds each component individually (axgc-pdf.jar, axgc-util.jar etc.), as well as a collective (axgc.jar). If the individual components are released or only the collective remains TBD.
  • All releases are always coordinated on the project level (i.e. on level Apache XML Graphics).

work items

  • Complete and discuss this plan and vote on it.
  • (Optional/Idea) Move Batik and FOP to Subversion.
  • Clean up dependencies.
  • Create basic exception classes so the dependency on org.apache.fop.apps disappears.
  • Create common repository.
  • Move affected parts (see above) over to their new location.
  • Create build system for all components. (TBD: one for all or one for each?)
  • Documentation for the new parts.

XmlGraphicsCommonComponents (last edited 2012-03-09 10:06:42 by spc3-bagu2-0-0-cust872)