A hack most terrible

Aside

XSL stylesheet for transforming XML jabber-GG transport user data into spectrum2 sqlite user database:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output method="text" indent="no"/>

<xsl:template match="/user">
  BEGIN TRANSACTION;
  INSERT OR REPLACE INTO users (jid, uin, password, language, encoding, last_login, vip)
    VALUES
    ('<xsl:value-of select="/user/jid"/>',
     '<xsl:value-of select="/user/uin"/>',
     '<xsl:value-of select="/user/password"/>',
     '',
     '',
     DATETIME('NOW'),
     0);
  COMMIT;

<xsl:for-each select="/user/userlist/contact">
  BEGIN TRANSACTION;
  INSERT INTO buddies (user_id, uin, subscription, groups, nickname, flags)
     select
       id,
       '<xsl:value-of select="@uin"/>',
       '<xsl:value-of select="@subscribe"/>',
       'Transport Gadu-Gadu',
       '',
       0
     from users where uin='<xsl:value-of select="/user/uin"/>';
  COMMIT;
</xsl:for-each>

  BEGIN TRANSACTION;
  INSERT INTO users_settings (user_id, var, type, value)
    select id, 'enable_transport', 4, '1' from users where uin='<xsl:value-of select="/user/uin"/>';
  COMMIT;
  BEGIN TRANSACTION;
  INSERT INTO users_settings (user_id, var, type, value)
    select id, 'send_headlines', 4, '0' from users where uin='<xsl:value-of select="/user/uin"/>';
  COMMIT;
  BEGIN TRANSACTION;
  INSERT INTO users_settings (user_id, var, type, value)
    select id, 'stay_connected', 4, '0' from users where uin='<xsl:value-of select="/user/uin"/>';
  COMMIT;

</xsl:template>
</xsl:stylesheet>

I’m almost sorry. (It worked, though.)