What is the XSL-FO Page, Flow, and Block in XML

- In this article I will Define the XSL-FO Page, Flow, and Block in XML
  • 2487

XSL-FO Page, Flow, and Block

"Blocks" of content "Flows" into "Pages" and then to the output media.

  • XSL-FO output is normally nested inside <fo:block> elements

  • <fo:block> elements is normally nested inside <fo:flow> elements,

  • <fo:flow> elements is normally nested inside <fo:page-sequence> elements

<?xml version="1.0" encoding="utf-8" ?>

<fo:page-sequence>

     <fo:flow flow-name="xsl-region-body">

       <fo:block>

           <!-- welcome to user --> 

  </fo:block>      

</fo:flow>   

</fo:page-sequence>

XSL-FO Example

I will explain XSL-FO with an example

<?xml version="1.0" encoding="iso-8859-1"?>

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <fo:layout-master-set>

      <fo:simple-page-master master-name="A4">

          <fo:region-body />

         </fo:simple-page-master>

  </fo:layout-master-set>

  <fo:page-sequence master-reference="A4">

      <fo:flow flow-name="xsl-region-body">

          <fo:block>MCN SOLUTION PVT LTD</fo:block>

      </fo:flow>

  </fo:page-sequence>

</fo:root>

 

Output

 

MCN SOLUTION PVT LTD

Further Readings

You may also want to read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.