xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Xmlgraphics-fop Wiki] Update of "AreaTreeIntermediateXml/NewDesign" by JeremiasMaerki
Date Tue, 12 Aug 2008 14:52:38 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Xmlgraphics-fop Wiki" for change notification.

The following page has been changed by JeremiasMaerki:

The comment on the change is:
A note about extensions

   * Currently, the IF is implemented over our area tree which contains a generic structure
for traits. Maps present a certain amount over overhead by themselves which this approach
avoids. Furthermore, the !AreaTreeParser has to inspect various trait sets per area tree object
which causes too many Map operations.
   * The conversion from !ContentHandler to IFPainter only requires one lookup (see !AttributesImpl.getValue())
per parameter. The number of parameters is very small. Some parameters are complex Strings
which need to be parsed themselves (for example startBox()'s transform parameter). The overhead
here should be relatively low since these are not extremely frequent operations. setFont()'s
parameters could be changed from String to an enumeration class which would cause a Map lookup,
but again setFont() is not a very frequent operation and not every parameter will be set and
therefore parsed on every call.
+ == Extensions ==
+ The new intermediate format will need to make extensive use of extensions, mostly output
format specific extensions like media selection for PCL or PostScript, or overlay functionality
in AFP. The extensions will be produced in a namespace outside the normal intermediate format
namespace. Features that are only implemented/supported by a small subset of output formats,
ex. bookmarks, shall be implemented as an extension in order to avoid cluttering the intermediate
format itself for minimal cases.
+ === Example: Bookmarks Extension ===
+ {{{
+     [..]
+     </page>
+   </page-sequence>
+   <bookmark-tree xmlns="http://xmlgraphics.apache.org/fop/intermediate/bookmarks">
+     <bookmark starting-state="show" title="Chapter 1">
+       <goto-xy page-index="0" x="20000" y="20000"/>
+     </bookmark>
+     <bookmark starting-state="hide" title="Chapter 2">
+       <goto-xy page-index="1" x="20000" y="20000"/>
+       <bookmark starting-state="show" title="Section 1">
+         <goto-xy page-index="1" x="20000" y="51680"/>
+       </bookmark>
+       <bookmark starting-state="show" title="Section 2">
+         <goto-xy page-index="1" x="20000" y="80480"/>
+       </bookmark>
+     </bookmark>
+   </bookmark-tree>
+ </document>
+ }}} 
  == Resource Management (Idea) ==
  Some formats like PostScript and AFP require special processing to optimize resources (images,
fonts etc.). The PostScript renderer currently supports an optional two-pass approach where
the resources are only added in the second pass to the beginning of the PostScript file, i.e.
after you know which resources are needed. The idea now is to enrich the IF renderer with
a mechanism to track track used resources so a second pass can be avoided when producing the
final output format. After all, the IF renderer already processes the full document and knows
which resources are necessary.

To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org

View raw message