Skip to main content

Posts

Showing posts from February, 2004

Adventures in Jscript: Episode Three - XPath and While to the Rescue

An Introduction: Last week we saw just how easy it is to use a nifty combination of Jscript and XPath to "replace" client XSL Transforms. Before we get into it, I'd thought I'd clear up a couple of comments from last week. First, I'm not opposed to XSL on the client. It solves many problems that are a pain in Jscript...like sorting to mention one. However, since you have to jump out to a different language and maybe even a different development environment, I think it's easier to just write it all in Jscript. And remember: XSL only gets you the display. Any binding code you need has to be done in Jscript, and again, I think it's easier to keep all of your code in one place. So hopefully that has answered the inquiries / accusations that I was somehow anti-XSL...on to Episode 3. Serialization, Whiles and XPath... Last week I mentioned serialization in the context of my XML. A question popped up in my inbox that made me realize that I didn't do a good j...

Adventures in JScript: Episode Two - While You Were Looping

An Introduction: Last time we saw how you can imbed XML in the body of an HTML document in IE's <XML> tag, known as a data island. My demonstration of this spectacular feat was having an alert pop up with the XML inside it. While visually stunning, it's not exactly useful for solving problems, and that's what we're all in this game for. So let's turn this XML into something useful. Upon hearing a phrase like that most people think: XSLT. Not me. I go straight to JScript, not passing GO, not collecting $200. Let me explain myself: I'm not opposed to XSL, I think that it's pretty cool. When it first came out, I knew I needed to learn it and worked at it hard. And that's when it came to me, I had to "work" at it. I'm one of these rare mutant humans that think in code, yet XSL has always seemed a little alien to me. So I set out a way to do everything that I could do in XSL, but do it in my favorite syntax, JScript. I've done this p...

Adventures in JScript: Episode One - Our Friend, the Data Island

Preamble: I thought I'd try to do something a little different than what you've typically seen here on AlphaFilter. I'm going to try to make this a weekly column, focusing on - Microsoft Internet Explorer and JScript. The reason for this is not that I'm a 'Nix basher or totally and blindly in love with all things Redmond but rather it's simply what I do all day professionally and unless the browser statistics out there change, developing for IE specific is not a completely insane thing to do. Plus, Microsoft has enhanced some things to make it an extremely attractive development platform. So be warned: I know a lot (if not all) things here won't work on Mozilla or Safari or whatever...but that's not my purpose here. My plan is to make it episodic, so just like other more famous episodic works, you'll have to endure some JarJar to get to the point where Darth cuts off Luke's hand. I'll try to keep things moving...not too much JarJar. So let...