[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: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 18 Sep 2003 12:41:07 +0300
generate multiple urls
Hi,

> Can anyone suggest a small stylesheet/piece of code that 
> generates a hot
> link for any and every piece of content being transformed by the XSL
> into HTML as well as FO?
> 
> I do know what tags are to be created.
> 
> The issue is I DO NOT KNOW where in the content for the entire 50 page
> document these http:// will occur.
> 
> They can be immersed anywhere in the content in any node, at 
> any level,
> in any ELEMENT of the tree. (not in attributes).
> 
> At the moment the output into HTML is as plain text http://...
> 
> How can I write a stylesheet that ca EASILY plug-in to the current
> stylesheets and find and process those parts of the content 
> from a plain
> vanilla http://xxxxxxx to <a href = "http://xxxxx>http://xxxxx</a> 
> 
> That kind of processing template/function/expression ??

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. Come back to us if you have problems in writing the stylesheet.

Cheers,

Jarno

 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.