AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML Technics

Inheritance

Top
Basic, General
About AH Formatter
About XSL Formatter
Operation
Programming
XSLT/XSL-FO/SVG/MathML Conformance
XSLT/XSL-FO/MathML Technics
Index
Q.  Please explain me how to use fo:wrapper? Especially, does fo:wrapper inhibits inheritance of non-inherited value? [No.2002030806]
A. 

fo:wrapper is convenient when you want to specify inheritable properties. For example: If you want to set the same indent in the child blocks of the fo:block-container,

<fo:block-container>
  <fo:wrapper start-indent="..." end-indent="...">
    <xsl:apply-templates/>
  </fo:wrapper>
</fo:block-container>

It is because block-container itself is indented and child of block-container is also indented, if you specify "indent" to fo:block-container instead of fo:wrapper.

Also you can specify non-inheritable property to fo:wrapper, then the child is inherited from its parent.

If the property is not specified to fo:wrapper, it is equivalent to specify default value. Then it looks as if fo:wrapper inhibits the inheritance.

<fo:flow border-before-style="solid">
  <fo:wrapper>
    <fo:block border-before-style="inherit">
      The "inherit" value is none.

<fo:flow border-before-style="solid">
  <fo:wrapper border-before-style="inherit">
    <fo:block border-before-style="inherit">
      The "inherit" value is solid.

Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.