General discussion

Locked

XML/XSL and URL encoding for links

By KeifR ·
I have links with spaces in them (which, of course, Netscape hates). How would I feed a path (with spaces) into the xsl template and have it encode the path/url so that Netscape doesn't complain about it? (similar to Server.URLEncode function in ASP)
As it exists now (name has spaces within):
<a href="PDFfiles/{name} {type}.pdf">
<xsl:value-of select="name"/>
</a>

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

use URL encode value

by shelleydoll In reply to XML/XSL and URL encoding ...

You can try replacing spaces with the URL encode value %20 before feeding it into the xsl template using JavaScript or some other nonsense. IE and other browsers should be able to interpret it that way as well. Your other option is to change the link in question to be URL encoded from the get go.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums