Archive for the 'XML' Category

Generating Pages with XSL

I was thinking about using XML and XSL to abstract content from layout tonight, and in particular how I could apply it to linkstew. The model I've been using at work is to have the code generate XML which XSL transforms at run time. From what I've seen, this is also the model which everyone else uses for XSL, which is probably where I got the idea in the first place.

But tonight in the shower, I said "Wait a second! Why not have XSL and XML tagged PHP produce the code to run and generate my page?" In other words, instead of transforming XML with XSL every time, why not transform some carefully marked up php once to generate a script which will produce the layed out page. To change my layout, I just change the xsl and rerun the script...

  • Current method: Script -> XML + XSL -> HTML Output
  • New Idea: XMLized PHP + XSL -> Script -> HTML Output

I'm still fuzzy on exactly how this is going to work, but it's a new twist which I really want to explore. As the idea bounces around more, I'll let y'all know if this actually seems feasible...

Dreamhost’s Birthday Present to LinkStew

As a birthday present for Linkstew, Dreamhost decided to finally move me over to their new servers. This means I finally have access to the new version of PHP, a new mysql server, and a lot of other goodies. Of course with the good comes some bad. I can no longer use a .forward file to pass along mail sent to linkstew.org, and thanks to DNS and other issues the site was broken earlier tonight. If you stumble across any rips in the site, let me know so I can quickly paint over the hole.

Now that I'm on Dreamhost2, I finally have the new technologies I want to rebuild LinkStew with. Coincidentally enough, a pretty good article about using the Sablotron XSL processor as a PHP extension was posted on the O'Reilly Network today. If you're interested in super slick ways to separate the content of your site from the display, XML+XSL should be the place you start. Or Blogger, of course. XML+XSL is what I've been doing at work for the last 6 months, so that article was way below my level, but if you're new to the game, it's worth checking out. I wish I'd had an article like that when I was first learning.

A Productive Day In The Neighborhood

Today was another Saturday spent mostly at work, and yet, I'm really not very bitter about it. I had intended to go to the grocery store early this morning, but since it was raining, it's probably better that I slept through my alarms. I got to the office by about 3, and I started in on the code, along with another programmer who is now working on a project built on the engine I've written.

A lot of progress was made on things today, and it's a shame it got so late so fast, because I was really on a roll when I went home at 11 pm. In fact, when I got home I was in such a hacking mindset that I wanted to work on the new linkstew engine, but there's still no sense in doing that because my web host doesn't yet support xsl in php.

When I got home I played a few rounds of Mario Kart 64, in anticipation of the Game Boy Advance release this summer. It's reassuring that I still kick ass at Mario Kart after all these years, and was able to win the 150cc Special Cup on my first play of the game in six months.

An Article About Articles About XML

After spending the whole day at the office working on my ever-ongoing project built on XML, guess what I came home and did? Read articles about XML, naturally. Though I was sick and tired of XML when I left the office, I enjoyed reading the articles. Why? I don't know. It's different. There were two notable articles I read.

The first article was an article on SAX, or "Simple API for XML." The article was simple and straightforward. It had easy to read perl examples and it had a highly amusing XML document fragment. I think the main reason I liked this article, though, is because SAX is alternative to DOM. DOM is the XML parsing method I've been coping with in my work project, and it's been driving me insane. I hate DOM. It appears that a lot of people hate DOM, but that's not important, because I hate DOM. SAX looks cool, I wish I'd used it instead, but I think it would have made a lot of my code a lot more complex. Instead of having vast stretchs of DOM calls, I would have dozens of SAX handlers.

The second, and much more interesting article, was on Functional Programming Languages and XML. This article is good for many many reasons. First of all, the things the author wrote on the first page of the article showed how intelligent he is. He admits that he doesn't know everything about his topic. He advocates the importance of looking at an accepted evil (DOM) from another point of view. And he reminds readers that what he's going to talk about it just one option among many. Beyond that, the rest of the article was also great. The exploration of three new XML parsing paradigm's (along with the SAX article I talked about above) filled my head with all kinds of ideas about how I wished I'd done my project at work, and what I want to implement when I overhaul LinkStew. This is the best article I've ever read on XML. It's low on the technical details, but high on meta-content and ideas -- just like XML.

Database XML Integration Tools

Today while reading use Perl; I noticed that there was a new module named DBIx::XML_RDB. Now, as my job is composed almost entirely of XML and Database work right now, this module sounded interesting enough for me to check it out.

And check it out I did, and interesting it looks, but I'd still dig something on the level of Oracle's XML Tools in an open source package, because what this particular Oracle document describes sounds like a very well integrated and robust package. Too bad I don't have it to play with. Maybe I'll get a chance to work with real XML/Database tools some day, and not be stuck with Perl's half assed implementations. (They're not all bad, but the best ones I've found are the ones that are simply perl bindings onto libraries in other languages.

Perl XML Hell

Having experienced the first hand which is the mess that is Perl XML support, an article titled What's Wrong with Perl and XML really caught my interest, and while it didn't tell much new, it was reassuring to know that I wasn't insane for thinking XML+Perl=Headaches.

Bits of the XML Bible Online

I've been playing with XML lately, and I've really become enamored of the power and flexibility of XML+XSL. The Author of the XML Bible (A great book I recomend you buy right now (There's a link on his page)) posts updates to his book on his web page over here. I've got several other books by this guy, and they're all really good, so look out for the name "Elliotte Rusty Harold". Of course, you really shouldn't use the info on that page unless you own the book, so support the guy. He really is a good author.

Debian SGML HOWTO

Over here is the Debian SGML/XML HOWTO. SGML is spiffy as hell for creating documentation of any sort, because one sgml file can be exploded into a nice format, while XML is, of course, the way of the future.

xml hacking

xmlhack is a pretty spiffy site which links to all the latest news on XML, which looks cooler and cooler every time I look into it, though I never go the distance and actually learn XML. I should just bite the bullet.