Welcome to WebmasterWorld Guest from 23.22.46.195

Forum Moderators: httpwebwitch

XML SEF URLs

   
10:20 pm on Aug 8, 2007 (gmt 0)

5+ Year Member



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>
</span></div>
</li>
</ul>

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;
}

3:15 pm on Aug 9, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



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].

 

Featured Threads

Hot Threads This Week

Hot Threads This Month