Hi Thomas,
Thanks for advising, and for the hyphenate-url.xsl template! Minor
question below.
On Mon, 26 Nov 2012 15:09:24 +0100
Stefan Hinz <[email protected]> wrote:
Does anyone have experience using ​ -- the Unicode "zero-width
space" character (see
http://www.fileformat.info/info/unicode/char/200b/index.htm)?
Yes. :)
[...]
I presume the idea is to have a character that has no visible effect
within a keyword, but allows it to be split across lines anyway.
Personally, I don't like invisible things like this that could get in
the way of grepping through the source.
Any other pros and cons? Maybe other/better ways to work around the
problem?
I had the same concerns with grepping through the sources.
For URLs, the solution is very easy. Use the following two parameters:
* $ulink.hyphenate
Set it to the ZERO WIDTH SPACE character (​ or ​). By
default, it is empty.
* $ulink.hyphenate.chars
Defines which characters are considered to contain the ZWS after
that character. By default, it's "/", but you could extend it with
other characters like "_", "-", "&", ...
These two parameters are used in the "hyphenate-url" template. This
template goes through the string and checks each character, if it's in
the set of $ulink.hyphenate.chars. You could use this template as a
base for your <option> template.
Any experience with performance impacts? I'm asking because we have
quite a few options that would get parsed:
~/svn/mysqldoc> grep -R "<option" | wc -l
65219
You can find an example of my modification of hyphenate-url in the daps
repository. I needed a finer control which characters should contain the
ZWS before or after that character. You can find the code here:
https://svn.code.sf.net/p/daps/svn/trunk/daps/suse/xslt/fo/hyphenate-url.xsl
Hope this helps. :)
Sure, thanks again!
--
Cheers,
Stefan Hinz <[email protected]>, MySQL Documentation Manager
Phone: +49-30-82702940, Fax: +49-30-82702941, http://dev.mysql.com/doc
ORACLE Deutschland B.V.& Co. KG
Registered Office: Riesstr. 25, 80992 Muenchen, Germany
Commercial Register: Local Court Of Munich, HRA 95603
Managing Director: Jürgen Kunz
General Partner: ORACLE Deutschland Verwaltung B.V.
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
Register Of Chamber Of Commerce: Midden-Niederlande, No. 30143697
Managing Directors: Alexander van der Ven, Astrid Kepper, Val Maher
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]