You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vm...@apache.org on 2003/04/22 06:54:55 UTC

cvs commit: xml-fop/src/documentation/content/xdocs/design/understanding book.xml fo_tree.xml

vmote       2003/04/21 21:54:55

  Modified:    src/documentation/content/xdocs/design book.xml fotree.xml
               src/documentation/content/xdocs/design/understanding
                        book.xml
  Removed:     src/documentation/content/xdocs/design/understanding
                        fo_tree.xml
  Log:
  Move content from design/understanding/fo_tree.xml to design/fotree.xml.
  
  Revision  Changes    Path
  1.15      +0 -1      xml-fop/src/documentation/content/xdocs/design/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/design/book.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- book.xml	22 Apr 2003 03:48:50 -0000	1.14
  +++ book.xml	22 Apr 2003 04:54:54 -0000	1.15
  @@ -25,7 +25,6 @@
       <menu label="Understanding">
         <menu-item label="Introduction" href="understanding/index.html"/>
         <menu-item label="XML Parsing" href="understanding/xml_parsing.html"/>
  -      <menu-item label="FO Tree" href="understanding/fo_tree.html"/>
       </menu>
       <menu label="Extras">
         <menu-item label="Images" href="understanding/images.html"/>
  
  
  
  1.5       +121 -4    xml-fop/src/documentation/content/xdocs/design/fotree.xml
  
  Index: fotree.xml
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/design/fotree.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- fotree.xml	2 Jan 2003 12:59:30 -0000	1.4
  +++ fotree.xml	22 Apr 2003 04:54:54 -0000	1.5
  @@ -15,18 +15,28 @@
   <section>
     <title>Introduction</title>
   <p>
  -The FO Tree is an internal representation of the input FO document.
  -The tree is created by building the elements and attributes from
  -the SAX events.
  +The FO Tree is an internal representation of the input XSL-FO document.
  +The tree is created by building the elements and attributes from the SAX events.
  +The process of building the FO Tree corresponds to the <strong>Objectify</strong> step from the spec.
  +The <strong>Refinement</strong> step is part of reading and using the properties which may happen immediately or during the layout process.
  +
     </p>
     <p>
   The FO Tree is used as an intermediatory structure which is converted
   into the area tree. The complete FO tree should not be held in memory
   since FOP should be able to handle FO documents of any size.
      </p>
  +      <p>
  +        The FO Tree is simply a heirarchy of java objects that
  +        represent the fo elements from xml. The traversal is done by
  +        the layout or structure process only in the flow elements.
  +      </p>
   
   <section>
     <title>FONode</title>
  +<p>The base class for all objects in the tree is FONode. The base class for
  +all FO Objects is FObj.</p>
  +
   <p>
   The class inheritance described above only describes the nature of the
   content. Every FO in FOP also has a parent, and a Vector of children. The
  @@ -38,16 +48,58 @@
   FONode, among other things, ensures that FO's have a parent and that they
   may have children.
   </p>
  +<p>Each xml element is represented by a java object. For pagination the
  +classes are in <code>org.apache.fop.fo.pagination.*</code>, for elements in the flow
  +they are in <code>org.apache.fop.fo.flow.*</code> and some others are in
  +<code>org.apache.fop.fo.*.</code></p>
  +
   </section>
   
   <section>
     <title>Making FO's</title>
  +<p>There is a class for each element in the FO set. An object is created for
  +each element in the FO Tree. This object holds the properties for the FO
  +Object.</p>
  +<p>Some validity checking is done during these steps. The user can be warned of the error and processing can continue if possible.
  +</p>
  +      <p>
  +        When the object is created it is setup. It is given its
  +        element name, the FOUserAgent - for resolving properties
  +        etc. - the logger and the attributes. The methods
  +        <code>handleAttributes()</code> and
  +        <code>setuserAgent()</code>, common to <code>FONode</code>,
  +        are used in this process. The object will then be given any
  +        text data or child elements.  Then the <code>end()</code>
  +        method is called.  The end method is used by a number of
  +        elements to indicate that it can do certain processing since
  +        all the children have been added.
  +      </p>
  +
   <p>
   An FO maker is read from a hashmap lookup using the namespace and
   element name. This maker is then used to create a new class that
   represents an FO element. This is then added to the FO tree as a child
   of the current parent.
   </p>
  +</section>
  +
  +<section>
  +  <title>Properties</title>
  +
  +<p>The XML attributes on each element are passed to the object. The objects
  +that represent FO objects then convert the attributes into properties.
  +</p>
  +
  +<p>Since properties can be inherited the PropertyList class handles resolving
  +properties for a particular element.
  +All properties are specified in an XML file. Classes are created
  +automatically during the build process.
  +</p>
  +
  +<p>In some cases the element may be moved to have a different parent, for
  +example markers, or the inheritance could be different, for example
  +initial property set.</p>
  +</section>
   
   <p>
   Properties (recall that FO's have properties, areas have traits, and XML
  @@ -88,7 +140,72 @@
   </p>
   </section>
   
  -  </section>
  +<section>
  +  <title>Foreign XML</title>
  +
  +<p>The base class for foreign XML is XMLObj. This class handles creating a
  +DOM Element and the setting of attributes. It also can create a DOM
  +Document if it is a top level element, class XMLElement.
  +This class must be extended for the namespace of the XML elements. For
  +unknown namespaces the class is UnknowXMLObj.</p>
  +
  +<p>If some special processing is needed then the top level element can extend
  +the XMLObj. For example the SVGElement makes the special DOM required for
  +batik and gets the size of the svg.
  +</p>
  +
  +<p>Foreign XML will usually be in an fo:instream-foreign-object, the XML will
  +be passed to the render as a DOM where the render will be able to handle
  +it. Other XML from an unknwon namespace will be ignored.
  +</p>
  +
  +<p>By using element mappings it is possible to read other XML and either</p>
  +<ul><li>set information on the area tree</li>
  +<li>create pseudo FO Objects that create areas in the area tree</li>
  +<li>create FO Objects</li></ul>
  +</section>
  +
  +<section>
  +  <title>Unknown Elements</title>
  +<p>If an element is in a known namespace but the element is unknown then an
  +Unknown object is created. This is mainly to provide information to the
  +user.
  +This could happen if the fo document contains an element from a different
  +version or the element is misspelt.</p>
  +</section>
  +
  +<section>
  +  <title>Page Masters</title>
  +        <p>
  +          The first elements in a document are the elements for the
  +          page master setup. This is usually only a small number and
  +          will be used throughout the document to create new pages.
  +          These elements are kept as a factory to create the page and
  +          appropriate regions whenever a new page is requested by the
  +          layout. The objects in the FO Tree that represent these
  +          elements are themselves the factory. The root element keeps
  +          these objects as a factory for the page sequences.
  +        </p>
  +</section>
  +
  +<section>
  +  <title>Flow</title>
  +<p>The elements that are in the flow of the document are a set of elements
  +that is needed for the layout process. Each element is important in the
  +creation of areas.</p>
  +</section>
  +
  +<section>
  +  <title>Other Elements</title>
  +
  +        <p>
  +          The remaining FO Objects are things like page-sequence,
  +          title and color-profile. These are handled by their parent
  +          element; i.e. the root looks after the declarations and the
  +          declarations maintains a list of colour profiles.  The
  +          page-sequences are direct descendents of root.
  +        </p>
  +      </section>
   
       </body>
   </document>
  
  
  
  1.8       +0 -1      xml-fop/src/documentation/content/xdocs/design/understanding/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/documentation/content/xdocs/design/understanding/book.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- book.xml	22 Apr 2003 03:48:50 -0000	1.7
  +++ book.xml	22 Apr 2003 04:54:55 -0000	1.8
  @@ -29,7 +29,6 @@
       <menu label="Understanding">
         <menu-item label="Introduction" href="index.html"/>
         <menu-item label="XML Parsing" href="xml_parsing.html"/>
  -      <menu-item label="FO Tree" href="fo_tree.html"/>
       </menu>
       <menu label="Extras">
         <menu-item label="Images" href="images.html"/>
  
  
  

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