xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r813018 [15/24] - in /websites/staging/xmlgraphics/trunk/content: ./ fop/ fop/0.95/ fop/0.95/images/ fop/1.0/ fop/1.0/images/ fop/dev/ fop/dev/design/ fop/dev/fo/ fop/dev/svg/ fop/fo/ fop/trunk/ fop/trunk/images/
Date Sun, 15 Apr 2012 05:39:54 GMT
Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/layout.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/layout.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/layout.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,309 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Layout</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Layout</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version><authors><person email="keiron@aftexsw.com" name="Keiron Liddle"></person></authors></p>
+<h1 id="into">Introduction</h1>
+<p>The role of the layout managers is to build the Area Tree by using the information from the FO Tree. The layout managers decide where information is placed in the area tree.</p>
+<p>A layout manager is typically associated with an FO Object but not always.</p>
+<p>The layout managers are in between the FO Tree and the Area Tree. They get information from the FO Tree and create areas and build the pages. They hold the state of the layout process as it builds up the areas and pages. They also manage the handling of breaks and spacing between areas.</p>
+<p>FO Objects can have two types of properties, ones that relate to the layout and ones that relate to the rendering. The layout related properties area used by the layout managers to determine how and where to create the areas. The render related properties should be passed through to the renderer in the most efficient way possible.</p>
+<p>The aim of the layout system is to be self contained and allow for easy changes or extensions for future development. For example the line breaking should be decided at a particular point in the process that makes it easier to handle other languages.</p>
+<p>The layout begins once the hierarchy of FO objects has been constructed. Note: it may be possible to start immediately after a block formatting object has been added to the flow but this is not currently in the scope of the layout. It is also possible to layout all pages in a page sequence after each page sequence has been added from the xml.</p>
+<p>The layout process is handled by a set of layout managers. The block level layout managers are used to create the block areas which are added to the region area of a page.</p>
+<p>The traversal is done by the layout or structure process only in the flow elements.</p>
+<h1 id="issues">Design Issues</h1>
+<h2 id="issue-simple-layout">Keep Layouts Simple</h2>
+<p>Layout should handle floats, footnotes and keeps in a simple, straightforward way.</p>
+<h2 id="issue-simple-id-refs">Keep ID References Simple</h2>
+<h2 id="issue-area-recycle">Render Pages ASAP</h2>
+<p>The issue here is that we wish to recycle the Area Tree memory as much as possible. The problem is that forward references prevent pages from being resolved until the forward references are resolved. If memory is insufficient to store unresolved pages, Area Tree fragments must be serialized until resolved.</p>
+<p>FOP developers have discussed adding the capability of using an Area Tree to render to more than one output target in the same run, which would be a complicating factor in disposal of pages as they are rendered.</p>
+<h1 id="lm">Layout Managers</h1>
+<p>The layout managers are set up from the hierarchy of the formatting object tree. A manager represents a hierachy of area producing objects. A manager is able to handle the block area(s) that it creates and organise or split areas for page breaks.</p>
+<p>Normally any object that creates a block area will have an associated layout manager. Other cases are tables and lists, these objects will also have layout managers that will manager the group of layout managers that make up the object.</p>
+<p>A layout manager is also able to determine height (min/max/optimum) and keep status. This will be used when organising the layout on a page. The manager will be able to determine the next place a break can be made and then be able to organise the height.</p>
+<p>A layout manager is essentially a bridge between the formatting objects and the area tree. It will keep a list of line areas inside block areas. Each line area will contain a list of inline areas that is able to be adjusted if the need arises.</p>
+<p>The objects in the area tree that are organised by the manager will mostly contain the information about there layout such as spacing and keeps, this information will be thrown away once the layout for a page is finalised.</p>
+<h1 id="creating">Creating Managers</h1>
+<p>The managers are created by the page sequence. The top level manager is the Page manager. This asks the flow to add all managers in this page sequence.</p>
+<p>For block level objects they have a layout manager. Neutral objects don't represent any areas but are used to contain a block level area and as such these objects will ask the appropriate child to create a layout manager.</p>
+<p>Any nested block areas or inline areas may be handled by the layout manager at a later stage.</p>
+<h1 id="using">Using Managers</h1>
+<p>Block area layout managers are used to create a block area, other block level managers may ask their child layout managers to create block areas which are then added to the area tree(subset).</p>
+<p>A manager is used to add areas to a page until the page is full, then the manages contain all the information necessary to make the decision about page break and spacing. A manager can split an area that it has created will keep a status about what has been added to the current area tree.</p>
+<h1 id="page">Page Layout</h1>
+<p>Once the Page layout manager, belonging to the page sequence, is ready then we can start laying out each page. The page sequence will create the current page to put the page data, the next page and if it exists a last page.</p>
+<p>The current page will have the areas added to it from the block layout managers. The next page will be used when splitting a block that goes over the page break. Note: any page break overrides the layout decided here. The last page will be necessary if the last block area is added to this page. The size of the last page will be considered and the areas will be added to the last page instead.</p>
+<p>The first step is to add areas to the current page until the area is full and the lines of the last block area contain at least n(orphans) and at least n(orphans) + n(widows) in total. This will only be relevant for areas at the start or end of a particular reference area.</p>
+<p>The spacing between the areas (including spacing in block areas inside an inline-container) will be set to the minimum values. This will allow the page to have at least all the information it needs to organise the page properly.</p>
+<p>This should handle the situation where there are keeps on some block areas that go over the end of the page better. It is possible that fitting the blocks on the page using a spacing between min and optimum would give a closer value to the optimum than putting the blocks on the next page and the spacing being between optimum and max. So if the objects are placed first at optimum then you will need to keep going to see if there is a lower keep further on that has a spacing that is closer to the optimum.</p>
+<p>The spacing and keep information is stored so that the area positions and sizes can be adjusted.</p>
+<h1 id="page-balance">Balancing Page</h1>
+<p>The page is vertically justified so that it distributes the areas on the page for the best result when considering keeps and spacing.</p>
+<h1 id="finding-break">Finding Break</h1>
+<p>First the keeps are checked. The available space on the page may have changed due to the presence of before floats or footnotes. The page break will need to be at a height &lt;= the available space on the page.</p>
+<p>A page break should be made at the first available position that has the lowest keep value when searching from the bottom. Once the first possible break is found then the next possible break, with equally low keep value, is considered. If the height of the page is closer to the optimal spacing then this break will be used instead.</p>
+<p>Keep values include implicit and explicit values when trying to split a block area into more than one area. Implicit keeps may be such things as widows/orphans.</p>
+<p>If the page contains before floats or footnotes then as each area or line area is removed the float/footnote should also be removed. This will change the available space and is a one way operation. The footnote should be removed first as a footnote may be placed on the next page. The lowest keep value may need to be reassessed as each conditional area is removed.</p>
+<p>The before float and footnote regions are managed so that the separator regions will be present if it contains at least one area.</p>
+<h1 id="optimize">Optimising</h1>
+<p>Once the areas for the page are finalised then the spacing will need to be adjusted. The available height on the page is compared with the min and max spacing. All of the spacing in all the areas on the page is then adjusted by the appropriate percentage value.</p>
+<h1 id="multi-column">Multi-Column Pages</h1>
+<p>In the case of multi-column pages the column breaks and eventually the page break must be found in a slightly different way.</p>
+<p>The columns need to be layed out completely from first to last but this can only be done after a rough estimate of all the elements on the page in case of before floats or footnotes.</p>
+<p>So first the complete page is layed out with all columns filled with areas and the spacing at a minimum. Then if there are any before floats or footnotes then the availabe space is adjusted. Then each the best break is found for each column starting from the first column. If any before floats or footnotes are removed as a result of the new breaks and optimised spacing then all the columns should still be layed out for the same column height.</p>
+<h1 id="page-complete">Completing Page</h1>
+<p>After the region body has been finished the static areas can be layed out. The width of the static area is set and the height is inifinite, that is all block areas should be placed in the area and their visibility is controlled be other factors.</p>
+<p>The area tree for the region body will contain the information about markers that may be necessary for the retrieve marker.</p>
+<p>The ordering of the area tree must be adjusted so that the areas are before, start, body, end and after in that order. The body region should be in the order before float, main then footnote.</p>
+<h1 id="line-area">Line Areas</h1>
+<p>Creating a line areas uses a similair concept. Each inline area is placed across the available space until there is no room left. The line is then split by considering all keeps and spacing.</p>
+<p>Each word (group of adjacent character inline areas) will have keeps based on hyphenation. The line break is at the lowest keep value starting from the end of the line.</p>
+<p>Once a line has been layed out for a particular width then that line is fixed for the page (except for unresolved page references).</p>
+<h1 id="before-float-footnote">Before Floats and Footnotes</h1>
+<p>The before float region and footnote region are handled by the page layoutmanger. These regions will handle the addition and removal of the separator regions when before floats/footnotes area added and removed.</p>
+<p>Footnotes and Before Floats are placed in special areas in the body region of the page. The size of these areas is determined by the content. This in turn effects the available size of the main reference area that contains the flow.</p>
+<p>A layout manager handles the adding and removing of footnotes/floats, this in turn effects the available space in the main reference area.</p>
+<h1 id="side-float">Side Floats</h1>
+<p>If a float anchor is present in a particular line area then the available space for that line (and other in the block) will be reduced. The side float adds to the height of the block area and this height also depends on the clear value of subsequent blocks. The keep status of the block is also effected as there must be enough space on the page to fit the side float.</p>
+<p>Side floats alter the length of the inline progression dimension for the current line and following lines for the size of the float.</p>
+<p>This means that the float needs to be handled by the block layout manager so that it can adjust the available inline progression dimension for the relevant line areas.</p>
+<h1 id="unresolved-area">Unresolved Areas</h1>
+<p>Once the layout of the page is complete there may be unresolved areas.</p>
+<p>Page number citations and links may require following pages to be layed out before they can be resolved. These will remain in the area tree as unresolved areas.</p>
+<p>As each page is completed the list of unresolved id's will be checked and if the id can be resolved it will be. Once all id's are resolved then the page can be rendered.</p>
+<p>Each page contains a map of all unresolved id's and the corresponding areas.</p>
+<p>In the case of page number citations, the areas reserves the equivalent of 3 number nines in the current font. When the area is resolved then the area is adjusted to its proper size and the line area is re-aligned to accomodate the change.</p>
+<h1 id="id-link-area">ID and Link Areas</h1>
+<p>Any formatting object that has an ID or any inline link defines an area that will be required when rendering and resolving id references.</p>
+<p>This area is stored in the parent area and may be a shape that exists in more than one page, for example over a page break. This shape consists of the boundary of all inline (or block) areas that the shape is defined for.</p>
+<h1 id="inline-area">Inline Areas</h1>
+<p>This is the definition of all inline areas that will exist in the area.</p>
+<h1 id="fixed-area">Fixed Areas</h1>
+<p>instream-foreign-object, external-graphic, inline-container</p>
+<p>These areas have a fixed width and height. They also have a viewport.</p>
+<h1 id="stretch-area">Stretch Areas</h1>
+<p>leader, inline space</p>
+<p>These areas have a fixed height but the width may vary.</p>
+<h1 id="character-area">Character Areas</h1>
+<p>character</p>
+<p>This is an simple character that has fixed properties according to the current font. There are implicit keeps with adjacent characters.</p>
+<h1 id="anchor-area">Anchor Areas</h1>
+<p>float anchor, footnote anchor</p>
+<p>This area has no size. It keeps the position for footnotes and floats and has a keep with the associated inline area.</p>
+<h1 id="unresolved-page-num">Unresolved Page Numbers</h1>
+<p>page-number-citation</p>
+<p>A page number area that needs resolving, behaves as a character and has the space of 3 normal characters reserved. The size will adjust when the value is resolved.</p>
+<h1 id="block-area">Block Areas</h1>
+<p>When a block creating element is complete then it is possible to build the block area and add it to the paprent.</p>
+<p>A block area will contain either more block areas or line areas, which are special block areas. The line areas are created by the LineLayoutManager in which the inline areas flow into.</p>
+<p>So a block area manager handles the lines or blocks as its children and determines things like spacing and breaks.</p>
+<p>In the case of tables and lists the blocks are stacked in a specific way that needs to be handled by the layout manager.</p>
+<p>The block area has info about the following:</p>
+<ul>
+<li>
+<p>all anchors including which lines they are on</p>
+</li>
+<li>
+<p>unresolved page references with line info</p>
+</li>
+<li>
+<p>id and link areas</p>
+</li>
+<li>
+<p>height (min/max/optimum) or area including floats</p>
+</li>
+<li>
+<p>holds space before/after and keep information</p>
+</li>
+<li>
+<p>widows and orphans</p>
+</li>
+</ul>
+<p>Once the layout has been finalised then this information can be discarded.</p>
+<h1 id="page-area">Page Areas</h1>
+<p>Contains inforamtion about all the block areas in the body, before area and footer area.</p>
+<p>Has a list of the unresolved page references and a list of id refences that can be used to obtain the area associated with that id.</p>
+<h1 id="test-cases">Test Cases</h1>
+<p>Here a few layout possibilities areas explored to determine how the layout process will handle these situations.</p>
+<h2 id="test-simple">Simple Pages</h2>
+<p>All blocks (including nested) are placed on the page with minimum spacing and the last block has the minimum number of lines past the page end. The lowest keep value is then found within the body area limits. Then the next equally low keep is found to determine if the spacing will be closer to the optimum values.</p>
+<h2 id="test-before-float-footnote">Before Floats/Footnotes</h2>
+<p>After filling the page with the block areas then the new body height is used to find the best position to break. Before each line area or block area is remove any associated before floats and footnotes are removed. This will then adjust the available space on the page and may allow for a different breaking point. Areas are removed towards the new breaking point until the areas fit on the page. When finding the optimum spacing the removal of before floats and footnotes must also be onsidered.</p>
+<h2 id="test-multi-column">Multicolumn</h2>
+<p>First the page is filled with all columns for the intial page area. Then each column is adjusted for the new height starting from the first column. The best break for the column is found then the next column is considered, any left over areas a pre-pended to the next column. Once all the columns are finished then all the columns are adjusted to fit in the same height columns. This handles the situation where before floats or footnotes may have been removed.</p>
+<h2 id="test-last-page">Last Page</h2>
+<p>If in the process of adding areas to a page it is found that there are no more areas in the flow then this page will need to be changed to the last page (if applicable). The areas are then placed on a last page.</p>
+<h1 id="status">Status</h1>
+<h2 id="status-todo">To Do</h2>
+<table>
+<thead>
+<tr>
+<th>Task</th>
+<th>Priority</th>
+<th>Notes</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>Keep Properties</td>
+<td>High</td>
+<td>Need to get keep-* properties working on block level constructs</td>
+</tr>
+<tr>
+<td>Justified Text</td>
+<td>High</td>
+<td>This has been completed, thanks largely to Luca Furini. Although there is still issue 28706 that requires further analysis.</td>
+</tr>
+<tr>
+<td>Multi-column layout</td>
+<td>High</td>
+<td></td>
+</tr>
+<tr>
+<td>Get Markers Working</td>
+<td>High</td>
+<td>Main Problem is markers can be added to wrong page. LEWP is returning first on Next page!</td>
+</tr>
+<tr>
+<td>Absolutely positioned block containers</td>
+<td>High</td>
+<td></td>
+</tr>
+<tr>
+<td>Background Images</td>
+<td>High</td>
+<td></td>
+</tr>
+<tr>
+<td>Conditional space suppression</td>
+<td>High</td>
+<td></td>
+</tr>
+<tr>
+<td>Fix break-* properties</td>
+<td>High</td>
+<td></td>
+</tr>
+<tr>
+<td>Footnotes</td>
+<td>Medium</td>
+<td></td>
+</tr>
+<tr>
+<td>Relative positioned block containers</td>
+<td>Medium</td>
+<td></td>
+</tr>
+<tr>
+<td>Fine-tuning line breaking and hypenation</td>
+<td>Medium</td>
+<td></td>
+</tr>
+<tr>
+<td>Last page layout</td>
+<td>Medium</td>
+<td></td>
+</tr>
+<tr>
+<td>Aligned leaders, especially in justified text</td>
+<td>Medium</td>
+<td></td>
+</tr>
+<tr>
+<td>Floats of all kind</td>
+<td>Low</td>
+<td></td>
+</tr>
+<tr>
+<td>Border collapsing on tables</td>
+<td>Low</td>
+<td>RenderX hasnt implemented this (17/03/04)</td>
+</tr>
+<tr>
+<td>Fine-tuning all other borders</td>
+<td>Low</td>
+<td>Not sure what Joerg means by this, border collapse priorties? Dashed and dotted borders have been implemented in PDF</td>
+</tr>
+<tr>
+<td>BIDI support</td>
+<td>Low</td>
+<td></td>
+</tr>
+</tbody>
+</table>
+<h2 id="status-wip">Work in Progress</h2>
+<h2 id="status-complete">Completed</h2></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/optimise.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/optimise.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/optimise.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Optimisations</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Optimisations</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version><authors><person email="keiron@aftexsw.com" name="Keiron Liddle"></person></authors></p>
+<h1 id="intro">Introduction</h1>
+<p>Apache™ FOP should be able to handle very large documents. A document can be supplied using SAX and the information should be passed entirely through the system, from fo elements to rendered output as soon as possible.</p>
+<p>A top level block area, immediately below the flow, can be added to the page layout as soon as the element is complete.</p>
+<p>The fo elements used to construct a page can be discarded as soon as the layout for the page is complete. Some information may be stored in the area tree of the page in order to handle unresolved page references and links.</p>
+<p>Once the layout of a page has been completed, all elements are fully resolved, then the page can be rendered. Some renderers may support out of order rendering of pages.</p>
+<p>The main problem that will remain is that any page with forward references will need to be stored until the refence is resolved. This means that the information contained in the page should be as minimal as possible.</p>
+<p>Line areas can be optimised once the layout for the line has been finalised. Consecutive characters with the same properties can be combined into a "word" to hold the information with limited overhead.</p>
+<p>If there are a large number of pages where forward references cannot be resolved the a method of writing a page onto disk could be used to save memory. The easiest way to achieve this is to make the page and all children serializable.</p></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/parsing.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/parsing.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/parsing.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,115 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Input Parsing</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Input Parsing</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version></p>
+<h1 id="intro">Introduction</h1>
+<p>Parsing is the process of reading the XSL-FO input and making the information in it available to Apache™ FOP.</p>
+<h1 id="input">SAX for Input</h1>
+<p>The two standard ways of dealing with XML input are SAX and DOM. SAX basically creates events as it parses an XML document in a serial fashion; a program using SAX (and not storing anything internally) will only see a small window of the document at any point in time, and can never look forward in the document. DOM creates and stores a tree representation of the document, allowing a view of the entire document as an integrated whole. One issue that may seem counter-intuitive to some new FOP developers, and which has from time to time been contentious, is that FOP uses SAX for input. (DOM can be used as input as well, but it is converted into SAX events before entering FOP, effectively negating its advantages).</p>
+<p>Since FOP essentially needs a tree representation of the FO input, at first glance it seems to make sense to use DOM. Instead, FOP takes SAX events and builds its own tree-like structure. Why?</p>
+<ul>
+<li>
+<p>DOM has a relatively large memory footprint. FOP's FO Tree is a lighter-weight structure.</p>
+</li>
+<li>
+<p>DOM contains an entire document. FOP is able to process individual fo:page-sequence objects discretely, without the need to have the entire document in memory. For documents that have only one fo:page-sequence object, FOP's approach is no advantage, but in other cases it is a huge advantage. A 500-page book that is broken into 100 5-page chapters, each in its own fo:page-sequence, essentially needs only 1% of the document memory that would be required if using DOM as input.</p>
+</li>
+</ul>
+<p>See the <a href="../../trunk/embedding.html#input">Input Section of the User Embedding Document</a> for a discussion of input usage patterns and some implementation details.</p>
+<p>FOP's <a href="fotree.html">FO Tree Mechanism</a> is responsible for catching the SAX events and processing them.</p>
+<h1 id="validation">Validation</h1>
+<p>If the input XML is not well-formed, that will be reported.</p>
+<p>There is no DTD for XSL-FO, so no formal validation is possible at the parser level.</p>
+<p>The SAX handler will report an error for unrecognized <a href="#namespaces">namespaces</a> .</p>
+<h1 id="namespaces">Namespaces</h1>
+<p>To allow for extensions to the XSL-FO language, FOP provides a mechanism for handling foreign namespaces.</p>
+<p>See <a href="../../trunk/extensions.html">User Extensions</a> for a discussion of standard extensions shipped with FOP, and their related namespaces.</p>
+<p>See <a href="../extensions.html">Developer Extensions</a> for a discussion of the mechanisms in place to allow developers to add their own extensions, including how to tell FOP about the foreign namespace.</p>
+<h1 id="status">Status</h1>
+<h2 id="status-todo">To Do</h2>
+<h2 id="status-wip">Work In Progress</h2>
+<h2 id="status-complete">Completed</h2>
+<ul>
+<li>
+<p>better handling of unknown xml and xml from an unknown namespace</p>
+</li>
+<li>
+<p>Changed extensions to allow for external xml</p>
+</li>
+<li>
+<p>Can have a default element mapping for extensions</p>
+</li>
+</ul></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/pdf-library.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/pdf-library.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/pdf-library.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: PDF Library</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: PDF Library</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version></p>
+<h1 id="intro">Introduction</h1>
+<p>The PDF Library is an independant package of classes in Apache™ FOP. These class provide a simple way to construct documents and add the contents. The classes are found in <code>org.apache.fop.pdf.*</code> .</p>
+<h1 id="pdf-document-pdfdocument">PDF Document # {#PDF+Document}</h1>
+<p>This is where most of the document is created and put together.</p>
+<p>It sets up the header, trailer and resources. Each page is made and added to the document. There are a number of methods that can be used to create/add certain PDF objects to the document.</p>
+<h1 id="building-pdf-buildingpdf">Building PDF # {#Building+PDF}</h1>
+<p>The PDF Document is built by creating a page for each page in the Area Tree.</p>
+<p>This page then has all the contents added. The page is then added to the document and available objects can be written to the output stream.</p>
+<p>The contents of the page are things such as text, lines, images etc. The PDFRenderer inserts the text directly into a pdf stream. The text consists of markup to set fonts, set text position and add text.</p>
+<p>Most of the simple pdf markup is inserted directly into a pdf stream. Other more complex objects or commonly used objects are added through java classes. Some pdf objects such as an image consists of two parts.</p>
+<p>It has a separate object for the image data and another bit of markup to display the image in a certain position on the page.</p>
+<p>The java objects that represent a pdf object implement a method that returns the markup for inserting into a stream. The method is: byte[] toPDF().</p>
+<h1 id="Features">Features</h1>
+<h2 id="Fonts">Fonts</h2>
+<p>Support for embedding fonts and using the default Acrobat fonts.</p>
+<h2 id="Images">Images</h2>
+<p>Images can be inserted into a page. The image can either be inserted as a pixel map or directly insert a jpeg image.</p>
+<h2 id="stream-filters-streamfilters">Stream Filters ## {#Stream+Filters}</h2>
+<p>A number of filters are available to encode the pdf streams. These filters can compress the data or change it such as converting to hex.</p>
+<h2 id="Links">Links</h2>
+<p>A pdf link can be added for an area on the page. This link can then point to an external destination or a position on any page in the document.</p>
+<h2 id="Patterns">Patterns</h2>
+<p>The fill and stroke of graphical objects can be set with a colour, pattern or gradient.</p>
+<p>The are a number of other features for handling pdf markup relevent to creating PDF files for FOP.</p></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/properties.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/properties.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/properties.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,217 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Properties</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Properties</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version><authors><person email="" name="Karen Lease"></person></authors></p>
+<h1 id="intro">Introduction</h1>
+<p>As the input XSL-FO is being parsed and the FO Tree is being built, the attributes of the FO elements are passed by the parser to the related FO object. The java object that represent the FO object then converts the attributes into properties that are stored in the FO Tree.</p>
+<h1 id="issues">Issues</h1>
+<p>The following are some issues when dealing with properties:</p>
+<ul>
+<li>
+<p>Initial Property Set</p>
+</li>
+<li>
+<p>Inheritance: Some properties can be inherited from parent objects.</p>
+</li>
+<li>
+<p>Adoption: The parentage for some elements can move around. Markers are one example.</p>
+</li>
+<li>
+<p>Multiple Namespaces: The properties for foreign namespaces must be handled.</p>
+</li>
+<li>
+<p>Expressions: XSL-FO expressions can be included in properties.</p>
+</li>
+</ul>
+<h1 id="process-overview">Overview of Processing</h1>
+<p>The general flow of property processing is as follows:</p>
+<ul>
+<li>
+<p>As part of <code>FOTreeBuilder.startElement()</code> , <code>FObj.handleAttrs</code> is passed a list of attributes to be processed for the new FObj.</p>
+</li>
+<li>
+<p>FObj.handleAttrs gets a PropertyListBuilder and asks it to create a Property List from the list of attributes. There is currently only one static PropertyListBuilder, which handles the fo: namespace.</p>
+</li>
+<li>
+<p>FObj.handleAttrs then cross-references the returned PropertyList with the FObj, creates a PropertyManager to facilitate downstream processing of the PropertyList, and handles the special case of the writing-mode property.</p>
+</li>
+</ul>
+<h1 id="plb">PropertyListBuilder</h1>
+<p>Each plb object contains a hash of property names and <em>their</em> respective Makers. It may also contain element-specific property maker hashes; these are based on the <em>local name</em> of the flow object, ie. <em>table-row</em> , not <em>fo:table-row</em> . If an element-specific property mapping exists, it is preferred to the generic mapping.</p>
+<p>The PLB loops through each attribute in the list, finds an appropriate "Maker" for it, then calls the Maker to convert the attribute value into a Property object of the correct type, and stores that Property in the PropertyList.</p>
+<h1 id="datatypes">Property datatypes</h1>
+<p>The property datatypes are defined in the org.apache.fop.datatypes package, except Number and String which are java primitives. The FOP datatypes are:</p>
+<ul>
+<li>
+<p>Number</p>
+</li>
+<li>
+<p>String</p>
+</li>
+<li>
+<p>ColorType</p>
+</li>
+<li>
+<p>Length (has several subclasses)</p>
+</li>
+<li>
+<p>CondLength (compound)</p>
+</li>
+<li>
+<p>LengthRange (compound)</p>
+</li>
+<li>
+<p>Space (compound)</p>
+</li>
+<li>
+<p>Keep (compound)</p>
+</li>
+</ul>
+<p>The <em>org.apache.fop.fo.Property</em> class is the superclass for all Property subclasses. There is a subclass for each kind of property datatype. These are named using the datatype name plus the word Property, resulting in NumberProperty, StringProperty, and so on. There is also a class EnumProperty which uses an <code>int</code> primitive to hold enumerated values. There is no corresponding Enum datatype class.</p>
+<p>The Property class provides a "wrapper" around any possible property value. Code manipulating property values (in layout for example) usually knows what kind (or kinds) of datatypes are acceptable for a given property and will use the appropriate accessor.</p>
+<p>The base Property class defines accessor methods for all FO property datatypes, such as getNumber(), getColorType(), getSpace(), getEnum(), etc. It doesn't define accessors for SVG types, since these are handled separately (at least for now.) In the base Property class, all of these methods return null, except getEnum which returns 0. Individual subclasses return a value of the appropriate type, such as Length or ColorType. A subclass may also choose to return a reasonable value for other accessor types. For example, a SpaceProperty will return the optimum value if asked for a Length.</p>
+<h1 id="makers">Property Makers</h1>
+<p>The Property class contains a nested class called <em>Maker</em> . This is the base class for all other property Makers. It provides basic framework functionality which is overridden by the code generated by properties.xsl from the *properties.xml files. In particular it provides basic expression evaluation, using PropertyParser class in the org.apache.fop.fo.expr package.</p>
+<p>Other Property subclasses such as LengthProperty define their own nested Maker classes (subclasses of Property.Maker). These handle conversion from the Property subclass returned from expression evaluation into the appropriate subclass for the property.</p>
+<p>For each generic or specific property definition in the properties.xml files, a new subclass of one of the Maker classes is created. Note that no new Property subclasses are created, only new PropertyMaker subclasses. Once the property value has been parsed and stored, it has no specific functionality. Only the Maker code is specific. Maker subclasses define such aspects as keyword substitutions, whether the property can be inherited or not, which enumerated values are legal, default values, corresponding properties and specific datatype conversions.</p>
+<p>The PLB finds a "Maker" for the property based on the attribute name and the element name. Most Makers are generic and handle the attribute on any element, but it's possible to set up an element-specific property Maker. The attribute name to Maker mappings are automatically created during the code generation phase by processing the XML property description files.</p>
+<h1 id="attribute-list">Processing the attribute list</h1>
+<p>The PLB first looks to see if the font-size property is specified, since it sets up relative units which can be used in other property specifications. Each attribute is then handled in turn. If the attribute specifies part of a compound property such as space-before.optimum, the PLB looks to see if the attribute list also contains the "base" property (space-before in this case) and processes that first.</p>
+<h1 id="maker-design">How the Property Maker works</h1>
+<p>There is a family of Maker objects for each of the property datatypes, such as Length, Number, Enumerated, Space, etc. But since each Property has specific aspects such as whether it's inherited, its default value, its corresponding properties, etc. there is usually a specific Maker for each Property. All these Maker classes are created during the code generation phase by processing (using XSLT) the XML property description files to create Java classes.</p>
+<p>The Maker first checks for "keyword" values for a property. These are things like "thin, medium, thick" for the border-width property. The datatype is really a Length but it can be specified using these keywords whose actual value is determined by the "User Agent" rather than being specified in the XSL standard. For FOP, these values are currently defined in foproperties.xml. The keyword value is just a string, so it still needs to be parsed as described next.</p>
+<p>The Maker also checks to see if the property is an Enumerated type and then checks whether the value matches one of the specified enumeration values.</p>
+<p>Otherwise the Maker uses the property parser in the fo.expr package to evaluate the attribute value and return a Property object. The parser interprets the expression language and performs numeric operations and function call evaluations.</p>
+<p>If the returned Property value is of the correct type (specificed in foproperties.xml, where else?), the Maker returns it. Otherwise, it may be able to convert the returned type into the correct type.</p>
+<p>Some kinds of property values can't be fully resolved during FO tree building because they depend on layout information. This is the case of length values specified as percentages and of the special proportional-column-width(x) specification for table-column widths. These are stored as special kinds of Length objects which are evaluated during layout. Expressions involving "em" units which are relative to font-size <em>are</em> resolved during the FO tree building however.</p>
+<h1 id="property-list-struct">Structure of the PropertyList</h1>
+<p>The PropertyList extends HashMap and its basic function is to associate Property value objects with Property names. The Property objects are all subclasses of the base Property class. Each one simply contains a reference to one of the property datatype objects. Property provides accessors for all known datatypes and various subclasses override the accessor(s) which are reasonable for the datatype they store.</p>
+<p>The PropertyList itself provides various ways of looking up Property values to handle such issues as inheritance and corresponding properties.</p>
+<p>The main logic is:<br></br>If the property is a writing-mode relative property (using start, end, before or after in its name), the corresponding absolute property value is returned if it's explicitly set on this FO.<br></br>Otherwise, the writing-mode relative value is returned if it's explicitly set. If the property is inherited, the process repeats using the PropertyList of the FO's parent object. (This is easy because each PropertyList points to the PropertyList of the nearest ancestor FO.) If the property isn't inherited or no value is found at any level, the initial value is returned.</p>
+<h1 id="property-spec">Implementing Standard Properties</h1>
+<p>Because the properties defined in the standard are basically static, FOP currently builds the source code for the related Property classes from an XML data file. All properties are specified in src/codegen/foproperties.xml. The related classes are created automatically during the build process by applying an XSLT stylesheet to the foproperties.xml file.</p>
+<h2 id="generic">Generic properties</h2>
+<p>In the properties xml files, one can define generic property definitions which can serve as a basis for individual property definitions. There are currently several generic properties defined in foproperties.xml. An example is GenericColor, which defines basic properties for all ColorType properties. Since the generic specification doesn't include the inherited or default elements, these should be set in each property which is based on GenericColor. Here is an example:</p>
+<p><code>&lt;property type='generic'&gt;
+    &lt;name&gt;background-color&lt;/name&gt;
+    &lt;use-generic&gt;GenericColor&lt;/use-generic&gt;
+    &lt;inherited&gt;false&lt;/inherited&gt;
+    &lt;default&gt;transparent&lt;/default&gt;
+  &lt;/property&gt;</code> </p>
+<p>A generic property specification can include all of the elements defined for the property element in the DTD, including the description of components for compound properties, and the specification of keyword shorthands.</p>
+<p>Generic property specifications can be based on other generic specifications. An example is GenericCondPadding template which is based on the GenericCondLength definition but which extends it by adding an inherited element and a default value for the length component.</p>
+<p>Generic properties can specify enumerated values, as in the GenericBorderStyle template. This means that the list of values, which is used by 8 properties (the "absolute" and "writing-mode-relative" variants for each BorderStyle property) is only specified one time.</p>
+<p>When a property includes a "use-generic" element and includes no other elements (except the "name" element), then no class is generated for the property. Instead the generated mapping will associate this property directly with an instance of the generic Maker.</p>
+<p>A generic class may also be hand-coded, rather than generated from the properties file. Properties based on such a generic class are indicated by the attribute <code>ispropclass='true'</code> on the <em>use-generic</em> element.</p>
+<p>This is illustrated by the SVG properties, most of which use one of the Property subclasses defined in the <em>org.apache.fop.svg</em> package. Although all of these properties are now declared in svgproperties.xml, no specific classes are generated. Classes are only generated for those SVG properties which are not based on generic classes defined in svg.</p>
+<h2 id="element-specific">Element-specific properties</h2>
+<p>Properties may be defined for all flow objects or only for particular flow objects. A PropertyListBuilder object will always look first for a Property.Maker for the flow object before looking in the general list. These are specified in the <code>element-property-list</code> section of the properties.xml files. The <code>localname</code> element children of this element specify for which flow-object elements the property should be registered.</p>
+<p><em>NOTE</em> : All the properties for an object or set of objects must be specified in a single element-property-list element. If the same localname appears in several element lists, the later set of properties will hide the earlier ones! Use the <em>ref</em> functionality if the same property is to be used in different sets of element-specific mappings.</p>
+<h2 id="reference">Reference properties</h2>
+<p>A property element may have a type attribute with the value <code>ref</code> . The content of the <em>name</em> child element is the name of the referenced property (not its class-name!). This indicates that the property specification has already been given, either in this same specification file or in a different one (indicated by the <code>family</code> attribute). The value of the family attribute is <em>XX</em> where the file <em>XXproperties.xml</em> defines the referenced property. For example, some SVG objects may have properties defined for FO. Rather than defining them again with a new name, the SVG properties simply reference the defined FO properties. The generating mapping for the SVG properties will use the FO Maker classes.</p>
+<h2 id="corresponding">Corresponding properties</h2>
+<p>Some properties have both <em>absolute</em> and <em>writing-mode-relative</em> forms. In general, the absolute forms are equivalent to CSS properties, and the writing-mode-relative forms are based on DSSSL. FO files may use either or both forms. In FOP code, a request for an absolute form will retrieve that value if it was specified on the FO; otherwise the corresponding relative property will be used if it was specified. However, a request for a relative form will only use the specified relative value if the corresponding absolute value was <em>not</em> specified for that FO.</p>
+<p>Corresponding properties are specified in the properties.xml files using the element <code>corresponding</code> , which has at least one <code>propval</code> child and may have a <code>propexpr</code> child, if the corresponding value is calculated based on several other properties, as for <code>start-indent</code> .</p>
+<p><em>NOTE</em> : most current FOP code accesses the absolute variants of these properties, notably for padding, border, height and width attributes. However it does use start-indent and end-indent, rather than the "absolute" margin properties.</p>
+<h1 id="mapping">Mapping</h1>
+<p>The XSL script <code>propmap.xsl</code> is used to generate property mappings based on both foproperties.xml and svgproperties.xml. The mapping classes in the main fop packages simply load these automatically generated mappings. The mapping code still uses the static "maker" function of the generated object to obtain a Maker object. However, for all generated classes, this method returns an instance of the class itself (which is a subclass of Property.Maker) and not an instance of a separate nested Maker class.</p>
+<p>For most SVG properties which use the SVG Property classes directly, the generated mapper code calls the "maker" method of the SVG Property class, which returns an instance of its nested Maker class.</p>
+<p>The property generation also handles element-specific property mappings as specified in the properties XML files.</p>
+<h1 id="enumerated">Enumerated values</h1>
+<p>For any property whose datatype is <code>Enum</code> or which contains possible enumerated values, FOP code may need to access enumeration constants. These are defined in the interfaces whose name is the same as the generated class name for the property, for example <code>BorderBeforeStyle.NONE</code> . These interface classes are generated by the XSL script <code>enumgen.xsl</code> . A separate interface defining the enumeration constants is always generated for every property which uses the constants, even if the constants themselves are defined in a generic class, as in BorderStyle.</p>
+<p>If a subproperty or component of a compound property has enumerated values, the constants are defined in a nested interface whose name is the name of the subproperty (using appropriate capitalization rules). For example, the keep properties may have values of AUTO or FORCE or an integer value. These are defined for each kind of keep property. For example, the keep-together property is a compound property with the components within-line, within-column and within-page. Since each component may have the values AUTO or FORCE, the KeepTogether interface defines three nested interfaces, one for each component, and each defines these two constants. An example of a reference in code to the constant is <code>KeepTogether.WithinPage.AUTO</code> .</p>
+<h1 id="compound">Compound property types</h1>
+<p>Some XSL FO properties are specified by compound datatypes. In the FO file, these are defined by a group of attributes, each having a name of the form <code>property.component</code> , for example <code>space-before.minimum</code> . These are several compound datatypes:</p>
+<ul>
+<li>
+<p>LengthConditional, with components length and conditionality</p>
+</li>
+<li>
+<p>LengthRange, with components minimum, optimum, and maximum</p>
+</li>
+<li>
+<p>Space, with components minimum, optimum, maximum, precedence and conditionality</p>
+</li>
+<li>
+<p>Keep, with components within-line, within-column and within-page</p>
+</li>
+</ul>
+<p>These are described in the properties.xml files using the element <code>compound</code> which has <code>subproperty</code> children. A subproperty element is much like a property element, although it may not have an <code>inherited</code> child element, as only a complete property object may be inherited.</p>
+<p>Specific datatype classes exist for each compound property. Each component of a compound datatype is itself stored as a Property object. Individual components may be accessed either by directly performing a get operation on the name, using the "dot" notation, eg. <code>get("space-before.optimum")</code> ; or by using an accessor on the compound property, eg. <code>get("space-before").getOptimum()</code> . In either case, the result is a Property object, and the actual value may be accessed (in this example) by using the "getLength()" accessor.</p>
+<h1 id="refine">Refinement</h1>
+<p>The <strong>Refinement</strong> step is part of reading and using the properties which may happen immediately or during the layout process. FOP does not currently use a separate Refinement process, but tends to handle refining steps as the FO Tree is built.</p>
+<h1 id="refined-fo-tree">Refined FO Tree</h1>
+<p>The Refined FO Tree is the result of the Refinement process.</p></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/renderers.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/renderers.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/renderers.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,248 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Renderers</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Renderers</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version><authors><person email="keiron@aftexsw.com" name="Keiron Liddle"></person></authors></p>
+<h1 id="intro">Introduction</h1>
+<p>A renderer is primarily designed to convert a given area tree into the output document format. It should be able to produce pages and fill the pages with the text and graphical content. Usually the output is sent to an output stream.</p>
+<p>Some output formats may support extra information that is not available from the area tree or depends on the destination of the document.</p>
+<p>Each renderer is given an area tree to render to its output format. The area tree is simply a representation of the pages and the placement of text and graphical objects on those pages.</p>
+<p>The renderer will be given each page as it is ready and an output stream to write the data out. All pages are supplied in the order they appear in the document. In order to save memory it is possble to render the pages out of order. Any page that is not ready to be rendered is setup by the renderer first so that it can reserve a space or reference for when the page is ready to be rendered.The renderer is responsible for managing the output format and associated data and flow.</p>
+<h1 id="issues">Design Issues</h1>
+<h2 id="issue-renderers-responsible">Renderers are Responsible</h2>
+<p>Each renderer is totally responsible for its output format.</p>
+<h2 id="issue-output-stream">Send Output to a Stream</h2>
+<h1 id="fonts">Fonts</h1>
+<p>Because font metrics (and therefore layout) are obtained in two different ways depending on the renderer, the renderer actually sets up the fonts being used. The font metrics are used during the layout process to determine the size of characters.</p>
+<h1 id="context">Render Context</h1>
+<p>The render context is used by handlers. It contains information about the current state of the renderer, such as the page, the position, and any other miscellanous objects that are required to draw into the page.</p>
+<h1 id="xml-handling-xmlhandling">XML Handling # {#XML+Handling}</h1>
+<p>A document may contain information in the form of XML for an image or instream foreign object. This XML is handled through the user agent. A standard extension for PDF is the SVG handler.</p>
+<p>If there is XML in the SVG namespace it is given to the handler which renders the SVG into the pdf document at the given location. This separation means that other XML handlers can easily be added.</p>
+<h1 id="Extensions">Extensions</h1>
+<p>Document level extensions are handled with an extension handler. This handles the information from the AreaTree and adds renders it to the document. An example is the pdf bookmarks. This information first needs to have all references resolved. Then the extension handler is ready to put the information into the pdf document.</p>
+<h1 id="implement">Renderer Implementations</h1>
+<table>
+<thead>
+<tr>
+<th>Name</th>
+<th>Type</th>
+<th>Font Source</th>
+<th>Font Embedding?</th>
+<th>Out of Order Rendering?</th>
+<th>Notes</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>PDF</td>
+<td>Paginated</td>
+<td>FOP</td>
+<td>Yes</td>
+<td>Yes</td>
+<td>Uses the PDFDocument classes to create a PDF document. Most of the work is to insert text or create lines. SVG is handled by the XML handler that uses the PDFGraphics2D and batik to draw the svg into the pdf page.</td>
+</tr>
+<tr>
+<td>PostScript</td>
+<td>Paginated</td>
+<td>FOP</td>
+<td>Not implemented</td>
+<td>?</td>
+<td>Similar to PDF.</td>
+</tr>
+<tr>
+<td>PCL</td>
+<td>Paginated</td>
+<td>FOP</td>
+<td>?</td>
+<td>?</td>
+<td>Similar to PDF.</td>
+</tr>
+<tr>
+<td>SVG</td>
+<td>Paginated</td>
+<td>?</td>
+<td>?</td>
+<td>?</td>
+<td>Creates a single svg document that contains all the pages rendered with page sequences horizontally and pages vertically. Adds links between the pages so that it can be viewed by clicking on the page to go to the next page.</td>
+</tr>
+<tr>
+<td>TXT</td>
+<td>Paginated</td>
+<td>N/A</td>
+<td>N/A</td>
+<td>No</td>
+<td>Outputs to a text document.</td>
+</tr>
+<tr>
+<td>AWT</td>
+<td>Paginated</td>
+<td>AWT</td>
+<td>N/A</td>
+<td>?</td>
+<td>This draws the pages into an AWT graphic.</td>
+</tr>
+<tr>
+<td>XML</td>
+<td>Paginated</td>
+<td>FOP</td>
+<td>No</td>
+<td>No</td>
+<td>Creates an XML file that represents the AreaTree.</td>
+</tr>
+<tr>
+<td>Print</td>
+<td>Paginated</td>
+<td>AWT</td>
+<td>?</td>
+<td>No</td>
+<td>Prints the document using the java printing facitlities. The AWT rendering is used to draw the pages onto the printjob.</td>
+</tr>
+<tr>
+<td>RTF</td>
+<td>Structural</td>
+<td>N/A</td>
+<td>N/A</td>
+<td>No</td>
+<td>Structural format uses a different rendering mechanism.</td>
+</tr>
+<tr>
+<td>MIF</td>
+<td>Structural</td>
+<td>N/A</td>
+<td>N/A</td>
+<td>No</td>
+<td>Structural format uses a different rendering mechanism.</td>
+</tr>
+</tbody>
+</table>
+<h1 id="add">Adding a Renderer</h1>
+<p>You can add other renderers by implementing the Renderer interface. However, the AbstractRenderer does most of what is needed, including iterating through the tree parts, so it is probably better to extend this. This means that you only need to implement the basic functionality such as text, images, and lines. AbstractRenderer's methods can easily be overridden to handle things in a different way or do some extra processing.</p>
+<p>The relevent AreaTree structures that will need to be rendered are:</p>
+<ul>
+<li>
+<p>Page</p>
+</li>
+<li>
+<p>Viewport</p>
+</li>
+<li>
+<p>Region</p>
+</li>
+<li>
+<p>Span</p>
+</li>
+<li>
+<p>Block</p>
+</li>
+<li>
+<p>Line</p>
+</li>
+<li>
+<p>Inline</p>
+</li>
+</ul>
+<p>A renderer implementation does the following:</p>
+<ul>
+<li>
+<p>render each individual page</p>
+</li>
+<li>
+<p>clip and align child areas to a viewport</p>
+</li>
+<li>
+<p>handle all types of inline area, text, image etc.</p>
+</li>
+<li>
+<p>draw various lines and rectangles</p>
+</li>
+</ul>
+<h1 id="multiple">Multiple Renderers</h1>
+<p>The layout of the document depends mainly on the font being used. If two renderers have the same font metrics then it is possible to use the same Area Tree to render both. This can be handled by the AreaTree Handler.</p>
+<h1 id="status">Status</h1>
+<h2 id="status-todo">To Do</h2>
+<h2 id="status-wip">Work In Progress</h2>
+<h2 id="status-complete">Completed</h2>
+<ul>
+<li>
+<p>new renderer model</p>
+</li>
+<li>
+<p>new interface for structured documents, rtf and mif</p>
+</li>
+<li>
+<p>added handlers for xml in renderer</p>
+</li>
+</ul></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/startup.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/startup.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/startup.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,105 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: Startup, Environment, Control</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: Startup, Environment, Control</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version></p>
+<h1 id="intro">Introduction</h1>
+<p>Startup is the process of getting Apache™ FOP bootstrapped and creating basic objects. Environment includes acquiring user options, instantiating any frameworks, setting up logging, etc. Control includes the basic logic for tieing the various subsystems together properly.</p>
+<h1 id="status">Status</h1>
+<h2 id="status-todo">To Do</h2>
+<ul>
+<li>
+<p>avalon integration - logging, configuration, component management, caching, uri resolver</p>
+</li>
+<li>
+<p>improved interfaces</p>
+<ul>
+<li>
+<p>no threading/static problems</p>
+</li>
+<li>
+<p>simpler to use</p>
+</li>
+</ul>
+</li>
+<li>
+<p>better commandline handling</p>
+</li>
+</ul>
+<h2 id="status-wip">Work In Progress</h2>
+<h2 id="status-complete">Completed</h2>
+<ul>
+<li><strong>better image handling</strong> - redone so it can use a cache and synchronizes properly only on the current image while loading</li>
+</ul></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>

Added: websites/staging/xmlgraphics/trunk/content/fop/dev/design/svg.html
==============================================================================
--- websites/staging/xmlgraphics/trunk/content/fop/dev/design/svg.html (added)
+++ websites/staging/xmlgraphics/trunk/content/fop/dev/design/svg.html Sun Apr 15 05:39:50 2012
@@ -0,0 +1,101 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html lang="en">
+  <head>
+    <title>Apache™ FOP Design: SVG</title>
+
+    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
+    <meta property="og:image" content="http://www.apache.org/images/asf_logo.gif" />
+<!--
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/style.css">
+    <link rel="stylesheet" type="text/css" media="screen" href="http://www.apache.org/css/code.css">
+-->
+    <link href="/css/xmlgraphics.css" rel="stylesheet" type="text/css">
+
+    </style>
+
+    
+
+    
+    
+  </head>
+
+  <body>
+	  <div id="banner">&nbsp;
+	  </div>
+
+	  <div id="navigation">
+	  <h1 id="xml-graphics">XML Graphics</h1>
+<ul>
+<li><a href="/">Overview</a></li>
+<li><a href="/team.html">Who We Are</a></li>
+<li><a href="/legal.html">Legal Stuff</a></li>
+<li><a href="/charter.html">Project Charter</a></li>
+<li><a href="/mail.html">Mailing Lists</a></li>
+<li><a href="/repo.html">Code Repositories</a></li>
+<li><a href="http://www.apache.org/foundation/sponsorship.html">ASF Sponsorship Program</a></li>
+<li><a href="http://www.apache.org/foundation/thanks.html">ASF Thanks</a></li>
+</ul>
+<h1 id="subprojects">Subprojects</h1>
+<ul>
+<li><a href="/batik/">Batik</a></li>
+<li><a href="/fop/">FOP</a></li>
+<li><a href="/commons/">Commons</a></li>
+</ul>
+<form name="search" id="search" action="http://www.google.com/search" method="get">
+  <input value="xmlgraphics.apache.org" name="sitesearch" type="hidden"/>
+  <input type="text" name="q" id="query" /><br />
+  <input type="submit" id="submit" value="Search" />
+</form>
+	  </div>
+	
+	  <div id="bannertext">
+        <a href="/"><img src="/images/apache-xml-graphics.gif" alt="The Apache XML Graphics Project" width="220" heigh="51" /></a>
+        <h1>Apache™ FOP Design: SVG</h1>
+      </div>
+        <p><a href="/">Home</a>&nbsp;&raquo&nbsp;<a href="/fop/">Fop</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/">Dev</a>&nbsp;&raquo&nbsp;<a href="/fop/dev/design/">Design</a></p>
+      </div>
+      <div id="content" class="grid_16"><div class="section-content"><p><version>$Revision: 1298724 $</version></p>
+<h1 id="intro">Introduction</h1>
+<p>SVG is rendered through Apache™ Batik.</p>
+<p>The XML from the XSL:FO document is converted into an SVG DOM with batik. This DOM is then set as the Document on the Foreign Object area in the Area Tree.</p>
+<p>This DOM is then available to be rendered by the renderer.</p>
+<p>SVG is rendered in the renderers via an XMLHandler in the FOUserAgent. This XML handler is used to render the SVG. The SVG is rendered by using batik. Batik converts the SVG DOM into an internal structure that can be drawn into a Graphics2D. So for PDF we use a PDFGraphics2D to draw into.</p>
+<p>This creates the necessary PDF information to create the SVG image in the PDF document.</p>
+<p>Most of the work is done in the PDFGraphics2D class. There are also a few bridges that are plugged into batik to provide different behaviour for some SVG elements.</p>
+<h1 id="text-drawing-textdrawing">Text Drawing # {#Text+Drawing}</h1>
+<p>Normally batik converts text into a set of curved shapes.</p>
+<p>This is handled as any other shapes when rendering to the output. This is not always desirable as the shapes have very fine curves. This can cause the output to look a bit bad in PDF and PS (it can be drawn properly but is not by default). These curves also require much more data than the original text.</p>
+<p>To handle this there is a PDFTextElementBridge that is set when using the bridge in batik. If the text is simple enough for the text to be drawn in the PDF as with all other text then this sets the TextPainter to use the PDFTextPainter. This inserts the text directly into the PDF using the drawString method on the PDFGraphics2D.</p>
+<p>Text is considered simple if the font is available, the font size is useable and there are no tspans or other complications. This can make the resulting PDF significantly smaller.</p>
+<h1 id="pdf-links-pdflinks">PDF Links # {#PDF+Links}</h1>
+<p>To support links in PDF another batik element bridge is used. The PDFAElementBridge creates a PDFANode which inserts a link into the PDF document via the PDFGraphics2D.</p>
+<p>Since links are positioned on the page without any transforms then we need to transform the coordinates of the link area so that they match the current position of the a element area. This transform may also need to account for the svg being positioned on the page.</p>
+<h1 id="Images">Images</h1>
+<p>Images are normally drawn into the PDFGraphics2D. This then creates a bitmap of the image data that can be inserted into the PDF document.</p>
+<p>As PDF can support jpeg images then another element bridge is used so that the jpeg can be directly inserted into the PDF.</p>
+<h1 id="pdf-transcoder-pdftranscoder">PDF Transcoder # {#PDF+Transcoder}</h1>
+<p>Batik provides a mechanism to convert SVG into various formats. Through FOP we can convert an SVG document into a single paged PDF document. The page contains the SVG drawn as best as possible on the page. There is a PDFDocumentGraphics2D that creates a standalone PDF document with a single page. This is then drawn into by batik in the same way as with the PDFGraphics2D.</p>
+<h1 id="other-outputs-otheroutputs">Other Outputs # {#Other+Outputs}</h1>
+<p>When rendering to AWT the SVG is simply drawn onto the awt canvas using batik.</p>
+<p>The PS Renderer uses a similar technique as the PDF Renderer.</p>
+<p>The SVG Renderer simply embeds the SVG inside an svg element.</p></div></div>
+      <div class="clear"></div>
+
+	  <div id="footer">
+		<a alt="Apache Software Foundation" href="http://www.apache.org">
+		  <img id="asf-logo" alt="Apache Software Foundation" src="/images/feather-small.gif"/ width="100">
+		</a>
+		<div class="copyright">
+		  <p>
+			Copyright &copy; 2011 The Apache Software Foundation, Licensed under
+			the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.
+			<br />
+			Apache, Apache XML Graphics, the Apache feather logo, and the Apache XML Graphics logos are
+			trademarks of <a href="http://www.apache.org">The Apache Software Foundation</a>. All other
+			marks mentioned may be trademarks or registered trademarks of their respective owners.
+			<br />
+		  </p>
+		</div> 
+	  </div>
+  </body>
+</html>



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


Mime
View raw message