[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: to generate a HOT-LINK in the HTML and FO outputs

Subject: RE: 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
generate link
Abhishek,

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 get transformed.

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.

Cheers,
Wendell


___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.