?? - XSL-FO XHTML - XSL-FO - Block and Inline Areas

 31 December 18:00   

    



    



    

XSL-FO Archetype - simple_page.fo

    



    

Let s administer what we accept abstruse so far to make a simple XSL-FO example

    

file to allegorize how to handle some basal formatting appearance like:

    

page margin, branch spacing, chantry ancestors and size, page attack and footer,

    

etc.

    

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

    

<!-- simple_page.fo

    

Absorb (c) 2002 by Dr. Yang

    

-->

    

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

    

<fo:layout-master-set>

    

<fo:simple-page-master master-name="simple_page" margin="0.5in">

    

<fo:region-before region-name="header" extent="0.5in"

    

background-color="#cfcfcf" display-align="after"/>

    

<fo:region-after region-name="footer" extent="0.5in"

    

background-color="#cfcfcf" display-align="before"/>

    

<fo:region-body region-name="body" margin="1.0in"

    

background-color="#cfcfcf"/>

    

</fo:simple-page-master>

    

</fo:layout-master-set>

    

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

    

<fo:static-content flow-name="header"

    

font-family="sans-serif" font-size="12pt" font-style="normal">

    

<fo:block border-bottom-width="2px" border-bottom-style="solid"

    

text-align="end">Introduction to XSL</fo:block>

    

</fo:static-content>

    

<fo:static-content flow-name="footer"

    

font-family="sans-serif" font-size="12pt" font-style="italic">

    

<fo:block border-top-width="1px" border-top-style="solid"

    

text-align="end">The argument is affected from XSL blueprint by W3C

    

</fo:block>

    

</fo:static-content>

    

<fo:flow flow-name="body"

    

font-family="serif" font-size="18pt" font-style="normal"

    

font-weight="normal">

    

<fo:block padding-before="12pt" padding-after="6pt"

    

font-size="150%" font-weight="bold"

    

background-color="#afafaf">Introduction to XSL</fo:block>

    

<fo:block padding-before="9pt" padding-after="3pt"

    

text-indent="0.5in" text-align="justify">

    

This blueprint defines the Adaptable Stylesheet Accent (XSL).

    

XSL is a accent for cogent stylesheets. Accustomed a chic of

    

arbitrarily structured XML [XML] abstracts or data files, designers

    

use an XSL stylesheet to accurate their intentions about how that

    

structured agreeable should be presented; that is, how the antecedent content

    

should be styled, laid out, and paginated assimilate some presentation

    

medium, such as a window in a Web browser or a hand-held device,

    

or a set of concrete pages in a catalog, report, pamphlet, or book.

    

</fo:block>

    

<fo:block padding-before="12pt" padding-after="3pt"

    

font-weight="bold">Processing a Stylesheet</fo:block>

    

<fo:block padding-before="9pt" padding-after="3pt"

    

text-indent="0.5in" text-align="justify">

    

An XSL stylesheet processor accepts a certificate or data in XML and an XSL

    

stylesheet and produces the presentation of that XML antecedent agreeable that

    

was advised by the artist of that stylesheet. There are two aspects

    

of this presentation process: first, amalgam a aftereffect timberline from the

    

XML antecedent timberline and second, interpreting the aftereffect timberline to aftermath

    

formatted after-effects acceptable for presentation on a display, on paper, in

    

speech, or assimilate additional media. The first aspect is alleged timberline

    

transformation and the additional is alleged formatting. The action of

    

formatting is performed by the formatter. This formatter may artlessly be

    

a apprehension engine central a browser.

    

</fo:block>

    

<fo:block padding-before="9pt" padding-after="3pt"

    

text-indent="0.5in" text-align="justify">

    

Tree transformation allows the anatomy of the aftereffect timberline to be

    

significantly altered from the anatomy of the antecedent tree. For

    

example, one could add a table-of-contents as a filtered alternative of

    

an aboriginal antecedent document, or one could adapt antecedent data into

    

sorted collapsed presentation. In amalgam the aftereffect tree, the tree

    

transformation action aswell adds the advice all-important to architecture

    

that aftereffect tree.

    

</fo:block>

    

</fo:flow>

    

</fo:page-sequence>

    

</fo:root>

    



    



    

If you use FOP to catechumen simple_page.fo to PDF:

    

 run_fop -fo simple_page.fo -pdf simple_page.pdf

    



    



    

Exam this 2-page PDF achievement carefully, you will see:

    



        

  • The background-color aspect at the block akin overrides the aforementioned attribute

        

    at the arena level. See the first block of the physique region.

        



  •     

  • The border-bottom-x attributes in the argument block of the attack arena accord

        

    a acceptable solid band in the attack area. But it is not what I want. I wish a solid

        

    line at the basal bend of the attack region. I accept no abstraction on how to do that.

        



  •     

  • The display-align="after" doesn t plan in region-before with FOP (Could be a bug).

        

    The attack argument is still adjust to the top edge.



  •     



    



    

 


Tags: simple, content, block, process, family, presentation, color, solid, align, display, border, background, source, normal, formatting, result

 block, region, padding, simple, align, header, source, master, content, border, background, stylesheet, presentation, style, result, color, solid, static, family, display, formatting, margin, process, footer, indent, serif, weight, cfcfcf, normal, justify, , simple page, block <, block padding, padding after, result tree, padding before, text align, background color, static content, font size, font family, 3pt text, text indent, align justify, xsl stylesheet, 9pt padding, 5in text, color cfcfcf, font style, serif font, border bottom, display align, flow name, font weight, region name, block padding before, serif font size, 9pt padding after, 3pt text indent, text align justify, 5in text align, background color cfcfcf, font style normal, solid text align, style solid text, font weight bold, 12pt font style, 12pt padding after, padding before 12pt, font size 12pt, display align after, cfcfcf display align, color cfcfcf display, 5in background color, static content flow, content flow name, simple page master, sans serif font, family sans serif, font family sans, size 12pt font,

Share ?? - XSL-FO XHTML - XSL-FO - Block and Inline Areas:
Digg it!   Google Bookmarks   Del.icio.us   Yahoo! MyWeb   Furl  Binklist   Reddit!   Stumble Upon   Technorati   Windows Live   Bookmark

Text link code :
Hyper link code:

Also see ...

Permalink
Article In : Computers & Technology  -  xhtml