On August 9, 2002 11:18 am, Lyle Brooks wrote: > Since both are "XML stylesheet languages", which one would/should you > use? > > What are some of the parameters that would cause you to choose XSLT > over XPathScript and vice-versa? > > Are there tasks that are extremely difficult in one, while easier in > the other? > > Not being too familiar with either, I was wondering what criteria > other people use for selecting the right tool for the job.
We originally started off building our site using XPathScript, as it was much more familiar to our Perl developers than XSLT is. Looked familiar, less learning curve, so thats what we started with. The one thing that we were missing at the time, though, was a nice way to dump out the results of one of the stylesheets in the chains that we were using. Knowing that we could get intermediary dumps if we used XSLT for some of the lower-level transformations we were doing, we switched a bunch of the low-level things over to XSLT, so we could at least run them through on the cmd line and dump out the results to make sure that they were working properly. Since that time I see that AxKit now has the ability to do intermediary dumps as it runs a doc through the chains of styles, but at the time we started moving to XSLT that wasn't yet available. As it stands right now, though, we've got a mix of XSLT and XPathScript in use on the next version of our own site (which likely won't be up until next week). Boils down to us using XSLT to do transformations of XML documents into other XML documents, while chaining and bubbling-up those documents to higher-level styles. E.g. "software"->"webpage"->"xhtml". In the end, though, all of the documents then get run through an XPathScript style which does some things that I've come to the conclusion on that we can only do in Perl; rooting through the file-system. Most notably, things like "random images" or "find me the right image to put on the top of the page, bubbling up to parent directories to find one if there isn't one here" are _MUCH_ easier to do in Perl. Ok, actually, I haven't found a way to do that yet in XSLT, but in Perl it was a quick few lines of code. When we first started and were using XPathScript exclusively, we were super impressed with the way that AxKit worked and the flexibility that it gave us. Now having had the opportunity to use a mix of XSLT and XPathScript, though, we've come to appreciate AxKit even more in the flexibility it offers us in the way that we can process our XML content and crank it out to the user. Yes, XSLT is a bit clumsier in some of its syntax compared to XPathScript, but the same goes the other way too; there are some things we've found easier to do in XSLT. Performance-wise, though, I can't really tell the difference between the two. Just doing quick/stupid benchmarks here on our staging server we quit counting performance when it hit 50pgs/sec, even with a limited number of HTTP processes (which is _much_ more than we expect that we're going to be serving on this site). -- Graham TerMarsch Howling Frog Internet Development, Inc. http://www.howlingfrog.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
