Here it is the end of the day at work and I’m completely stumped on an XPath issue. It’s one of those problems that involve a rare combination of technologies with rare documentation. In case you don’t know I’m doing something that rare people rarely do a rare amount of times. I rarely give up on such problems and it’s rare for me not to lose sleep over these rare conditions. However rare it may be, I frequently find myself in such predicaments.
What am I doing?
I’m writing an XSLT stylesheet that write XSLT stylesheets. The topic of self authoring stylesheets comes up rarely on the forums so I took the approach of using Test Driven Development to keep me from making mistakes. The topic of using TDD on XSLT is even more rare. It’s really rare to find somebody talking about unit testing a stylesheet that writes stylesheets. Anyway, I’m pushing XMLUnit to the limits. I bet that most people who use XMLUnit use Xpath asserts right? Well the majority of these people probably never worry about namespaces. Namespaces with XPath under XMLUnit is rare. Especially when you factor in and XSLT stylesheet that inlines templates from another XSLT stylesheet using a different namespace prefix. You’d sooner find golden-egg laying bison free-styling to a Biggie Small beat with a limited edition ipod Nano riding backwards on a skateboard down the interstate on black friday.
However rare it may be, I need help, and fast. I have a timeline on the project (that I’m sure I’m going to exceed) and I’ve been stumped all day. So if you happen to be of the rare type that digs the rare development that I’m doing, please speak up! (After you help me take a good look at yourself, because man… who else in the world spends their time digging through the blogs of some unknown kid with dumb jokes working on a stoopid XSLT writing XSLT. Go hit the club scene you hermit! Oh, and thanks in advance for your help!)