xsl-list
[Top] [All Lists]

RE: Empty spaces turn to %20

2003-03-28 08:36:37
[m: Jarkko(_dot_)Moilanen(_at_)uta(_dot_)fi]

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



<Prev in Thread] Current Thread [Next in Thread>