XHTML Validation with the W3C validator and PHP
by Pascal Opitz on January 4 2009, 12:25
Amongst other changes, I am working on getting this blog over to use application/xhtml+xml as the content type. Of course this calls for a much stricter validation before content can be put live, otherwise users will be confronted with a broken page. The W3C validator and Zend_Http_Client make validation in PHP easy.
Conditional get in PHP - with some problems on the way
by Pascal Opitz on January 1 2009, 18:05
Happy new year everyone. If you're anything like me, the credit crunch doomsday news and the gross overeating of the past festivities make you want to slim down and become more resourceful. Using Caching, ETags and the 304 HTTP code can help to cut down on traffic. But working on a conditional get came with some problems ...
Merry Xmas everyone
by Pascal Opitz on December 19 2008, 13:21
Now that the year has come to an end, I just wanted to wish everyone a merry merry christmas.
A mass validation shellscript
by Pascal Opitz on December 14 2008, 19:45
I was looking for a CLI script that validates a whole site for me, but I couldn't find one that would work without installation issues. So I hacked together an example shell script that does the job for me by downloading the whole site and then running the files through a validation.
A quick look at XInclude and XLink
by Pascal Opitz on December 13 2008, 16:47
Part of my current project is to transform thousands of static XML files, all interlinked and some of them referencing others as data subset that I need for the transformation. Time to have a quick look at XInclude and XLink.
XSLT and HTML 5 problems
by Pascal Opitz on December 9 2008, 17:47
Sometimes I'm really getting annoyed about the lack of control that XSLT sometimes gives about what target formats are supported and what output it generates
Random thoughts on: SVG, JS toolkits and more
by Pascal Opitz on December 7 2008, 02:53
For various reasons I seem to do much more reading on new techniques and web stuff lately, and today brought up some for me fascinating finds that I wanted to share.
Onenaught on jQuery, testability and events
by Pascal Opitz on December 5 2008, 11:11
Over at OneNaught Anup Shah gives some hints about how to utilize Events to make your jQuery plugins ready for unit testing.
Looking at free charts and stats APIs
by Pascal Opitz on December 4 2008, 14:28
At the moment I am looking for a nice way to convert HTML tables into stats. I am thinking along the lines of SIFR, where flash replaces markup and displays dynamic data. But first I need something that displays dynamic stats ...
MySQL client output logging with tee
by Pascal Opitz on December 3 2008, 13:44
James, the sys admin guy here at Opta, where I am working at the moment, brought this up, and it is one of those neat tricks that can make life very easy but I still didn't know about.
Hello there, and congratulations ...
by Pascal Opitz on December 2 2008, 23:23
The last week was full of events for two of us. While Matthias has just started the most amazing start-up one can think of, I went past my use-by date to hit the magic number: 30.
XSL: Recursive template for counting up
by Pascal Opitz on November 20 2008, 11:20
Thought I'd share this with you, even though it's nothing special: A simple XSL template that recursively increments a counter, so you can do a set number of operations.
Zend Framework: XSL and self-serializing Views
by Pascal Opitz on November 17 2008, 01:39
A long time ago I argued that MVC style frameworks should use XSL instead of inline PHP code and so on. That's why I knocked together a little proof of concept for Zend Framework where the views files are XSLs and the View object serializes itself into XML for rendering.
Be Box CLI and security issues
by Pascal Opitz on November 15 2008, 18:43
An interesting insight into the Be Box, and how much functionality is lurking behind the simple face is what I found here, stating that the box is a dressed down version of a Speedtouch 780WL, and therefore much more capable than the web interface suggests.
Reglib, an Event Delegation based Framework
by Pascal Opitz on November 14 2008, 22:50
Via the ajaxian I came across the new javascript based framework reglib, written by Gregory Reimer. It is based on some very clever thoughts and makes heavy use of Event Delegation.
Controller separation with ActionStack and Zend_Layout
by Pascal Opitz on November 6 2008, 22:47
Thinking about my past projects, I realized that previously my controllers where doing way too much that they shouldn't, and quickly the comments controller would update user content and so on. I had a good look at how I wanted to structure my code, and decided that the controllers only should do things that belong to them, but call other controllers if they needed stuff from them.
The credit crunch deja vu
by Pascal Opitz on November 5 2008, 10:25
Of course everyone follows the news about the financial sector crisis right now, and from a personal point of view I feel reminded about the time around 9/11. Back then many many agencies in Germany, where I am born and was doing my apprenticeship at the time, got hit hard and had to lay off people.
Be box and iplayer = crash?
by Pascal Opitz on November 3 2008, 22:28
I thought I was going mad: Everytime I watched some iplayer content, my wireless dropped out and it looked like the router reset itself.
JS custom events roundup
by Pascal Opitz on November 2 2008, 20:06
With independent UI components, that not always know about each other, custom events come in handy.
DNS clustering in WHM/Cpanel accounts
by Pascal Opitz on November 1 2008, 16:00
Dealing with multiple CPANEL/WHM installs, DNS clustering is a way to use redundant nameservers in order to keep your zones created by CPANEL/WHM in sync.
Random thoughts on: Cloud computing
by Pascal Opitz on November 1 2008, 15:14
Some thoughts, sparked by recently read articles that mentioned the buzz words "cloud computing".
Why the relaunch?
by Pascal Opitz on October 28 2008, 07:03
Ok, as Matthias already said, I'd like to give an insight into what has changed in this relaunch, but above all I want to share what we're trying to achieve.
A new style for our content
by Pascal Opitz on October 26 2008, 18:02
We've announced it a couple of times, and here we are: A new face for Content with Style is live.
Remove the mac sync icon in Leopard
by Pascal Opitz on October 3 2008, 02:27
Lim Kien Hean describes the removal of the .mac sync icon from the OSX top bar as a small but important trick. I happen to agree! Thanks.
Over @Natbat.net: CSS systems for writing maintainable CSS
by Pascal Opitz on October 1 2008, 11:44
Very very good slides for download at natbat.net , and a nice discussion in the comments as well.
Command line search and replace?
by Pascal Opitz on September 30 2008, 06:24
So I’m asking around for the best way to do search and replace in command line …
Textmate search & reg exp
by Pascal Opitz on September 17 2008, 11:53
One of the nicest things about Textmate is the that you keep discovering things even after a year of using it. The project wide search and replace functionality already helped me, but I kept ignoring that little check box saying “Regular expression”.
CSS Background image on html image element?
by Pascal Opitz on September 15 2008, 07:01
My co-worker Paul showed how helpful it is to question the obvious: Can you apply a background image to an image?
SSI trouble in parent directories
by Pascal Opitz on August 28 2008, 10:32
Sometimes it helps to read the manual, especially when one makes a really silly mistake.
JS and objects
by Pascal Opitz on August 28 2008, 10:22
Just a quick moment trying to explain the different approaches to using objects in JS to a fellow co-worker …
How to delete files when argument list is to long ...
by Pascal Opitz on August 12 2008, 11:42
I had trouble with deleting files, because a simple “rm -Rf *” would fail because the argument list was to long.
View variables in Zend Framework Partial Loop
by Pascal Opitz on July 30 2008, 10:58
One of the fun things about Zend Framework is the possibility to extend the Framework classes with extras functionality. I got slightly annoyed that in a partialLoop I couldn’t access the view variables. here’s how I fixed it.
JS and CSS minification with YUI
by Pascal Opitz on July 25 2008, 10:49
At the moment I am working on a large website project, where for maintainability reasons I keep files separated and pretty verbose. Every box and page type would get its own CSS file, and all would be included through on big CSS …
Net neutrality rant
by Pascal Opitz on June 19 2008, 12:07
So I’m reading the guardian technology section today, and a rant about how net neutrality seemingly incapacitates the internet by making it possible for content providers like youtube to eat up the whole bandwidth.
XML Serialization and PHP Reflection
by Pascal Opitz on June 18 2008, 09:56
Browsing the web for a way to serialize PHP objects into XML I came across this interesting thread
PHP Benchmark
by Pascal Opitz on June 2 2008, 12:17
Via Peter Mescalchin I got hold of this PHP benchmark.
MVC explanations - I love mailing lists
by Pascal Opitz on December 21 2007, 06:07
I came across this very elaborate explanation of MVC in a python mailing list. Just want to take this as an occasion to say thank you to all people that take time to explain things in mailing lists.
Hi guys, what's happening with CwS?
by Pascal Opitz on November 20 2007, 09:03
Good question! We were about to ask ourselves the same question. Even though Matthias came up with a new article today, we cannot deny that not much that has happened here in the past couple of months. We’re basically facing some descisions wether to leave CwS to die quietly, or to keep it alive …
Meebo firefox extension
by Pascal Opitz on October 24 2007, 05:27
Since I’m a great fan of meebo and consider it one of the best examples for an AJAX application, I am pretty thrilled to see the meebo Firefox extension .
Security: Even the simple stuff is hard it seems!
by Pascal Opitz on August 14 2007, 08:23
So I am reading about the bug in IE that puts your FTP details into the comments plaintext ...
Unitless line height in CSS
by Pascal Opitz on July 9 2007, 05:11
For a couple of years now I keep stressing the fact that line-height works best when you don’t provide a unit. And I am not saying this for no reason.
PHP & Mysql socket error
by Pascal Opitz on July 7 2007, 19:58
I keep coming across this whenever I set up MySQL and PHP on a mac: mysql_connect() fails throwing an error …
Sorting by date with XSL
by Pascal Opitz on July 6 2007, 04:48
XSLT architect Miguel de Melo gives an insight into the sorting capabilities of XSL in his article Sort by date greater than other date
Firebug can make life easier
by Pascal Opitz on June 28 2007, 11:06
Today I was pointed to a couple of handy functionalities in the Firebug plugin by Peter Mescalchin, who’s one of the UI developers I am currently working with.
How long have I been waiting for this?
by Pascal Opitz on June 5 2007, 17:48
It must be since I heard the word entity first. Check out this brilliant entity reference. Via ajaxian.
DOs and DONTs in XSLT
by Pascal Opitz on June 4 2007, 11:43
A nice little roundup of how to efficiently use XSLT can be found here
Hip hip, hooray
by Pascal Opitz on June 4 2007, 09:22
We did it. After more than one year we have a new article online.
I wrote Templates from Babel? being involved in the development of an XSL driven CMS for Redwire …
Templates from Babel?
by Pascal Opitz on June 4 2007, 09:16
In this article Pascal Opitz discusses the current way of rendering templates used in most MVC style rapid development frameworks.
Unit Tests in JavaScript
by Pascal Opitz on May 31 2007, 17:52
I don’t know how many of you guys out there are seriously testing their javascript applications, and how you do approach tesing them. I, until now, have been doing the good old step by step alert thing …
301 redirect with mod_rewrite
by Pascal Opitz on April 25 2007, 09:10
So I changed my domain name from .de to .com. But wasn’t there something whereas Google would punish double-posted content with pagerank 0?
mod_deflate and IE6 bug
by Pascal Opitz on April 20 2007, 12:46
This one was very strange. IE 6.0.29 would randomly come up with white pages.
You might have noticed: There are some ads now.
by Pascal Opitz on April 13 2007, 12:50
I kept trying to avoid them, but in the end of the day I cannot see why bandwidth gets burned up without any cost return. And everyone else does seem to do it.
Swapping nodes in a DOM tree
by Pascal Opitz on April 12 2007, 09:34
I was quite surprised to find out that the insertBefore method actually does most of the job for you.
php: array_diff_assoc and the order of parameters
by Pascal Opitz on April 12 2007, 03:55
This took a while till I found out: They actually do matter! Even worse: The manual says so!!!! Just that I was to stupid to read it. Lesson learned. No more guessing, no more quick reading!
Blog section opened
by Pascal Opitz on April 7 2007, 06:53
Welcome to The new blog section on the CwS website.
Browser based vector rendering
by Pascal Opitz on March 12 2007, 13:54
Today I came along a demo for the Ajax3d engine, an entirely JavaScript based 3d engine that utilizes the canvas tag for rendering vector based graphics.
Wine, Photoshop & "save for web"
by Pascal Opitz on February 5 2007, 08:25
Tom did find out about this one for me: The trick is to execute Photoshop with quotes around the path and backslashes in it.
Ndiswrapper and Fedora Core 6
by Pascal Opitz on January 18 2007, 10:30
How to set up a DWL-G650+ Wireless card for Fedora core 6.
Outlook 2007 and those bloody HTML emails
by Pascal Opitz on January 18 2007, 08:07
Microsoft comes up with a great way of rendering emails in Outlook 2007 which might cause Matthias to refuse doing any HTML formatted emails in the future.
CwS 2006 - a little summary
by Pascal Opitz on November 30 2006, 07:46
With 2006 nearly over it’s time for a little look back on what happened with CwS throughout the year.
2006 came with some major difficulties and changes for us. ...
XML validation in PHP
by Pascal Opitz on November 8 2006, 06:41
Working with user input that needs to be valid XML, it turns out that PHP5 has a built-in validation function.
IE7 and how it changes the web
by Pascal Opitz on October 29 2006, 12:32
Simon Griffin from etre sent us a rather interesting email about some research they’ve done on IE7 …
XSL:TEXT, CDATA and PHP5
by Pascal Opitz on October 20 2006, 07:53
Right, so I am applying disable-output-escaping="yes" on an xsl:text element containing some CDATA, but the output is still coming with escaped entities …
Find and Replace and some more VIM tuning
by Pascal Opitz on October 17 2006, 08:40
Awkward at first glance VIM has become my editor of choice.
Checking for object literals
by Pascal Opitz on October 3 2006, 07:46
Such a basic thing to do, but still, I didn’t have to do it until now: Checking if an object literal is defined.
IE Conditional comments in XSL
by Pascal Opitz on September 27 2006, 05:49
Just a small bit of code, but not obious at first glance …
PHP Script: Timeshift in Subtitle Files
by Pascal Opitz on September 16 2006, 10:30
Have you ever tried to watch a movie with a .srt file, and the subtitle was more or less out of time? You can use this little PHP script through commandline and fix it by providing an offset.
PHP and MP3s
by Pascal Opitz on September 11 2006, 08:12
While setting up a media server for the Netaudio Festival I had not only to set up a dedicated machine with samba shares, Webserver and Web based interface, but also to play around with mp3s and ID3 tags …
Register PHP functions in XSL
by Pascal Opitz on September 11 2006, 07:55
Working with PHP5 and the built-in XSLT processor I came accross the method registerPHPFunctions that lets you register PHP functions in XSL. Quite a neat feature. Wonder how much that slows the transformation down?
Spam and some other things ...
by Pascal Opitz on August 25 2006, 07:10
Sadly we lately have to deal with unpleasant things. One is the comment spam, that actually is getting worse and worse. But since Mike did write his latest article with a bit of a tabloid title we have to deal with some other things as well …
Netaudio'06: London Netlabel Festival
by Pascal Opitz on August 25 2006, 07:09
UTF-8 based transformation output in .Net
by Pascal Opitz on August 17 2006, 11:38
Using XSL transformations in .Net I came accross the weird behaviour that my transformations would be UTF-16 encoded even though I specified UTF-8 in the <xsl:output /> tag.
Problem: Dependencies
by Pascal Opitz on July 28 2006, 06:58
This time I have a problem, but no solution yet. It’s all about dependencies.
REST and some unknown verbs
by Pascal Opitz on June 28 2006, 06:27
Doing a little research on REST I came accross a couple of interesting reads and discovered the lost verb in the HTTP language …
UTF-8: Documents with a lot of character
by Pascal Opitz on June 21 2006, 05:21
Did you ever built a webpage in Homesite and then you didn’t encode the html-entities? Then, probably when the client has a look on it, all the german Umlaut characters look awkward on a mac? And did you figure out why? It’s because of the charsets and the encoding of the characters in the saved file!
Narrative JavaScript
by Pascal Opitz on June 5 2006, 03:56
This is an extension to javascript that will be compiled into javascript afterwards, and helps you to write readable code by introducing the “blocking” operator (notated as ’->’).
IE7 and its problems
by Pascal Opitz on June 1 2006, 09:24
As Mike was busy doing this already on his blog donotremove.com I quickly debugged our site for the public IE7 beta 2 that came out today. Like Mike pointed out correctly, most problems are gone once you updated the clearfix hack for IE7.
Comments on Comments
by Pascal Opitz on May 30 2006, 03:59
The right kind of comments to speed up the development process and enable a couple of interesting possibilities to generate documentations automatically. This article tries to reflect on the pros and cons of comments and to show some interesting possibilities for automatic comment parsing.
Offtime, moving and some changes
by Pascal Opitz on April 25 2006, 11:41
Ok, some might have noticed that this site was offline for a couple of days. That is because our previous host, hostgator.com, didn’t like the site on a reseller hosting as it was causing a bit of load. So they decided to move it to a slow dedicated server and give us a very short period of time to change to another hosting plan or be switched off, and on top of that they managed to fuck up the site and all of our email during this stunt.
php: array_filter and callback function
by Pascal Opitz on April 20 2006, 09:48
Sometimes array_pop is just not enough. You might have to strip out something from an array that is 2 dimensional or do some more complicated adjustments to the array values. In this case you can use array_filter and a callback function.
XSL and DTD
by Pascal Opitz on April 12 2006, 10:05
A quick code snippet to include the right XHTML DTD in your XSL generated output.
Mono sounds Sharp
by Pascal Opitz on April 10 2006, 06:58
If platform specifications change sometimes one has to make the descision if the application needs to be ported or if there is another way. My research about porting .Net applications reveals a surprisingly great range of Open Source tools.
Relaunch: DoNotRemove
by Pascal Opitz on April 3 2006, 11:19
The homepage of Content with Style author Mike Stenhouse, to be found at www.donotremove.co.uk, just got a huge makeover. We must say it looks stunning. Congratulations Mike!
PHP Unit testing tutorial
by Pascal Opitz on April 3 2006, 05:45
During the research for my upcoming article about comments and code I came accross this interesting tutorial on unit testing. It gives you a quick insight into how test driven design works with SimpleTest and PHP.
Faster website moving with lftp
by Pascal Opitz on April 1 2006, 09:00
Consider lftp to be the better alternative to ftp when it comes to moving your website. Unlike the standard ftp command line client it had the function “mirror” ...
EXSLT
by Pascal Opitz on March 30 2006, 11:01
EXSLT is an extension kit for XSL. A collection of templates that can be used from within an XSL transformation to perform mathematic operation, string manipulations or working with reg-exp.
Clean URLs for a better search engine ranking
by Pascal Opitz on February 28 2006, 04:22
Search engines are often key to the successful promotion and running of your website. Read more on how clean URLs can influence your ranking and how clean URLs can be achieved for dynamic applications.
DOM scripting or how to keep the code clean
by Pascal Opitz on October 27 2005, 04:24
In this tutorial I want to show up the differences between DOM-Scripting and the “traditional” JavaScript
technique using event-handlers embedded into the HTML-code.
I’ll show a way to have accessible popups, and by showing how to do those, I’ll explain the propper use of DOM-scripting.
Processing the output buffer with XSLT
by Pascal Opitz on July 24 2005, 18:07
This article shows an example of a technique mentioned in one of our recent articles. It uses the PHP output buffer in combination with XML as intermediate application layer. Ideally you should familiarize yourself with this concept first.
Database-driven tree structures with XML and XSLT
by Pascal Opitz on June 13 2005, 20:56
This article deals with the display of tree-structures that are driven by a database. Make your application more robust and reliable by separating it into layers and save some SQL-statements.
Dynamic tables with XSLT
by Pascal Opitz on June 1 2005, 09:08
How to use the powerful dynamic features of XSLT for sorting and displaying table-data.
XML as intermediate application layer
by Pascal Opitz on May 31 2005, 08:37
Why not keeping the application logic just working with XML and benefit from robust toolkits and neat techniques rather than changing HTML-markup in PHP-code?
Find your node: Advanced XPATH commands
by Pascal Opitz on May 21 2005, 11:49
All that XSLT does is applying code-templates on XML-nodes. In order to do this you need to find the right node. XPATH offers you an advanced toolkit to do that within an XSL-file.
XSL: the other way of styling up content
by Pascal Opitz on May 21 2005, 11:24
Two of the best known acronyms around right now are XML and XSL, often being mentioned as “the way to go” or
some abstract technique that stands for a new direction within the whole web.
Rather than dealing with the languages itself in detail I’ll try to give a pragmatic approach and to show basic examples
how to transform data into browser-ready HTML.
