So I got this crazy idea.
I'm writing a simple blog site, and I want to be able to use a single data source, which my scripts (PHP) then use to generate XHTML pages, RSS feeds, e-mail formatted messages, et cetera. Now, I started to write it using PHP+MySQL, but I started running into problems; for example, in my RSS feeds I want to show different content than on my main site, some of my articles contain executable PHP code (Yeah, I know, it's jackass, but I want it there. My website after all.) and SQL just seems a bit messy to me. It works great for some things, but... a personal blog?
So I thought, 'why not store everything in an XML file, let PHP process that file to deal with any generated tidbits I put in the posts, and then use an XML stylesheet to format the content for whatever I want to display?' I then shot down my own idea by saying "well, not all browsers will support XSLT..." but then I again realized that I could use PHP to perform the transformations for me.
Is there any reason this is jackass? I was thinking I'd keep the file inside my /includes/ folder, which is only accessible to the server host itself (as per my .htaccess file). As of now I don't see any reason to not manually exit the XML and upload it periodically, but it shouldn't be an issue to write a script which writes to the XML file later.
Am I being dumb? Am I a genius?