Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 17th, 2009, 12:55 AM
Registered User
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default URL Encode in XSL

Hi,
I am trying to encode a url passed in a hyperlink
Code:
<a href="history.aspx?url=http://www.abc.com/test.aspx?par1=1&par2=2">History link</A>
the value of url parameter need to be encoded, please share if any way to do it.

I am using xslt 1.0 -
Code:
<?xml version="1.0" encoding="utf-8"?>
 
Old November 17th, 2009, 06:12 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

There's no function to perform URL encoding in XSLT 1.0. You'll either have to code it the hard way, call an extension function, or switch to XSLT 2.0.

But googling for the answer may help: see for example the thread at http://www.biglist.com/lists/xsl-lis...ads.html#00028
__________________
Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer\'s Reference





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL Code Help - Passing RSS URL pratima82 XSLT 5 February 24th, 2009 06:32 AM
URL encode problem mat41 Classic ASP Professional 3 August 23rd, 2006 07:46 AM
URL variables in XSL Pinguin89 XSLT 1 March 16th, 2006 10:57 AM
Extrac URL from in the XSL file MM_lost XSLT 4 January 13th, 2006 05:54 AM
URL Encode ashwin_f16 VBScript 0 September 18th, 2003 01:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.