February 13, 2009: Valid XHTML output using Google Mini Appliance transformation engine

I've been trying to output valid XHTML code from the Google Mini Search Appliance. The XML transformation was applying xmlns attributes to various, seemingly random elements which causes the output XHTML to fail validation.

<ol xmlns="">

As Kamiel Martinet pointed out, in any normal XSLT application you can overcome this by simply adding the xmlns to the stylesheet node.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">

However, this causes the Google Mini front end transformation to fail, resulting in the transformation to fail with the following message.

Internal error processing stylesheet.

This leaves me with the choice but to render invalid XHTML from the Google Mini transformation engine. One alternative solution is to use another transformation engine, but that is not an option for this current project.

When and if I find a solution to this, I will post it here.

May 30, 2005: Extracting email addresses

Recently I had to send an email newsletter to many recipients. The email addresses supplied were in a single column of a spreadsheet. My mass email sending application uses a comma separated list of addresses. Not usually a problem, a simple CSV export of this list does the job. Only in this case some email addresses were not in a valid format.

For examaple:

foo@domain.com [foo@domain.com]

I needed a quick way to identify each of these non-valid addresses and manipulate them into a usable format.

Continue reading "Extracting email addresses"

| Code

March 15, 2005: Add content with CSS

I had a use for some flashy CSS 2.0 code the other day. I couldn't find it in my library, which was really annoying. I've decided to store various bits of handy code on here. Here's the first:

a:after {
   content: " (" attr(href) ") ";
   font-size: 80%;
   }

Add the content rule to anchors in your print stylesheet as aboue & you'll have lovely little URL's of each link placed in brackets after the link content.

This doesn't work on Internet Explorer though. Does work on Firefox. So think of is as an enhancement rather than rely on it.