Posts

Showing posts with the label convert

XML To HTML Snippet

This John Resig post about nodeName demonstrates once again how trustfulness are edge cases in JavaScript. I must agree 100% with @jdalton : frameworks or selector libraries should not be concerned about these cases. First of all there is no universal solution so whatever effort able to slow down libraries won't be perfect, then why bother? Secondly, I cannot even understand why on earth somebody could need to adopt XML nodes in that way. Agreed that importNode or adoptNode should not be that buggy, but at the same time I have always used XSL(T) to inject XML into HTML and I have never had problems. Different Worlds In an XML document a tag is just a tag. It does not matter which name we chose or which JavaScript event we attached, XML is simply a data protocol, or transporter, and nothing else. A link, a div, an head, the html node itself, does not mean anything different in XML so again: why do we need to import in that way? In Internet Explorer we have the xml property which i...

png to gif transformation - an excellent free solution via PHP GD2

Why we still need png to gif in our web pages There a couple of valid plugins for different libraries able to manage " silently " png transparency in order to fix those browsers (cough: IE6) that are still used, for god knows which reason, but not able to understand properly the alpha channel. The problem is that these plugins cause overhead in our pages and for each png images, which is nearly a non-sense since these plugins fix old browsers whose performances have never been brilliant! Especially for modern GUIs, where little icons are widely used, these plugins could make the application incredibly slow. If we could choose old good GIF instead of png, 'till the end of those browsers, the problem will not exist and performances will be acceptable. PNG 2 GIF, simple? ... not, really! First of all a couple of search via Google brought me in " free but you have to pay anyway " applications through some open source, simple, but not that nice, program language solu...