RE: [xsl] Empty spaces turn to %20

Subject: RE: [xsl] Empty spaces turn to %20
From: "Passin, Tom" <tpassin@xxxxxxxxxxxx>
Date: Fri, 28 Mar 2003 10:36:37 -0500
[m: Jarkko.Moilanen@xxxxxx]

> I am getting data from html form, which has text input fields. 
> I pass the QUERY_STRING to sh script which turns it in to 
> XML. Then I transform the XML to html with XSLT. 
> 
> Problem is how ever that the browser generates %20 to every 
> empty space. 
> 
> Now I have XMl which looks like this:
> <Publication>
> <Author>Firstname%20Lastname</Author>
> <Pubname>Text%20with%20spaces</Pubname>
> </Publication>
> 
> Any change with XSLT to get rid of these %20's in the 
> text parts?
> 

That is normal, depending on the settings you have established for the
form.  It is called url encoding.  You should fix the spaces up in your
shell script while creating the xml.  You could do it in xslt using a
recursive template - and there should be enough threads about similar
string conversions like this in the last week to show you how (or look
through the FAQs) - but the shell script would be easier.

Cheers,

Tom P

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread