Custom hyphenation files

John Brown <[email protected]>
Newsgroups gmane.text.xml.fop.user
Message-ID <DM3PR1101MB1181F3CE69790F9B84C87C919EA90@DM3PR1101MB1181.namprd11.prod.outlook.com>
I was tring to follow the instructions for manually installing OFFO
hyphenation files.
 https://xmlgraphics.apache.org/fop/1.0/hyphenation.html shows
how to use the source files (not the compiled fop-hyph.jar). I did the
following:

1) I renamed $FOP_HOME/lib/fop-hyph.jar.
2) I copied en_GB.xml from offo-hyphenation.zip to /path/to/book.xml
3) Added the following entry to fop.xconf:
  <hyphenation-pattern lang="en">en_GB</hyphenation-pattern>
4) Then
  cd /path/to/book.xml
  xsltproc -o book.fo xsl-ns/fo/docbook.xsl book.xml
  fop -c fop.xconf book.fo book.pdf

The result was:
INFO: Rendered page #1.
Exception in thread "main" java.lang.StackOverflowError
        at org.apache.fop.hyphenation.TernaryTree.insert(TernaryTree.java:191)
        at org.apache.fop.hyphenation.TernaryTree.insert(TernaryTree.java:244)
...    [line above repeated several times]

        at org.apache.fop.hyphenation.TernaryTree.insert(TernaryTree.java:244)

Two questions:

1) What am I doing wrong? By the way, it is fop-svn 1728886.

2) How do you choose the location of en_GB.xml? I tried setting
hyphenation-base. https://xmlgraphics.apache.org/fop/2.0/configuration.html
says that relative URIs for hyphenation-base are evaluated relative to the base
URI of the configuration file. Does that mean that mean that hyphenation-base
would have to be set to ../<back-to-root>/full/path/to/en_GB-location?

For what it is worth, I set <hyphenation-base>.</hyphenation-base>.

Regards,
John Brown.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.