Journal feed generation, RSS and Atom
Posted March 19, 2009 in Writing-Development
For the past few hours I have been trying to integrate a feed generation library into my new blog system. After a couple of minutes searching on Google I came across Anis uddin Ahmad’s PHP Universal Feed Generator. This feed generator can create Atom, RSS 1.0 and RSS 2.0 feeds.
There were a few mistakes in his program: to begin with, escaping data in the XML output using the PHP function htmlentities is incorrect because it will generate entities that are not part of the XML standard. Instead you should allow native UTF-8 characters to remain in the XML document and only escape the small subset of characters that XML uses. I fixed other niggles, including making a method of FeedWriter public static.
I want to write my own feed generator and release it to the world. I wrote the feed generator for Mind & Soul when I was working for Premier Media Group. With some of the knowledge gained from my first year computer science course I could do a far better job. I will now take any excuse to try out my new skills!
Converting to absolute URLs
Many of the files on my server reference other files using an absolute URL syntax such as /journal/view/test. This will break down if the files are transported to another server if the path changes. The path should either be relative (would require lots of processing) or be absolute and include the domain part.
Webmail clients can interpret feed links and images, allowing users to travel to external pages or view images directly in the client. This means that I will definitely have to change the URL system in Base (my CMS) and the implementation of FluxLinkage. The latter is an interface to connect the journal system with other classes, in this case my CMS, and to adapt to their style of page linking.
Speech recognition
Dragon NaturallySpeaking seems to have problems interpreting my speech when writing CompSci blog entries… However, it is an awesome piece of software and it gives me an excuse for making more grammar errors.


Comments
Please e-mail all comments to mjac@mjac.co.uk and I will try to reply as promptly as possible. Any particularly interesting comments may be followed up in further articles or mentioned in this one.