Hardis - Séquence de feuilletage |
---|
This library groups together several macros used to define a document in XSL-FO format. These directives must be called by specifying the namespace "hardisFo":
Pas de format |
---|
<@hardisFo.toolMacro parameters>...</@hardisFo.toolMacro>$toolMacro> ${ hardisFo.toolFunction(...) } |
...
When processing a template, running a hardisFo.foXXX macro will produce the following fragment of XSL-FO code in the result document: <fo:XXX...> ... </fo:XXX>.
Each hardisFo.foXXX macro call must be correctly nested in the right hardisFo.foXXX parent macro, as specified by the XSL-FO language.
For example, specification XSL v1.1 states that a <fo:flow> tag can only be placed inside a <fo:page-sequence> tag, so the hardisFo.foFlow macro can only be called in the nested content of a hardisFo.foPageSequence macro.
Only XSL-FO tags supported by Apache FOP 2.2 have been ported (click here for more details).
Info | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
|
hardisFo.foXXX macro naming convention.
...
The renaming rule is as follows: the XXX tag name is converted from its Kebab case notation to Camel case notation.
...
Table of correspondences:
Hardis - Tableau personnalisé | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Hardis - Haut de page |
---|
↑ Top of page |
hardisFo.foXXX macro parameter naming convention.
...
The rule states that the "." character must be converted into a "Dot" string and the ":" character must be converted into a "Colon" string. For example, "block-progression-dimension.optimum" is converted into "blockProgressionDimensionDotOptimum" and "fox:border-radius" is converted into "foxColonBorderRadius".
Example of XSL-FO document template written entirely with the macros:
Pas de format |
---|
<?xml version="1.0" encoding="utf-8"?><#> <#-- XSL-FO document using hardisFo macros --><@hardisFo> <@hardisFo.foRoot xmlns\:fox="http://xmlgraphics.apache.org/fop/extensions"><@hardisFo.foLayoutMasterSet><@hardisFo> <@hardisFo.foLayoutMasterSet> <@hardisFo.foSimplePageMaster masterName="sampleLayout" pageHeight="29.7cm" pageWidth="21cm" marginTop="2.5cm" marginBottom="2.5cm" marginLeft="1cm" marginRight="1cm"><@hardisFo> <@hardisFo.foRegionBody/><> </@hardisFo.foSimplePageMaster><foSimplePageMaster> </@hardisFo.foLayoutMasterSet><@hardisFofoLayoutMasterSet> <@hardisFo.foPageSequence masterReference="sampleLayout"><@hardisFo> <@hardisFo.foFlow flowName="xsl-region-body"><@hardisFo> <@hardisFo.foBlock fontSize="14pt" border="solid red 3pt" textAlign="center" foxColonBorderRadius="5pt"> Sample of CSS use</@hardisFo.foBlock><@hardisFo.foBlock>InfoBlock> <@hardisFo.foBlock> In this block, every inline text is <@hardisFo.foInline textTransform="uppercase">uppercase</@hardisFo.foInline><@hardisFo.foBlock>ThisfoInline> <@hardisFo.foBlock> This is the <@hardisFo.foInline textTransform="uppercase">second</@hardisFo.foInline> sentence. </@hardisFo.foBlock><@hardisFo.foBlock>ThisfoBlock> <@hardisFo.foBlock> This is the third sentence with a particular <@hardisFo.foInline id="specialText" textTransform="uppercase" color="green">inline text</@hardisFo.foInline>. </@hardisFo.foBlock><foBlock> </@hardisFo.foBlock><foBlock> </@hardisFo.foFlow><foFlow> </@hardisFo.foPageSequence><foPageSequence> </@hardisFo.foRoot> |
...
The use of hardisCSS and hardisAdv libraries in a template requires the XSL-FO document to be entirely written using hardisFo macros.
Hardis - Haut de page |
---|
↑ Top of page |
...