Posts tagged with 'Hell'

Greetings from Crematoria II

  • Posted on July 13, 2010 at 11:27 pm

It’s the Summer of Summers again here in Vienna. Good thing we’re not in Australia.

I usually never leave the house, but we went to Australia recently—the whole family was there—it was a ridiculous place. Located three quarters of a mile from the surface of the sun, people audibly crackling as they walk past you on the street. That’s why they all barbecue, you don’t need to cook somewhere like that, you just bring the shit out, fling it on a grill and it bursts into flames.

That’s what Dylan Moran has to say about Australia. It’s not that bad here – yet. We will be probably getting there by the weekend.

But it’s a dry heat!

Fuck you!

XML Parsers considered harmful

  • Posted on July 6, 2010 at 8:08 pm

I am fighting with Xalan and Xerces (in C++). After looking for decent tutorials (there are none) I found this little gem among the Google results. It clearly emphasises what I already know. XML parsers are from Hell. Xalan & Xerces are especially tricky since they’ve been ported from Java. The API is a bit weird. Some things contradict intuition. For example if you initialise the transformation engines more than once per process run, the destructor for the XSLTInputSource crashes with SIGSEGV. You get no clue. You return() and just as the objects get out of scope your program crashes. The secret is hidden in the API documentation. And you cannot easily stop the XSLT transformer from downloading/accessing the document’s DTD. You have to provide your own EntityResolver class that resolves all entities without DTD, if you wish to ignore it. Charming. Bureaucratic. Have I mentioned Java already?

Google result hit for XML parser software with a malware warning.

XML considered harmful.

If you know a decent and light-weight XSLT transformation library, let me know. I just need to delete tags from HTML, XHTML and XML documents (which worked well with regular expressions before). The XSLT template is quite short, and the task isn’t very complicated.