Andreas L. Delmelle wrote:
Hi,


I guess my former mail was not clear enough. As I said the email address
is inserted in a text provided by an user. I may not expect of them that
they put the fo:inline around the email address themselves. So to add
the fo:inline around the email address I'll have to do a search and
replace afterwards, if it's not possible to prevent the hyphenation of
email addresses in the hyphenation patterns.



Can you be more specific on the way you're constructing the FO? If it is an
option to use XML+XSLT, you wouldn't need s&r. Provided that the email
addresses are separate elements in the source XML, you could just write a
template rule to transform those elements into fo:inline's... However, as
Joerg already indicated, hyphenation props are block props, so they wouldn't
do you much good here :(

I'm using XML for input data and a XSLT Style Sheet to create the FO. Unfortenately the emailadresses are put in a common block in the input data (a free text field provided by the users of the application). But reading that the fo:inline trick won't work, I'll have to do something with hypnenation patterns.


Over to the bright(er) side then... Take a look at
http://xml.apache.org/fop/hyphenation.html#patterns

to get an idea of how to use hyphenation patterns for this. Taking into
account a limitation mentioned over there, a pattern like:

'[EMAIL PROTECTED]'

would indicate that hyphenating before or after the @ character is highly
undesirable.

Thanks for this example. I'll take a look at this page and see if I can at least get the desired result for most of the PDF's generated.


As for preventing hyphenation on the name and domain, this seems a little
more complicated, but then again, I'm no expert in this matter. Hope someone
with more experience in hyphenation patterns can comment in on this. (A
combination of the classes and exceptions might just provide you with a way
to achieve what you're after...)

As the warning on the page indicates, any feedback regarding errors/problems
that could help to make it function better is most welcome.

Hope this helps!

Greetz,

Andreas

I hope it as well, I'll get back on this subject if I've succeeded.

Thanks,

Wessel van Norel

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to