Products Downloads


French version


Comparaison des versions

Légende

  • Ces lignes ont été ajoutées. Ce mot a été ajouté.
  • Ces lignes ont été supprimées. Ce mot a été supprimé.
  • La mise en forme a été modifiée.

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
iconfalse

Sommaire
maxLevel4
minLevel4
classminitoc
separator|

 


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é
alternateColorstrue
marginLeft30px

XSL-FO tag

hardisFO macro

basic-link

hardisFo.foBasicLink

bidi-override

hardisFo.foBidiOverride

block

hardisFo.foBlock

block-container

hardisFo.foBlockContainer

bookmark

hardisFo.foBookmark

bookmark-title

hardisFo.foBookmarkTitle

bookmark-tree

hardisFo.foBookmarkTree

character

hardisFo.foCharacter

color-profile

hardisFo.foColorProfile

conditional-page-master-reference

hardisFo.foConditionalPageMasterReference

declarations

hardisFo.foDeclarations

external-graphic

hardisFo.foExternalGraphic

float

hardisFo.foFloat

flow

hardisFo.foFlow

footnote

hardisFo.foFootnote

footnote-body

hardisFo.foFootnoteBody

inline

hardisFo.foInline

inline-container

hardisFo.foInlineContainer

instream-foreign-object

hardisFo.foInstreamForeignObject

layout-master-set

hardisFo.foLayoutMasterSet

leader

hardisFo.foLeader

list-block

hardisFo.foListBlock

list-item

hardisFo.foListItem

list-item-body

hardisFo.foListItemBody

list-item-label

hardisFo.foListItemLabel

marker

hardisFo.foMarker

multi-case

hardisFo.foMultiCase

multi-switch

hardisFo.foMultiSwitch

page-number

hardisFo.foPageNumber

page-number-citation

hardisFo.foPageNumberCitation

page-number-citation-last

hardisFo.foPageNumberCitationLast

page-sequence

hardisFo.foPageSequence

page-sequence-master

hardisFo.foPageSequenceMaster

region-after

hardisFo.foRegionAfter

region-before

hardisFo.foRegionBefore

region-body

hardisFo.foRegionBody

region-end

hardisFo.foRegionEnd

region-start

hardisFo.foRegionStart

repeatable-page-master-alternatives

hardisFo.foRepeatablePageMasterAlternatives

repeatable-page-master-reference

hardisFo.foRepeatablePageMasterReference

retrieve-marker

hardisFo.foRetrieveMarker

retrieve-table-marker

hardisFo.foRetrieveTableMarker

root

hardisFo.foRoot

simple-page-master

hardisFo.foSimplePageMaster

single-page-master-reference

hardisFo.foSinglePageMasterReference

static-content

hardisFo.foStaticContent

table

hardisFo.foTable

table-body

hardisFo.foTableBody

table-cell

hardisFo.foTableCell

table-column

hardisFo.foTableColumn

table-footer

hardisFo.foTableFooter

table-header

hardisFo.foTableHeader

table-row

hardisFo.foTableRow

title

hardisFo.foTitle

wrapper

hardisFo.foWrapper

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

...