Wednesday, June 4, 2008

call back function

Worked on tweaking a report script on clients sites that was in an infinite loop. Not exactly sure how the infinate loop got fixed but it did while I was searching for the problem. Once that was fixed I used a choose statement in the xsl so that if the test came up with NaN or 0 it would put in a dash. After that I had to find a way to find all the distinct websites in a list of website. I used this:



here the concat put a forward slash at the end of the url then the substring-after got everything after the double forward slash and the substring got everthing after the last forward slash that I put in earlier giving me aacatering.net out of http://aacatering.net.


but I still needed to make sites like aacatering.net and www.aacatering.net be the same distinct url. So I had to find a way to use a replace string function in xslt 1.0, but 1.0 does not support a replace function. Do I used a callback php function instead as you can see here:

No comments: