Technologies XML / XSL-FO / Référence / Extensions XSL d’Antenna House Formatter / Éléments / hyphenation-info
(Extrait de «XSL-FO ― La Référence » de Manuel Montero Pineda & Steffen Herkert, 2016, dpunkt.verlag)
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Catégorie Extensions de coupure des mots
Usage courant : | Définit des informations de coupure supplémentaires. Cet élément ne génère pas d’arbre d’aires. Cette fonction n’est pas disponible en CSS. Elle n’est pas disponible avec AH Formatter V6.3 Lite. [no-LT] | ||
Aires : | Aucune. | ||
Contraintes : | <!ELEMENT axf:hyphenation-info (%axh-elements;)*> <!ATTLIST axf:hyphenation-info language CDATA #REQUIRED> <!ATTLIST axf:hyphenation-info src CDATA #IMPLIED> L’élément d’extension axf:hyphenation-info peut être répété autant de fois que souhaité directement sous fo:declarations.
| ||
Contenu : | %axs-settings; est un élément de l’espace de noms http://www.antennahouse.com/names/XSL/Hyphenations. Les éléments du dictionnaire d’exceptions de coupure sont inclus dans cet espace, mais seuls <exceptions> et son enfant <hyphen> sont actuellement acceptés. | ||
Exemples : | <fo:declarations> <axf:hyphenation-info language="eng" src="en-add.xml" xmlns:axh="http://www.antennahouse.com/names/XSL/Hyphenations"> <axh:exceptions> abc-defg </axh:exceptions> </axf:hyphenation-info> </fo:declarations> Ici, en-add.xml est indiqué comme dictionnaire supplémentaire anglais et une coupure exceptionnelle est définie pour le mot abcdefg.
|
Exemple XSL-FO :
<fo:root font-size="12pt" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:cpfo="http://www.compart.net/xmlns/cpfo" xmlns:svg="http://www.w3.org/2000/svg" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions">
<axf:document-info name="author" value="Alex Critchfield, Antenna House"/>
<axf:document-info name="keywords" value="extensions, document-info"/>
<axf:document-info name="subject" value="document-info extension"/>
<axf:document-info name="title" value="document-info extension demonstration"/>
<fo:layout-master-set>
<fo:simple-page-master page-width="8.5in" page-height="11in" master-name="main">
<fo:region-body region-name="body" margin-top="1in" margin-bottom="1in" margin-left=".75in" margin-right=".75in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:declarations>
<axf:hyphenation-info language="en">
abcd-efg
</axf:hyphenation-info>
</fo:declarations>
<fo:page-sequence master-reference="main">
<fo:flow flow-name="body">
<fo:block>
This FO has a declaration section that changes the hyphenation configuration when it is formatted but only for this document. This document has a hyphenation rule for the word "abcdefg" to hyhpenate after the "d".
<fo:block-container space-before="5mm" space-after="5mm" padding="5pt" border="2pt solid blue" width="1in">
<fo:block>
no hyphenation
<fo:block/>
abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg
</fo:block>
</fo:block-container>
<fo:block-container space-before="5mm" space-after="5mm" padding="5pt" border="2pt solid blue" width="1in" hyphenate="true" language="en">
<fo:block>
with hyphenation
<fo:block/>
abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg
</fo:block>
</fo:block-container>
<fo:block space-before="5mm" font-family="monospace" white-space-treatment="preserve" linefeed-treatment="preserve">
<fo:declarations> <axf:hyphenation-info language="en" xmlns:axh="http://www.antennahouse.com/names/XSL/Hyphenations"> <axh:exceptions> abcd-efg </axh:exceptions> </axf:hyphenation-info></fo:declarations>
</fo:block>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>Sortie :