<axf:hyphenation-info>

(Auszug aus "XSL-FO ― Die Referenz" von 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

Category Extension for Hyphenations

Common Usage:Specifies additional hyphenation information. This element doesn't generate the area tree. This feature is not available in CSS. This feature is not available with AH Formatter V6.3 Lite. [no-LT]
Areas:None.
Constraints:

<!ELEMENT axf:hyphenation-info (%axh-elements;)*> <!ATTLIST axf:hyphenation-info language CDATA #REQUIRED> <!ATTLIST axf:hyphenation-info src CDATA #IMPLIED>

The axf:hyphenation-info extension element can be set as many as you want right under fo:declarations.
The language property is indispensable to indicate which language this element is associated with. It is not available to do hyphenation if the specified language is originally not hyphenated. This setting is invalid for Thai.
The src property can optionally specify the exception dictionary. It's an additional setting to the original dictionary and effective only in this FO. There is no language dependency constraint for the file name unlike the original dictionary. It is a relative base-uri for the relative path. It's not a relative path to the environment valuable of the hyphenation dictionary. <exceptions> in the specified dictionary is evaluated. When multiple words of the same spelling are registered, the information on the last registered word becomes effective.
Contents:%axs-settings; is an element which belongs to the name space http://www.antennahouse.com/names/XSL/Hyphenations. The elements in the Hyphenation Exception Dictionary are included in the name space, however currently only <exceptions> (and its child element, <hyphen>) can be described.
Examples:

<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>

In this example, an additional exception dictionary, en-add.xml is specified for English language, and then the exception hyphenation is specified for the word spelled abcdefg.
CAUTION:In the example above, do not use the following setting. (<hyphen/> is disregarded.)

abc<hyphen/>defg

Instead, please make sure to specify

abc<axh:hyphen/>defg

XSL-FO sample:

<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">

abcd-efg

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".

no hyphenation

abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg

with hyphenation

abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg abcdefg

<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>

Download der Beispiele

Output:

Tipp der data2type-Redaktion:
Zum Thema XSL-FO bieten wir auch folgende Schulungen zur Vertiefung und professionellen Fortbildung an: