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 May 22nd, 2004, 06:48 PM
Registered User
 
Join Date: May 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default URL encoding (why + and not %20?)

To achieve the encoding I'm using a built-in Java function available in an extension to the XSLT Processor (Xalan) as below:-

<?xml version="1.0" encoding="UFT-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common"
xmlns:encoder="xalan://java.net.URLEncoder">

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
and later in my template

/preview.xml?name=<xsl:value-of select="encoder:encode(string(title_node))"/>

The problem is, it's encoding spaces as '+' and not '%20' which I was expecting (and need).

Has anyone tried this before and does anyone think it can be fixed with the encoding?

Any advice appreciated





Similar Threads
Thread Thread Starter Forum Replies Last Post
stop master page from url encoding solos ASP.NET 2.0 Basics 2 May 16th, 2008 12:37 PM
How do i encoding a url address kevo PHP How-To 3 July 17th, 2007 03:29 AM
problem in getting rid of '+' sign in url encoding vopatel Javascript How-To 0 May 21st, 2005 11:36 AM





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