MegaZone (zonereyrie) wrote,

  • Mood:
  • Music:


You know, XSL is pretty fucking cool when you get to know it a bit. When I first started using it I was frustrated because it didn't make a lot of sense and it seemed to be kind of limited, but once I started getting into the right mindset I started finding it easier to manipulate XML with XSL than to do it in a higher level language. You need a URL based on this XML document? Transform! You need the contents nearly formatted in ASCII? Transform! An HTML page this time? Transform! You want to know if an element in document A occurs in document B and, if so, if they have the same value? Transform! The latter looked like a messy problem to tackle in ASP - having to walk the nodes and look for the same node in the other document, then compare them. Stick both documents into one wrapping framework and call a relatively simple XSL - done. As we've been working on our current project at work I actually took some of the work my coworker was going to have to do in ASP and did it for her with XSL instead, to make things simpler. Originally we were just planning to use it to produce any HTML - now it is doing the text contract, web HTML, text and HTML email bodies, redirect URL and links, contents for a HTTP POST, XML document comparison - and maybe more. The more I work with this the more I'd really like to do more to learn more tricks. I'm kind of having fun with it, but I know I'm just scratching the surface really. I get the feeling there is a lot more power here that I haven't really tapped. It has been a while since I've really learned something new like this. I barely touched XSL several years ago and I think I got a completely erroneous impression of what it really was from that, so working with it now was an eye-opener. Now I kind of understand the buzz.
  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded