RSS date formatting with MSXML4

Damn, I’ve been looking for this for a long time, but I couldn’t find a proper solution. So, what was the problem? Well, I wanted to create a page that gives an overview of several RSS-feeds I follow. The page should replicate some information of these feeds: just the title and the date of the last 5 posts. I wanted to give the date in the feed (i.e. ‘pubDate’) a nice Dutch look and feel, so the rather unreadable “Fri, 15 Sep 2006 13:57:48 +0000” would become “15 september 2006”. These RSS-feeds I parse with an XSLT-stylesheet using (Classic) ASP.

A date in a RSS-feed must be defined as RFC-822. However, I could not use the handy date-time functions for XSLT 2.0 to format this date, because these are not supported by MSXML4, the XML-parser my provider supplies. MSXML supports the ms:format-date function, but this function can handle only standard XSD date formats, which RFC-822 is not. (Bloody hell, I wanted to get back to client-side coding!)

The solution I took is the following: using VBScript in my stylesheet I parse the RFC-822 date as a string and build my Dutch date format with my own hands:


<?xml version='1.0' encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt"
    xmlns:vbs="urn:schemas-sqlxml-org:vbs">

<msxsl:script language="VBScript" implements-prefix="vbs">
  <![CDATA[

   function formateDate(datum)
     dim arr, mnd, x, y, dag, jaar
     arr = Split("Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec", ",")
     mnd = Split("januari,februari,maart,april,mei,juni,juli,augustus,september,oktober,november,december", ",")
     For x = 0 To UBound(arr)
       If InStr(datum, arr(x)) Then
         y = InStr(datum, arr(x))
         dag = Left(datum, y)
         jaar = Mid(datum, y, 8)
         formateDate = stripNr(dag) & " " & mnd(x) & " " & stripNr(jaar)
         exit function
       End If
    Next
    formateDate = ""
   end function

   function stripNr(nr)
     dim arr, str, x
     arr = Split(nr)
     for x = 0 to UBound(arr)
       if isNumeric(arr(x)) then str = str & arr(x)
     next
     stripNr = str
   end function

  ]]>
</msxsl:script>

[... some more code ...]

I’m not sure if this is a good approach, but luckily it works, and it’s good enough for me, because the page I wanted to create is just a start page for my mother with references to several baby blogs: greut.nl/startpagina.

Nonetheless I’m very pleased to get feedback on the code, if you have a better solution, please share it with me!

Tags: , , , , ,

d.Construct 2006: a second feedback

The programme at d.Construct left hardly any spare time, so filling in a feedback form far before the end of the conference did not make much sense. But we had to, otherwise we didn’t take part in the contest. So here’s a quick wrap-up, which can be considered to be my final feedback for d.Construct. Let’s start with the top issues and end with the horrors:

++

  • Jeffrey Veen’s talk on Designing the complete user experience was again a splendid performance. He alone was worth the entry fee for this conference.
  • Derek Featherstone’s examples of real life accessiblity problems with simple user interfaces compensated a lot the interesting (but accessibility neglecting) speeches on AJAX and Flash.
  • Yahoo! idea of ‘hack day’ (presented by Simon Willison and Paul Hammond) is an absolutely interesting concept for other internet companies too.
  • The backnetwork (only accessible by attendees) was excellent. Well done!
  • Brighton is a perfect location for web conferences. Not that far from airports and meanwhile sunny, beachy, interesting and alternative.
  • Serving tea with milk! This is one of the greatest shortcomings of the Netherlands.

+

  • The talks on AJAX and mash-ups definitely triggered me. Being an accessibility advocate myself, I’m normally not that interested in trendy technics that break the usebility or accessibility experience. Now, I’m sure to try out some things. As Jeremy stated “just because the joy of it”.
  • Meeting other attendees is always interesting. I talked to PPK on his new book and we came to the idea that in the Netherlands we are in need of a mash-up that compares book prices of different Amazon shops (USA, UK, Germany), including their shipping fee.

  • Jeff Barr’s talk on Amazon’s web services was totally useless, being nothing more than an ordinary sales talk on Amazon’s activities. Clear:left apparently needed the money?
  • It would have been very convenient if the organisation had handed out some paper to make notes on. As blogging was nearly impossible, ordinary hand written notes came to the rescue.

– –

  • The conference centre Brighton Corn Exchange, ouch, is not a conference centre! There was so little space between the chairs that my legs still hurt and I didn’t know where to put my arms. Working on a laptop of course was impossible, even if there had been more light. I suppose there hasn’t been a lot of blogging during the day. Tip: choose something like a university auditorium for the conference?
  • There were no power supplies available in the conference room, so unless you brought in three spare batteries, your laptop would have run out of service during the first or second session. As mentioned above, blogging was hardly possible, so this is just a tip for next year. I definitely will not come back next year if these last two points won’t be solved properly.

Tags: ,

Het W3C is geen godheid

Er is de laatste tijd een hoop heibel binnen en rondom het W3C. Gaat het niet om accessibility (WCAG 2 – bevrijding uit een keurslijf?) dan wel om een SVG specificatie. Bekende namen verlaten het W3C en gerenommeerde bloggers nemen de ‘opstellers van onze standaarden’ ongenadig onder vuur.

David Baron, een Mozilla developer die ook in de W3C’s CSS working group zit, licht in zijn artikel More W3C Controversy toe hoe besluitvorming binnen het W3C werkt. Zijn uitvoerige verhaal komt in feite neer op de wens van het W3C om het web voor de pc en het mobiele web aan één standaard te laten voldoen en de weigering van vooral de vertegenwoordigers van het mobiele spectrum hier aan te voldoen:

The problem is that they don’t have much incentive to choose behavior that’s compatible with the content on the Web.

Het vastleggen van standaarden lijkt vervolgens neer te komen op een wedloop wie het eerst zijn regels op papier heeft neergekalkt om op die manier de tegenpartij voor het blok te zetten.

Baron komt ook met een oplossing. Misschien moeten we de W3C-soep niet zo heet eten als ze wordt opgediend:

No members of the W3C should be obliged to implement any specifications, or criticized for failing to do so simply because the specification they do not implement is a W3C Recommendation. Instead, specifications should compete on their own merits among implementors, authors, and users.

Baron is van mening dat bijvoorbeeld Microsoft de CSS2-standaarden in IE7 niet heeft geimplementeerd omdat het W3C-standaarden zijn, maar omdat Microsoft dacht dat dat voor hun product de beste keuze was.

Dat hoeft helemaal geen probleem te zijn, vindt Baron, zeker niet als de interne strijd binnen het W3C de developer of de gebruiker met onmogelijke of onbelangrijke regels opzadelt:

We should work on, and implement, the standards that we think are appropriate for Web browsers, and ignore the rest.

Het gevaar van deze benadering is natuurlijk dat iedereen op eigen houtje een standaard kan gaan implementeren en dat we terugvallen naar de reuzeverschillen tussen IE4 en NN4. Hopelijk is de webcommunity sterk en eensgezind genoeg om in elk geval over de belangrijke regels overeenstemming af te dwingen.

Tags: , , , , ,

Happy clog

Happy Clog laat weer van zich horen. Martin Reurings heeft een steen in de stille vijver gegooid om te achterhalen of er nog leven in de klomp zit: hij is de Google Group Happy Clog gestart.

Achter Happy Clog zit een aantal jonge (en een enkele iets minder jonge), ervaren en enthousiaste webontwikkelaars. Hun idee was het promoten van webstandaarden in Nederland, maar hun eerste acties leken voor de buitenstaander vooral neer te komen op het drinken van bier en het opscheppen daarover tegen hun Engelse brothers in crime.

Het meest vruchtbare idee kwam van Faruk, die – analoog aan @media – een Nederlandse front-end webconferentie wilde organiseren. Helaas is het daar nog niet van gekomen.

Een paar tips daarom voor een succesvolle Happy Clog:

  • Bijt je niet vast in procedures. Wat maakt het uit of happyclog.nl een wiki is? Is het per se nodig om van tevoren af te spreken om eens in de zoveel maanden bij elkaar te komen?
  • Probeer de groep open te houden voor buitenstaanders. Een ouwejongen-krentebroodsfeer kan potentieel geinteresseerden buiten de deur houden. En daar kunnen juist de mensen tussen zitten die je wilt overtuigen.
  • Wees niet bang de dialoog aan te gaan met de grote internetbureaus in Nederland. Daar zitten immers de jongens (en meisjes) die de meeste Nederlandse sites bouwen, met niet altijd even bewonderenswaardige uitgangspunten als het om client-side code gaat.
  • Het idee van een conferentie blijft aantrekkelijk. Ik zou echter niet puur op eigen houtje opereren. Kennis van webstandaarden is één, maar voor het organiseren van een conferentie moet je ook uit een ander vaatje kunnen tappen. Jullie zijn niet de enigen in Nederland die het belang van webstandaarden onderkennen. Is het mogelijk om hulp te verkrijgen van bijvoorbeeld Accessibility of een ministerie? Ook zou ik me voor kunnen stellen dat een groot internetbedrijf graag zijn naam verbindt aan een dergelijk initiatief. En wellicht is het mogelijk om als subonderdeel onder een bestaande conferentie te opereren?

Tags: ,

IE7 klaar voor verzending

We are currently locking down IE7 for shipping

meldt het IEBlog in het artikel Details on our CSS changes for IE7.

To preserve application compatibility we will not make any behavioral changes to “quirks mode” as it has been established since IE6.

Maar standards compliant mode is flink onder handen genomen!

Van wat testers in mijn omgeving hoor ik wisselende geluiden. IE7b3 zou voortdurend crashen en bij de-installatie core-Windows-dll’s besmetten, zodat een nieuwe installatie van XP de enige manier is om niet voortdurend met ‘hangende’ schermen geconfronteerd te worden.

Hopelijk doet Microsoft IE7 nog niet deze week op de bus.

Tags:

How to tag d.Construct 2006?

In between every @media-session the attenders of the conference could see a slide saying something like “Please tag your posts, photo’s etc. with ‘atmedia2006′”. My first reaction was: “Go away, I can define my own tags!” But of course this message contributed to consistent tagging. Have a look at Technorati or Flickr!

Nowadays I think it even would be better if the organiser of an event as soon as possible announces his favourite tag for the conference. It would assure that also the posts that are written before the event takes place, are logically tagged.

So, the next big event approaches: d.Construct. How should we tag our posts on this conference? (Posts already appear!) Shouldn’t ClearLeft give us a hint? Jeremy, for example, tagged a post on d.Construct with ‘dconstruct06’ and ‘dconstruct’, Andy doesn’t tag at all, Richard also uses‘. So, at first glance ‘dconstruct06’ seems to be an appropriate tag.

But shouldn’t there be an overall and logical tagging convention for conferences? Then, everybody would always know how to tag. I’d propose something like [conference name] (stripped of spaces and special characters) + [year]? In that case @media was tagged correctly with ‘atmedia2006’, but d.Construct should be renamed to ‘dconstruct2006’.

Tags: , , , , ,

Sprekers op d.Construct: 1. Derek Featherstone

Hoewel de laatste tijd weinig nieuws verschijnt op box of chocolates van Derek Featherstone verrast dit weblog sporadisch met berichten over webtoegankelijkheid. Ik kende hem als de man die het begrip webstandaarden toelichtte voor leken. Maar Derek Featherstone heeft vooral het stempel van toegankelijkheidsspecialist op zijn voorhoofd gedrukt staan. Hier schijnt hij jarenlange ervaring mee te hebben. Ook heeft hij zitting in diverse clubjes die webstandaarden promoten.

Ik heb geen idee idee waar Derek op d.Construct over gaat spreken, maar waarschijnlijk is het iets hips in combinatie met accessibillity. In februari publiceerde het Digital Web Magazine een uitvoerig interview met hem.

Tags: ,