This project is read-only.

Splitting URLs

Nov 2, 2010 at 9:28 AM


On p. 27 of the BibWord guide, it is mentioned that one can use %URL:s% option to split long URLs. I cannot get this option to work. Am I doing something wrong?



Nov 2, 2010 at 11:50 AM

It should be working.

If you started from another stylesheet, you might be working with an older version. Check the bottom of the stylesheet to ensure that it version 2.8:

<xsl:variable name="version">

If you are working with an older version, all you have to do is copy/paste the data variable into the new stylesheet and everything should be working.

If you are working with the current version, could you send an example style + file? My mail is at the top of stylesheets normally.

Nov 2, 2010 at 1:41 PM
Edited Nov 2, 2010 at 2:13 PM

Hi Yves

I was indeed working on an older version. I have copied the data variable to a version 2.8 stylesheet and the URL split now works fine!

Is it possible to split the URLs at other characters such as ? or - in addition to /?

Thanks for your speedy response and wonderful program.



Nov 3, 2010 at 9:53 AM

Hi Yves

Is it possible to ammend the BibWord tempate to split URLs at other characters (such as ?, = or -) in addition to the split at /?


We often have very long URLs which one would preferably want to split at multiple locations. See the example below:


In this case it will be nice to be able to automatically split the URL at /, =, and + to ensure that it wraps nicely across lines.

Thanks again for your help.


Nov 3, 2010 at 12:00 PM

I never added the option for the end-user, but the functionality should be built-in. Look for the following line:

<xsl:with-param name="afterChars" select="'/'" />

Just add whatever characters you want. So something like

<xsl:with-param name="afterChars" select="'/?=-'" />
Nov 3, 2010 at 3:18 PM

It works! Fantastic!!

Thank you so much.