Archive for the 'Uncategorized' Tag

Evil solution to the XSLT empty xmlns probem

Tuesday, March 3rd, 2009

I’m currently using XSLT, and I’ve come across the dreaded empty xmlns problem. My XML contains elements that do not have rules in my XSL stylesheet and most XSLT engines append the attribute xmlns="" when it gets confused about what namespace the element belongs to… I get bitten by this because I do not have an input DTD as the document is not meant to be used as anything but fodder to create XHTML.

Many people even have this problem when using XSLT to transform XHTML into XHTML… the input and output namespaces are the same, and they’re using properly formated and validated XHTML documents (complete with the doctype statement and the xmlns attribute on the html element).

Many people just want to force the transforming engine to blindly copy the elements as is over to the new document, and ignore the namespace issue. The below XSL should do this, use wisely.

<xsl:template match="*|@*">
    <xsl:element name="{ local-name( . ) }">
        <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
</xsl:template>

So, now I can go use XHTML in my input and have it spit back out unmolested.

The Lonely Island – Jizz in my Pants

Tuesday, February 10th, 2009

The Daily Show proves Republicans are idiots

Thursday, September 4th, 2008

This is why the Daily Show is the best fucking news team on television. Remember to vote third party this year, preferably Ron Paul.

Geek Porn

Wednesday, October 12th, 2005

You know, the Internet is a great place. Its a place where anyone interested in something can find other someones interested in anything. In this case, many geeks out there have remarked on how much porn sucks (no pun intended). Its all about ignorant morons wearing wife-beaters banging brainless, but living, sex dolls; and I find porn like that to be quite boring, and sometimes offensive, and very far from the erotic display it is supposed to be.

And I’m not the only one out there who thinks that, not by far. There are literally tens of thousands of my fellow geek brethren who think most, if not all, porn is complete shit. And just the subject matter isn’t bad, there are students in film classes all over the world that don’t make the mistakes that porn directors do: bad lighting, bad camera angles, static camera placement; and then the actors and actresses are horrid: their rendition of their lines (if any) are flat and lack emotion, they act like they don’t want to be there, and they simply go through the motions.

What we need, folks, is porn for geeks.

Ernest Cline – Nerd Porn Auteur, (transcription).

Microsoft + E-Machines = Massive Stupidity

Wednesday, October 12th, 2005

Ed Foster tells a story about a tech and his adventures with E-Machines machines and Windows XP,

Because of the new motherboard, of course, Windows XP activation was triggered. “During the requisite call to Microsoft for an activation number, we were told that Microsoft could NOT give us the activation for this particular copy of XP since it was sold through a ‘special licensing agreement’ with E-Machines. Even though we had the 25-digit license number, Microsoft insisted we would have to contact the manufacturer for the activation number. Two separate calls to E-Machines elicited the same response. NO activation number would be given since we did not install an ‘official’ and expensive E-Machines motherboard. So the customer is forced into purchasing another copy of Windows XP even though they already paid for the original license when they first bought the computer and have all the required proof.”

In other words, the reader’s customer — who has done nothing wrong other than have a motherboard fail on him — has the choice of paying ransom to E-Machines or to Microsoft to have a functioning OS again. Which led the reader to wonder just what would constitute piracy in such a situation. “We all know there are plenty of copies of XP that work fine without the product activation scheme,” the reader wrote. “Usually these are copies of corporate or academic versions of XP originally sold by Microsoft with broad licenses covering many computers. Is this customer justified in installing such a ‘pirated’ copy of XP on this system? Or should the customer have to buy yet another copy of XP, and presumably throw his old copy in the trash, just because his motherboard failed?”

There is only one proper way to respond to this: Fuck you, Microsoft. Why do you think people are pirating Windows; or worse, switching to alternative operating systems (such as the Ubuntu Linux distro?) Because they are tired of the shit you pull.

For those out there that want to startup a new commerical software buisness, here are three rules you should follow:

  1. Do not treat your customer as your enemy, remember that they are ultimately your boss and decide if you get to eat this month.
  2. Do not make it difficult to use your product, if they find it difficult to use they will just use something else.
  3. Do not abuse the trust of your customers, remember the consumer industry runs on karma and everything you do will come back to you ten fold.

Microsoft has managed to break all three of those rules in just this one instance, and I seriously don’t see Microsoft even lasting long enough to get Vista out the door (which is at least another 4 or 5 years away).

Sorry, Bill, but it seems to be time to look for another job.