XSLT (Part #2 – Dynamic Links)

As previously mentioned, I’m a bit into XSLT at the moment. And again, to help me remember it, here is a snippet from an XSL file that creates a hyperlink with dynamic parameters:

<a>
<xsl:attribute name=”href”>
<xsl:text>address?param1=value1&param2=</xsl:text>
<xsl:value-of select=”param2″/>
</xsl:attribute>
<xsl:value-of select=”param2″/>
</a>

Update: Somehow WordPress ate an important detail in the code above – it’s necessary to use &amp; instead of just &…

XSLT and Firefox

If you do a lot of programming each day, you learn tons of things or how to do things. Solutions to difficult problems, crazy ideas that turn out to solve the issue in the end or details you bug around with for hours. It’s very often the case that you fix a problem but shortly after you completely forget how you did it. Ok, at least for me it’s very often the case.

Maybe that is why I thought about writing solutions down to avoid forgetting them. Today, I had to do some XSLT stuff and somehow there was no problem using an XML file with an XSL stylesheet in IE6, but Firefox refused to render it correctly. The solution to that is rather easy. It’s that easy that I invested hours and hours of continual distraction to not solve it in just a few seconds.

So here is my remark: Be sure to use text/xml as mime type of the XML document if you want Firefox to render it correctly when using a XSL stylesheet.

A Year Ago…

Exactly a year ago, I handed in my diploma thesis after a few months of transforming a few simple conclusions about high quality video streaming in high bandwidth environments into the most complex sentence structures – as far as my writing skills are concerned – I ever wrote, just, as everyone else who works on a thesis paper, to gain academic glory from people who figured out exactly the same trick years before.

Back then, all students were really happy that they got it done in the given time frame. Some of them got so excited that they decided to burn up some drafts of their papers as a statement of the very fact that it’s simply over. I failed to do so, but my draft versions are still somewhere around, so maybe it’s not too late…

Novarock

Heat. Sweat. Shlepping. Sunburn. Exhaustion. Alcohol. Alice in Chains. Motörhead. Metallica. Tinnitus. Total exhaustion. Burning feet. “Heeeelga.” Sleep deprivation. Dirt. Heat again, sweat again, sunburn again. 50,000 using a bunch of restrooms. Stench. Flood. Mud. Smut. Filth. Some guys muckraking. Torridity. Overpriced drinks. Headache. Live. Massive Attack. Placebo. Total exhaustion, again. Some more sleep deprivation. Barbecue. Drinking water. Dust. Three raindrops. Keith Caputo. Tool. Total exhaustion, happiness.

Going by Train

I’ve been using public means of transport more often in the last few weeks and months as they provide a relaxed way of getting from A to B. What is more, is that going by car is getting more and more expensive and if you’re travelling alone, you can do that for about half the price when using the train. One of the major advantages is that you are able to work on some code when carrying a laptop computer with you. However, as these laptops have limited battery capacity, it’s sometimes very helpful that at least in some waggons there are power outlets where you can plug in your computer.

As I write this entry, I’m sitting in a train named “Europäischer Computerführerschein” (german – “european computer driving licence”) and guess what – really funny – no power outlets here ;) For those of you wondering about the strange name – the major connections and trains, respectively, have all such strange names here in Austria…

Anyway, this time I was thinking of that possibility before entering the train and therefore my laptop batteries are fully charged…

(think of a two minutes break here)

Haha, it gets even funnier, I was just interrogated by a plainclothes policeman who was searching for something or someone I don’t know. He asked for identification, so I handed over my driver’s licence. He looked somehow puzzled for a few moments, then serious again as he realized that I wasn’t the terrorist he was looking for. He definitely didn’t get the point how funny it is to check a driver’s licence in a train with such a name…

The Hornet, Crosswords and sugar-free Coffee

Somehow this blog becomes a picture gallery…

hornet We’ve captured the hornet!

I’m currently sitting here having my breakfast (breakfast, but not too fast, as I occasionally comment on it), after I spent the majority of the last night programming. For me, there are two types of spending a night programming. First, when you keep working on your code, but it will not suddenly happen that everything fits together and you fall off your chair and sleep on the floor dreaming bad dreams. Second, when you keep working on your code and it will suddenly happen that everything fits together and your problem is solved. Sometimes, I like going for the second one. That’s also what I went for last night.

So now I’m here, feeling a little puzzled as every morning, doing some crosswords and trying a sugar-free coffee for the first time. I’ve always used the excuse that I need sugar for my brain, so I can’t drink sugar-free coffee. But let’s see, if this blog gets even weirder as it already is, it may be a result of lack of sugar.

MythTV + DVB-s and Astra

In my spare time, I’ve been playing around with MythTV, a PVR project based on Linux. A very nice feature is the use of program guides which enables the user to record programs easily. Basically, there are two ways to feed MythTV with program data. First, the use of XMLTV grabbers which download data from certain websites. Second, it is possible to get program information directly via EPG from the broadcast signal.

Unfortunately, the first alternative didn’t work out very well because of some grabber errors due to changes on certain websites… so I went for the second alternative.

Using version 0.19, EPG didn’t work out of the box when using Astra satellites. After searching the web for a solution, I’ve found this here useful (in siparser.cpp):

[cpp]

//The following was found to break EIT guide for
// Kristian Kalweit
if (n.LinkageType == 4)
{
PrivateTypes.GuideOnSingleTransport = true;
PrivateTypes.GuideTransportID = n.LinkageTransportID;
}
[/cpp]

I’ve removed these lines and voilà, works like a charm ;)

MythTV also features a bunch of plugins – my favorite one is MythWeb, which allows to control MythTV via a website. Here is a screenshot of it:

MythWeb

Recording TV programs is now officially considered as addictive.