--

XSL is really neat

I'm trying to conceive of a good reason to output all of the data from my web applications as XML from now on, but really I can't think of anything practical.

I bet there's probably something I could do with it, though.

I bet it'd make AJAX-ifying a site easier.
Permalink Send private email muppet 
September 1st, 2006 9:56am
I guess one shouldn't mention nsIXSLTProcessor.
Permalink Send private email just me 
September 1st, 2006 10:04am
I don't know what that is except that it seems to be a library for parsing and applying XSLT.
Permalink Send private email muppet 
September 1st, 2006 10:06am
There was a huge push for a short while to modernize web apps to emit XML all the way to the client, where XSL would be applied for presentation. This was supposed to be the new way that the web would be built, completely separating content from presentation.

I actually did that once - made an inhouse timesheet app that would feed an XML data-island of the current month's time to the client, where it would be processed against an XSLT and populate a DIV. When they did changes (adding hours, changing descriptions, etc), it would do a side-channel "AJAX"y call, and on getting a 200 OK it'd apply the data directly in the client XML, then retransform it.

Incredibly simple, but it's the favourite app I've ever built. Way before its time.
Permalink Send private email Dennis Forbes 
September 1st, 2006 10:27am
Yeah, I'm thinking that this may be the way to go for the app I'm working on now.

I'm just trying to figure out how to apply XSL to XML received through XMLHttpRequest.  I'm still learning javascript.
Permalink Send private email muppet 
September 1st, 2006 10:28am
"I'm just trying to figure out how to apply XSL to XML received through XMLHttpRequest.  I'm still learning javascript."

I did that with my home-grown delicious app. It was almost two years ago now.  So I forget wtf I did to get it to work. All I remember is seeing the XML come through and then I think I used C#/datagrid to apply the xsl to the xml.
Permalink Send private email sharkfish 
September 1st, 2006 10:36am
nsIXSLTProcessor is Firefox's (or XPCOM's) component for transforming XML using xslt processing.

It's pretty simple to use (simple for XPCOM stuff). And it really is brilliant (afterwards writing your own javascript functions to make HTML out of XML seems very quaint).

*WARNING*. It doesn't seem to be the newest version of libxstl and support every last XSL spec though (for any version of FFx), as there's sometimes a WTFs if you do non-Firefox unit testing.
Permalink Send private email just me 
September 1st, 2006 10:59am
Well you still need javascript if you're going to transform XML that's received dynamically, I imagine.
Permalink Send private email muppet 
September 1st, 2006 11:05am
WAIT A MINUTE...

Wasn't muppet the one who was like, "What's all the this stupid fuss about XML/XSLT to make HTML. Isn't that making things overly complex?" If it was you, then in some ways you were right. XML*XSLT=HTML is very cool, but there's a reason that it didn't take over during the push that Dennis describes.

That being said, my homegrown CMS we use at Sutter County (http://www.suttercounty.org) uses it extensively.
Permalink BigJigger 
September 1st, 2006 11:08am
Oh and I don't do the graphics for that site, I just write the code.

But it's a good site with a LOT of content and it's performant and easy to maintain and I'm gonna miss it...
Permalink BigJigger 
September 1st, 2006 11:09am
"and I'm gonna miss it..."
What's up, Jeff?  You moving on to greener pastures?
Permalink Send private email Jöhn Härën 
September 1st, 2006 11:11am
I've used xslt from inside my app to generate the HTML that was sent to the client.  It was a great way to separate presentation and logic.  I still like my libtemplate better, but libtemplate isn't exactly a standard.
Permalink Send private email Clay Dowling 
September 1st, 2006 11:25am
John: Yep, I'm going to work for a dog food company. Really.
Permalink BigJigger 
September 1st, 2006 11:29am
Well, congrats!  Kinda gives new meaning to the phrase "eat your own dog food"... no, wait, it doesn't.  That makes no sense.  Oh well.  Hope your new job kicks ass, though!
Permalink Send private email Jöhn Härën 
September 1st, 2006 12:47pm

This topic is archived. No further replies will be accepted.

Other topics: September, 2006 Other topics: September, 2006 Recent topics Recent topics