XML
  Home arrow XML arrow Page 2 - Using Regions with XSL Formatting Objects
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

Using Regions with XSL Formatting Objects
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 2
    2009-06-02

    Table of Contents:
  • Using Regions with XSL Formatting Objects
  • Defining Additional Regions
  • Placing Content Within Regions
  • A Short Example

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Regions with XSL Formatting Objects - Defining Additional Regions


    (Page 2 of 4 )

     

    Now let's take a look at the other regions available, one at a time. 

    The next region we'll take a look at is the top region. The top region is placed, of course, on the top of the page. This is a page's header. In the case of a page out of a book, the name of the book or chapter might go here.

    In order to define this region, the region-before tag is used (this may seem odd, since the area it refers to is more intuitively called the top of the page or the header, but the region contains the content "before" everything else). This tag goes inside of the page master definition, just like the body region definition, but it must be placed after the body region's definition. This holds true for all non-body regions.

    Here's a basic example of a master page with two region definitions, one for the body region and one for the top region: 

    <fo:region-before />

     The default name for the top region is "xsl-region-before." 

    The next logical step here, since we just looked at the top region, is to look at the bottom region. This region is traditionally called the page's footer. The corresponding tag, however, is called region-after, since the region is located after the other regions. Here's an example definition: 

    <fo:region-after />

    The default name for the bottom region is "xsl-region-after." 

    We've now looked at the regions corresponding to the top and bottom of a page. We can also place text on the left and right sides of a page. The region on the left of a page is the left region, and it's defined using the region-start tag: 

    <fo:region-start />

    Its default name is, of course, "xsl-region-start." 

    The region on the right of a page is the right region, and it's defined using the region-end tag: 

    <fo:region-end />

     As expected, "xsl-region-end" is the default name. 

    Like the top and bottom regions, the names of the left and right regions may seem a bit non-intuitive, but they might make sense if we take a look at exactly where the regions are located on the page. The top region is located before all other regions, and the bottom region is located after all other regions. So, the left and right regions are both located entirely between the top and bottom regions. Think of them as the start and end of this middle section of the page. 

    More XML Articles
    More By Peyton McCullough


     

    XML ARTICLES

    - Using Regions with XSL Formatting Objects
    - Using XSL Formatting Objects
    - More Schematron Features
    - Schematron Patterns and Validation
    - Using Schematron
    - Datatypes and More in RELAX NG
    - Providing Options in RELAX NG
    - An Introduction to RELAX NG
    - Path, Predicates, and XQuery
    - Using Predicates with XQuery
    - Navigating Input Documents Using Paths
    - XML Basics
    - Introduction to XPath
    - Simple Web Syndication with RSS 2.0
    - Java UI Design with an IDE







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek