homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum


5+ Year Member

Msg#: 3417361 posted 10:20 pm on Aug 8, 2007 (gmt 0)

Hopefully I'm posting in the right place

I have already had my PHP answer for SEF Urls
just need to slolve the same issue for XML Spry framework

<ul spry:region="dsTowns" spry:repeatchildren="dsTowns">
<li onclick="stringForUrl" spry:select="selected" spry:hover="hover">
<div align="center"><span class="mainlevel2">
<a href="dining2.php?county={county}&amp;twn=stringForUrl{twn}">{twn}</a>

I am trying to call the folloing function stringForUrl via xml infact any link on the entire site with spaces in needs to call this function

any one any idea's?

function stringForUrl($strIn) {
$strOut = '';
$allowed = '/[^a-zA-Z0-9 ]/';
$strOut = $strIn;

// only alphanum and spaces allowed
$strOut = preg_replace($allowed, '', $strOut);

// swap spaces for _
$strOut = str_replace(' ', '_', $strOut);
$strOut = trim($strOut);

// make lower case for consistancy
$strOut = strtolower($strOut);

return $strOut;



WebmasterWorld Senior Member 10+ Year Member

Msg#: 3417361 posted 3:15 pm on Aug 9, 2007 (gmt 0)

I can't answer your question, but I hate to see posts languish without at least a ping.

I'm unfamiliar with the XML framework you are using, so I can't answer the question.

I know how to do PHP callouts in XSLTProcessor [us2.php.net].

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved