What is XSL-FO Blocks in XML

In this articles I am going to explain about XSL-FO Block in XML.
  • 1993

XSL-FO Blocks in XML

  • Block is one of the key concepts of XSL-FO.
  • The block is used to insert all possible elements, such as tables, images, lists, paragraphs.
  • XSL-Fo Block display areas in rectangular .
  • XSL-Fo Block can be nested in one another.
  • XSL-Fo Block which, as a whole, do not fit into the page or column are divided between the pages according to the given break rules.
  • In XSL-Fo Block layout information of all kinds can be linked to the <fo:block> element.
  • XSL-Fo Block has included information about the fonts, font sizes, borders, indents, colours, background colours and images, hyphenation etc. to be used.
  • XSL-Fo Block should be noted that most of these attributes are inheritable. This means that they do not necessarily have to be added to the block which contains directly the content to be set, but that they are already specified for elements which are superordinated to the given block in the stylesheet.

Example

Blocks are sequences of output in rectangular boxe

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

<fo:block border-width="1mm">

  This block of output will have a one millimeter border around it.

</fo:block>

 

The attributes being important in practice and their functional features are below

 For borders (beyond the block boundaries)

  • border-before-color, border-before-style, border-before-width, border-after-color, border-after-style, border-after-width, border-start-color, border-start-style, border-start-width, border-end-color, border-end-style, border-end-width, border-top-color, border-top-style, border-top-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, border-left-width, border-right-color, border-right-style, border-right-width

For backgrounds

  • background-attachment, background-color, background-image, background-repeat, background-position-horizontal, background-position-vertical

For line and page breaks

  • break-after, break-before, keep-together, keep-with-next, keep-with-previous

For fillings and margins (within the block boundaries)

  • margin-top, margin-bottom, margin-left, margin-right, padding-before, padding-after, padding-start, padding-end, padding-top, padding-bottom, padding-left, padding-rightpause-after, space-before, space-after

For hyphenation

  • country, hyphenate, hyphenation-character, hyphenation-push-character-count, hyphenation-remain-character-count, hyphenation-keep, hyphenation-ladder-count, language

For fonts and font styles

  • font-model, font-family, font-selection-strategy, font-size, font-stretch, font-size-adjust, font-style, font-variant, font-weight

Miscellaneous

  • color, end-indent, id, intrusion-displace, last-line-end-indent, linefeed-treatment, line-height, line-height-shift-adjustment, line-stacking-strategy, orphans, relative-position, richness, role, script, source-document, span, start-indent, text-align, text-align-last, text-altitude, text-depth, text-indent, visibility, white-space-collapse, white-space-treatment, widows, wrap-option

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.