Archive for July, 2004

XSL for Formatting OPML

Wednesday, July 21st, 2004

I just wrote a simple XSL file that formats OPML files which contain lists of feeds/websites, like the ones you get when exporting feed listings from a feed reader. In particular, I wanted to be able to convert the OPML files created by FeedDemon to XHTML, and put them on this site.

Here it is, in case you want to have it:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns="http://www.w3.org/1999/xhtml">
 <xsl:output method="xml" encoding="UTF-8"
  omit-xml-declaration="yes" indent="yes"
  doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
  doctype-system=
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" />

 <xsl:template match="/opml">
  <html>
   <head>
    <title>
     <xsl:apply-templates select="head/title" /> (OPML)
    </title>
    <meta http-equiv="Content-Type"
     content="text/html; charset=UTF-8" />
   </head>
   <body>
    <h1><xsl:apply-templates select="head/title" /></h1>
    <ul class="opml">
     <xsl:apply-templates select="body/outline" />
    </ul>
   </body>
  </html>
 </xsl:template>

 <xsl:template match="outline">
  <li>
   <a href="{@htmlUrl}"><xsl:value-of select="@text" /></a>
  </li>
 </xsl:template>

</xsl:stylesheet>

It’s not much, but it’s a start, and it does what I want it to. Feel free to use and modify it.

Weblog Added to java.blogs

Tuesday, July 20th, 2004

The Java category (feed) of this weblog is now aggregated on java.blogs. I thought it would be a good idea to add it there, and the referrer statistics seem to prove me right.

Since I added the feed of the Java category, entries like this one won’t show up on java.blogs. After all, I’ve been posting quite a lot of entries unrelated to Java, so I thought that would be the best way to do it.

Anyhow, all of you who’ve come here from java.blogs, and all other new readers as well, welcome!

Working on the Website

Monday, July 19th, 2004

There are still some things left from my initial plan for this website, so I began working on them today. For example, there is still no proper contact page, nor enough info for those who are interested in hiring me as a consultant.

While working on it, I’m deploying it to a local Tomcat installation so I won’t mess anything up on this server, which means there isn’t anything new here yet. Anyway, now you know what I’m up to!

Entries (RSS)