changelog shortlog tags files raw zip gz

changeset: Attempts to implement proper parsing of non-absolute links.

changeset 9: 8a30b90da375
parent 8:d09421b8f11e
tag:tip
author: Dmitry Dzhus <mail@sphinx.net.ru>
date: Wed Jul 04 21:25:41 2007 +0400 (18 months ago)
files: TODO make-manyeyes-network.xsl mf-extract.xsl
description: Attempts to implement proper parsing of non-absolute links.
       1--- a/TODO	Wed Jul 04 13:09:43 2007 +0400
       2+++ b/TODO	Wed Jul 04 21:25:41 2007 +0400
       3@@ -4,6 +4,13 @@
       4   CLOSED: [2007-07-03 Втр 10:44]
       5   For example, `rel="cosmetics"` matches current patterns while it
       6   doesn't comply with XFN format.
       7+* TODO Improper handling of relative links	:bug:
       8+  E.g. <a href="/author">Link</a> on a site with URL
       9+  http://test.com/blog/latest/ will be extracted and treated as
      10+  http://test.com/blog/latest/author instead of
      11+  http://test.com/author.
      12+
      13+  Current solution is to ignore non-absolute links at all.
      14 * TODO [#B] Respect hCard
      15 * DONE [#C] Tags must be lowercased
      16   CLOSED: [2007-06-30 Сбт 21:14]
     1.1--- a/make-manyeyes-network.xsl	Wed Jul 04 13:09:43 2007 +0400
     1.2+++ b/make-manyeyes-network.xsl	Wed Jul 04 21:25:41 2007 +0400
     1.3@@ -32,8 +32,8 @@
     1.4   <xsl:template name="label-by-url">
     1.5     <xsl:param name="url" />
     1.6     <xsl:choose>
     1.7-      <xsl:when test="string-length(//site[@url=$url]/title) > 0">
     1.8-        <xsl:value-of select="//site[@url=$url]/title" />
     1.9+      <xsl:when test="string-length(//site[contains($url, @url)]/title) > 0">
    1.10+        <xsl:value-of select="//site[contains($url, @url)]/title" />
    1.11       </xsl:when>
    1.12       <xsl:otherwise>
    1.13         <xsl:value-of select="@url" />
     2.1--- a/mf-extract.xsl	Wed Jul 04 13:09:43 2007 +0400
     2.2+++ b/mf-extract.xsl	Wed Jul 04 21:25:41 2007 +0400
     2.3@@ -75,7 +75,14 @@
     2.4   <xsl:template name="xfn-link">
     2.5     <rel>
     2.6       <xsl:attribute name="url">
     2.7-        <xsl:value-of select="@href" />
     2.8+        <xsl:choose>
     2.9+          <xsl:when test="starts-with(@href, 'http://')">
    2.10+            <xsl:value-of select="@href" />
    2.11+          </xsl:when>
    2.12+          <xsl:otherwise>
    2.13+            <xsl:value-of select="concat($site-url, @href)" />
    2.14+          </xsl:otherwise>
    2.15+        </xsl:choose>        
    2.16       </xsl:attribute>
    2.17       <xsl:attribute name="type">
    2.18         <xsl:value-of select="@rel" />