RE: [xsl] to generate a HOT-LINK in the HTML and FO outputs for all text that matches http://... URL syntax
Subject: RE: [xsl] to generate a HOT-LINK in the HTML and FO outputs for all text that matches http://... URL syntax|
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Thu, 18 Sep 2003 13:27:16 -0400
Don't forget, when you do this,
At 05:41 AM 9/18/2003, Jarno wrote:
Write a template for text nodes, which tests if the text contains the
string 'http://' and then using XPath string manipulation functions
replace the link text with an element that contains the link. Write a
recursive one, so that if a single text node contains multiple URLs, all
to take account of such cases as http://www.mulberrytech.com/quickrefs.
Note the period at the end of that URL is not part of it.
Check out the stuff at exslt.org for hints (they have some nice templates
and you might be able to just use em).
Note: this is a classic case of "up-conversion", pushing information up
hill, for which XSLT 1.0 was not designed. XSLT 2.0 will have more powerful
features for this kind of thing.
This stuff is also well covered by Jeni Tennison's book "XSLT on the Edge".
You might want to check it out.
"Thus I make my own use of the telegraph, without consulting
the directors, like the sparrows, which I perceive use it
extensively for a perch." -- Thoreau
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list