Re: [docbook-apps] db 5, para formatting, fo output
On 07/25/2011 08:51 PM, Bob Stayton wrote: Hi Dave, The feature is applied only when the link element is empty, when the stylesheet is processing the url attribute to make the displayed link text. I think that is the correct behavior, because the text content of link is arbitrary, and applying the url hyphenation process to arbitrary text could produce odd results. So use: link xlink:href=http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm/ I'll update the reference page for this parameter. Bob Stayton Sagehill Enterprises b...@sagehill.net That's it Bob. Many thanks. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
Dnia poniedziałek, 25 lipca 2011 o 17:22:00 davep napisał(a): On 07/25/2011 03:41 PM, davep wrote: Attached (if it gets through) the horrible looking result when justification is on and the line includes a url of any length. 1. I'd like to have justified text (param alignment='justified'), but if it contains a url... (Yes, not easy) or 2. How to persuade the formatter to hyphenate url's at / or similar to make it look better? Using xep Half a solution xsl:template match=d:link xsl:copy xsl:copy-of select=@*/ xsl:value-of select=replace(.,'/','/#x200b;')/ /xsl:copy /xsl:template What is the purpose of including such long URL in a printed document? Do you expect your readers to actually type it (without errors) when it is wider than the printed page? Puzzledly Chris - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
On Tue, 26 Jul 2011 22:01:31 +0200, Křištof Želechovski giecr...@stegny.2a.pl wrote: What is the purpose of including such long URL in a printed document? Do you expect your readers to actually type it (without errors) when it is wider than the printed page? PDF? - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/26/2011 04:27 PM, maxwell wrote: On Tue, 26 Jul 2011 22:01:31 +0200, Křištof Želechovski giecr...@stegny.2a.pl wrote: What is the purpose of including such long URL in a printed document? Do you expect your readers to actually type it (without errors) when it is wider than the printed page? PDF? Or even better, what if your db:link is in a table cell? In that context even a short url might need to wrap to avoid being smushed to illegibility by the fo renderer. David -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJOL5K7AAoJEMHeSXG7afUh/mMH/ic9UsveLHsqPCSqlJ9hfm7M fKDJmTOOD4/K0B6dks+XMtJk1f2G1uVXEPyAPtxR5IpSdrLLFIrzvezkPa++p3JN QU6MMP9m85hvNZJvoLhG5fgBrojRJ3HSPDyKCcrZ+3Qw84RF8CwPNYnQB7GuMwvA 8q+Mr5vEEFxh+DpSGf9XE1+c/h9SXfd1FZFnTDuiR+hImsRMzh4QjMUsBc+Ueas1 GwsowG4N+gRG/fyvtt1I8UOdNxU8zWhxVnQwsMGjXhjMVF8UF0eSma9sXjgYVW5S Cs63Q8/vdq27gU1BYNd/NoTpW5BpySpxc+K+SDW9J3WPAg9UNNVl+DpIkLuIHkw= =LqfV -END PGP SIGNATURE- - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
On 07/25/2011 03:41 PM, davep wrote: Attached (if it gets through) the horrible looking result when justification is on and the line includes a url of any length. 1. I'd like to have justified text (param alignment='justified'), but if it contains a url... (Yes, not easy) or 2. How to persuade the formatter to hyphenate url's at / or similar to make it look better? Using xep Half a solution xsl:template match=d:link xsl:copy xsl:copy-of select=@*/ xsl:value-of select=replace(.,'/','/#x200b;')/ /xsl:copy /xsl:template As a pre-process. Still looks ugly using justified text though OK when left justified. I somehow don't think I can do better than this. Any suggestions appreciated. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
Hi Dave, The DocBook XSL stylesheets can already insert zero-width spaces for long URLs. See this reference: http://www.sagehill.net/docbookxsl/Ulinks.html#BreakLongUrls Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: davep da...@dpawson.co.uk To: docbook-apps@lists.oasis-open.org Sent: Monday, July 25, 2011 8:22 AM Subject: Re: [docbook-apps] db 5, para formatting, fo output On 07/25/2011 03:41 PM, davep wrote: Attached (if it gets through) the horrible looking result when justification is on and the line includes a url of any length. 1. I'd like to have justified text (param alignment='justified'), but if it contains a url... (Yes, not easy) or 2. How to persuade the formatter to hyphenate url's at / or similar to make it look better? Using xep Half a solution xsl:template match=d:link xsl:copy xsl:copy-of select=@*/ xsl:value-of select=replace(.,'/','/#x200b;')/ /xsl:copy /xsl:template As a pre-process. Still looks ugly using justified text though OK when left justified. I somehow don't think I can do better than this. Any suggestions appreciated. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
On 07/25/2011 04:30 PM, Bob Stayton wrote: Hi Dave, The DocBook XSL stylesheets can already insert zero-width spaces for long URLs. See this reference: http://www.sagehill.net/docbookxsl/Ulinks.html#BreakLongUrls Bob Stayton Sagehill Enterprises b...@sagehill.net Thanks Bob... I think :-) I had xsl:param name=ulink.hyphenate#x200B;/xsl:param I have added xsl:param name=ulink.hyphenate.chars//xsl:param I ran that and I'm still getting squashed, long lines? src link xlink:href=http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm;http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm/link Screenshot attached? regards - Original Message - From: davep da...@dpawson.co.uk To: docbook-apps@lists.oasis-open.org Sent: Monday, July 25, 2011 8:22 AM Subject: Re: [docbook-apps] db 5, para formatting, fo output On 07/25/2011 03:41 PM, davep wrote: Attached (if it gets through) the horrible looking result when justification is on and the line includes a url of any length. 1. I'd like to have justified text (param alignment='justified'), but if it contains a url... (Yes, not easy) or 2. How to persuade the formatter to hyphenate url's at / or similar to make it look better? Using xep Half a solution xsl:template match=d:link xsl:copy xsl:copy-of select=@*/ xsl:value-of select=replace(.,'/','/#x200b;')/ /xsl:copy /xsl:template As a pre-process. Still looks ugly using justified text though OK when left justified. I somehow don't think I can do better than this. Any suggestions appreciated. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk attachment: Screenshot-1.png- To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org
Re: [docbook-apps] db 5, para formatting, fo output
Hi Dave, The feature is applied only when the link element is empty, when the stylesheet is processing the url attribute to make the displayed link text. I think that is the correct behavior, because the text content of link is arbitrary, and applying the url hyphenation process to arbitrary text could produce odd results. So use: link xlink:href=http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm/ I'll update the reference page for this parameter. Bob Stayton Sagehill Enterprises b...@sagehill.net - Original Message - From: davep da...@dpawson.co.uk To: Bob Stayton b...@sagehill.net Cc: docbook-apps@lists.oasis-open.org Sent: Monday, July 25, 2011 8:38 AM Subject: Re: [docbook-apps] db 5, para formatting, fo output On 07/25/2011 04:30 PM, Bob Stayton wrote: Hi Dave, The DocBook XSL stylesheets can already insert zero-width spaces for long URLs. See this reference: http://www.sagehill.net/docbookxsl/Ulinks.html#BreakLongUrls Bob Stayton Sagehill Enterprises b...@sagehill.net Thanks Bob... I think :-) I had xsl:param name=ulink.hyphenate#x200B;/xsl:param I have added xsl:param name=ulink.hyphenate.chars//xsl:param I ran that and I'm still getting squashed, long lines? src link xlink:href=http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm;http://money.cnn.com/magazines/fortune/fortune_archive/2004/02/23/362182/index.htm/link Screenshot attached? regards - Original Message - From: davep da...@dpawson.co.uk To: docbook-apps@lists.oasis-open.org Sent: Monday, July 25, 2011 8:22 AM Subject: Re: [docbook-apps] db 5, para formatting, fo output On 07/25/2011 03:41 PM, davep wrote: Attached (if it gets through) the horrible looking result when justification is on and the line includes a url of any length. 1. I'd like to have justified text (param alignment='justified'), but if it contains a url... (Yes, not easy) or 2. How to persuade the formatter to hyphenate url's at / or similar to make it look better? Using xep Half a solution xsl:template match=d:link xsl:copy xsl:copy-of select=@*/ xsl:value-of select=replace(.,'/','/#x200b;')/ /xsl:copy /xsl:template As a pre-process. Still looks ugly using justified text though OK when left justified. I somehow don't think I can do better than this. Any suggestions appreciated. regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk - To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org