April 2003 Archives
April 29, 2003

iTunes Music Store rocks!

iTunes4 Store Music

Apple's iTunes Music Store is impressive! Using the very simple and familiar user interface of iTunes, Apple has created a very powerful application, which blurs the line between the locally stored music and the online stored music.

It is a very nice integration between a desktop application and an online Web service. Listening and buying music cannot be done easier than this!

I still need to experiment with the ability to rip CDs, encode using the AAC format and listen to them on my now old iPod. The MP3 playback quality on iPod is quite good, I'm curious to see how much improvement AAC brings.

Posted by ovidiu at 11:09 PM |
April 15, 2003

Google Daily Menus


Steven, this might interest you: Google Daily Menus (directly via google.dirson.com).

Yummy stuff: Charlie and his team are amazing! He also treats us daily with Grateful Dead, Jerry Garcia, Steve Kimock and other good stuff.

Posted by ovidiu at 11:40 PM |
April 09, 2003

Starting a new instance of an application


I remember that in the old NeXTSTEP/OPENSTEP systems that MacOS X is based on, you were able to start a new instance of an application by holding the Alt key down (I think) while double-clicking on the application's icon in the file manager. This way you could have the same application running multiple times.

I tried different key combinations, but it seems this is not possible. Is this functionality available in MacOS X Jaguar?

Posted by ovidiu at 10:46 PM |
April 07, 2003

BitTorrent is slow

Hazy sunset at San Gregorio State Beach, California

Bill Bumgarner was kind enough to submit etree packages for Fink/MacOS X; in his Weblog article he also has some links to the recording of Grateful Dead's show at Boston Garden in 1973.

On Saturday, I hastily started to install the tools on my Powerbook. After a first unsuccessful try, I pinged Bill to find out that I need to upgrade to the unstable Fink to be able to install his packages. After the upgrade, flac would still not compile. Instead of trying to figure out what's wrong, I decided to install them on one of my Linux boxes at home. Installing the BitTorrent client required compiling and installing wxPython first (I couldn't find RPM for my not-so-old Mandrake system :(, so I had to do that first.

As soon as I had the BitTorrent client compiled, I started the Grateful Dead download. I was unpleasantly surprised to discover that downloading 966Mb would take about 2 days! The download rate was only around 10kb/sec, which is more than twenty times slower than that of a typical download from home! Only by Monday morning I had the show completely downloaded :(

Incidentally, if you like Grateful Dead, Jerry Garcia and friends, a much better source for their music is gdlive.com. It includes both shn files and pre-made MP3 which are great for listening on an iPod. If you decide to download the shn files, you'll need to install shntool, shorten and the etree-scripts. The last package contains scripts to make easy burning audio CD using cdrecord. On Linux this is a no-brainer; on MacOS X it should be easy as well, once you have Bill's packages. Otherwise just compile the sources from scratch, it should work just fine.

Posted by ovidiu at 10:17 PM |
April 03, 2003

Marcus Crafter's weblog


Marcus finally has his very own Weblog! And a Happy Birthday! The work here looks very promising, I hope you finished it ;) Cheers mate!

Too bad Marcus' Weblog is not trackback enabled yet, luckily it should be easy to fix.

Posted by ovidiu at 10:24 PM |

Advanced XSLT usage or using XSLT to generate XSLT

Lake Tahoe from Heavenly

XSLT is a very powerful language. Most people use it to convert XML to HTML: they have an XML document which needs to be translated to a rich HTML document.

The simplest way to do this is to identify how the input XML document maps to the final HTML page, and come up with the XSLT stylesheet that embeds in its templates the HTML elements of the end result. While this works fine for one HTML page, it becomes really tedious if the page needs to change often or if you need to format the input XML multiple times.

A much better approach is to take the resulting HTML page and annotate it with your own special elements. These special elements are invented for your specific problem to delimit portions of the HTML page that need to be replaced with dynamic content from the XML input file.

Once you've annotated the output file, you can write an XSLT program that takes the output page and generates an XSLT stylesheet. The generated XSLT stylesheet will take the input XML document and generate an HTML page with exactly the same structure of the page you want.

There are few things that you need to worry about when writing such an XSLT program. The output you generate is not a generic XML output, it is an XSLT program which needs to follow the XSLT namespace. To generate this namespace you need to use the xsl:namespace-alias element to alias a namespace in the current document to the XSLT namespace:


  <xsl:namespace-alias stylesheet-prefix="gen" result-prefix="xsl"/>

  <xsl:template match="/">
    <!-- Generate the structure of the XSL stylesheet -->
    <gen:stylesheet version="1.0">
      <gen:output method="html"/>

      <!-- put the logic for the generated XSLT here --!>
      <gen:template match="...">

Writing such XSLT programs is not trivial, but you'll appreciate how clean they are. You will not have to embed in your stylesheet any of the output HTML that you need to generate; the generate stylesheet will have all that.

Posted by ovidiu at 09:24 PM |
Cool stuff
  Arduino TinyWebServer: part 3 and part 2
More from me
Picture gallery
Copyright © 2002-2016 Ovidiu Predescu.