Update action points
g0dil [Fri, 23 Feb 2007 14:33:17 +0000 (14:33 +0000)]
git-svn-id: https://svn.berlios.de/svnroot/repos/senf/trunk@207 270642c3-0616-0410-b53a-bc976706d245

Socket/ClientSocketHandle.hh
Socket/FileHandle.hh
doclib/senf.css
senfscons/functions.xsl
senfscons/xrefhtml.xslt
senfscons/xrefxtract.xslt

index 2bd9052..95f1bb2 100644 (file)
@@ -200,7 +200,7 @@ namespace senf {
 
             \returns \c std::pair of data read (a string) and the peers address
 
-            \todo Add \c limit argument
+            \fixme Add \c limit argument
 
             \implementation The readfrom() family of members will use \c recvfrom from the BSD
             socket API.
@@ -243,7 +243,6 @@ namespace senf {
 
             \param[in] data Data to write
             \returns number of bytes written
-            \todo Make this member write the complete string if the socket is blocking
             \implementation The write() family of members will use POSIX \c write calls, not \c
                 send.
          */
index 2f6b09f..79985c4 100644 (file)
@@ -109,7 +109,7 @@ namespace senf {
         instance. This instance may either be a simple senf::FileBody or a class derived from
         senf::FileBody.
 
-        \todo Add public default constructor to allow declaration of (empty) senf::FileHandle
+        \fixme Add public default constructor to allow declaration of (empty) senf::FileHandle
         variables.
      */
     class FileHandle
index 1004b9f..3b83650 100644 (file)
@@ -178,13 +178,6 @@ table.senf th {
         font-weight: bold;
 }
 
-dl.bug, dl.fixme, dl.todo, dl.idea {
-        border: 1px solid #EE0000;
-        border-left-width: 4px;
-        background-color: #FFDDDD;
-        padding: 0 10px;
-}
-
 dl.xref-bug, dl.xref-fix, dl.xref-todo, dl.xref-idea {
         border: 1px solid #CC8888;
         padding: 2px 3px;
@@ -206,36 +199,41 @@ dl.xref-bug a, dl.xref-fix a, dl.xref-todo a, dl.xref-idea a {
         color: #6666FF;
 }
 
-dl.fixme {
-        border-color: #EEEE00;
-        background-color: #FFFFDD;
-}
-
 dl.xref-fix {
         border-color: #CCCC88;
         background-color: #FFFFEE;
 }
 
-dl.todo {
-        border-color: #00AA00;
-        background-color: #DDFFDD;
-}
-
 dl.xref-todo {
         border-color: #88CC88;
         background-color: #EEFFEE;
 }
 
-dl.idea {
-        border-color: #AAAAAA;
-        background-color: #EEEEEE;
-}
-
 dl.xref-idea {
         border-color:  #CCCCCC;
         background-color: #F8F8F8;
 }
 
+div.bug, div.fixme, div.todo, div.idea { 
+       padding-left: 10px;
+}
+
+div.bug { 
+       border-left: 10px solid red;
+}
+
+div.fixme { 
+       border-left: 10px solid yellow;
+}
+
+div.todo { 
+       border-left: 10px solid green;
+}
+
+div.idea { 
+       border-left: 10px solid #AAAAAA;
+}
+
 table {
         width: 100%;
 }
index f8e22f4..f0c5c4d 100644 (file)
@@ -7,6 +7,68 @@
   xmlns:exsl="http://exslt.org/common"\r
   extension-element-prefixes="str exsl func">\r
   \r
+<func:function name="str:split">\r
+       <xsl:param name="string" select="''" />\r
+  <xsl:param name="pattern" select="' '" />\r
+  <xsl:choose>\r
+    <xsl:when test="not($string)">\r
+      <func:result select="/.." />\r
+    </xsl:when>\r
+    <xsl:when test="not(function-available('exsl:node-set'))">\r
+      <xsl:message terminate="yes">\r
+        ERROR: EXSLT - Functions implementation of str:split relies on exsl:node-set().\r
+      </xsl:message>\r
+    </xsl:when>\r
+    <xsl:otherwise>\r
+      <xsl:variable name="tokens">\r
+        <xsl:choose>\r
+          <xsl:when test="not($pattern)">\r
+            <xsl:call-template name="str:_split-characters">\r
+              <xsl:with-param name="string" select="$string" />\r
+            </xsl:call-template>\r
+          </xsl:when>\r
+          <xsl:otherwise>\r
+            <xsl:call-template name="str:_split-pattern">\r
+              <xsl:with-param name="string" select="$string" />\r
+              <xsl:with-param name="pattern" select="$pattern" />\r
+            </xsl:call-template>\r
+          </xsl:otherwise>\r
+        </xsl:choose>\r
+      </xsl:variable>\r
+      <func:result select="exsl:node-set($tokens)/token" />\r
+    </xsl:otherwise>\r
+  </xsl:choose>\r
+</func:function>\r
+\r
+<xsl:template name="str:_split-characters">\r
+  <xsl:param name="string" />\r
+  <xsl:if test="$string">\r
+    <token><xsl:value-of select="substring($string, 1, 1)" /></token>\r
+    <xsl:call-template name="str:_split-characters">\r
+      <xsl:with-param name="string" select="substring($string, 2)" />\r
+    </xsl:call-template>\r
+  </xsl:if>\r
+</xsl:template>\r
+\r
+<xsl:template name="str:_split-pattern">\r
+  <xsl:param name="string" />\r
+  <xsl:param name="pattern" />\r
+  <xsl:choose>\r
+    <xsl:when test="contains($string, $pattern)">\r
+      <xsl:if test="not(starts-with($string, $pattern))">\r
+        <token><xsl:value-of select="substring-before($string, $pattern)" /></token>\r
+      </xsl:if>\r
+      <xsl:call-template name="str:_split-pattern">\r
+        <xsl:with-param name="string" select="substring-after($string, $pattern)" />\r
+        <xsl:with-param name="pattern" select="$pattern" />\r
+      </xsl:call-template>\r
+    </xsl:when>\r
+    <xsl:otherwise>\r
+      <token><xsl:value-of select="$string" /></token>\r
+    </xsl:otherwise>\r
+  </xsl:choose>\r
+</xsl:template>\r
+\r
   <!-- ==================================================================== -->\r
   <!-- node-set str:replace(string,object,object)                           -->\r
   <!--                                                                      -->\r
index 3d4dcbc..3c81bfd 100644 (file)
@@ -4,7 +4,8 @@
   xmlns:fn="http://senf.berlios.de/xml/Extensions"\r
   xmlns:exsl="http://exslt.org/common"\r
   xmlns:str="http://exslt.org/strings"\r
-  extension-element-prefixes="str fn exsl"\r
+  xmlns:func="http://exslt.org/functions"\r
+  extension-element-prefixes="str fn exsl func"\r
   version="1.0">\r
 \r
   <xsl:include href="functions.xsl"/>\r
   <xsl:output method="html"/>\r
   <xsl:strip-space elements="*"/>\r
   <xsl:param name="title" select="''"/>\r
+  <xsl:param name="types" select="'bug fixme todo idea'"/>\r
 \r
   <xsl:template match="/">\r
-    <h1><xsl:value-of select="$title"/></h1>\r
-    <xsl:apply-templates/>\r
+    <div class="xref">\r
+      <h1><xsl:value-of select="$title"/></h1>\r
+      <xsl:variable name="doc" select="."/>\r
+      <div class="nav">\r
+        <xsl:text> -- </xsl:text>\r
+        <xsl:for-each select="str:split($types)">\r
+          <xsl:element name="a">\r
+            <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>\r
+            <xsl:value-of select="translate(.,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>S</xsl:text>\r
+          </xsl:element>\r
+          <xsl:text> -- </xsl:text>\r
+        </xsl:for-each>\r
+      </div>\r
+      <xsl:for-each select="str:split($types)">\r
+        <xsl:variable name="type" select="string(.)"/>\r
+        <xsl:element name="div">\r
+          <xsl:attribute name="class"><xsl:value-of select="$type"/></xsl:attribute>\r
+          <xsl:element name="a">\r
+            <xsl:attribute name="name"><xsl:value-of select="$type"/></xsl:attribute>\r
+            <h2>Open <xsl:value-of select="translate($type,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>s</h2>\r
+          </xsl:element>\r
+          <xsl:for-each select="$doc//xreflist[@type=$type]">\r
+            <xsl:sort select="@module"/>\r
+            <h3><xsl:value-of select="@module"/> module</h3>\r
+            <dl>\r
+              <xsl:apply-templates/>\r
+            </dl>\r
+          </xsl:for-each>\r
+        </xsl:element>\r
+      </xsl:for-each>\r
+    </div>\r
   </xsl:template>\r
 \r
-  <xsl:template match="xreflist">\r
-    <xsl:if test="string(preceding::xreflist[1]/@module)!=string(@module)">\r
-      <xsl:if test="preceding::xreflist">\r
-        <hr/>\r
-      </xsl:if>\r
-      <h2>The <xsl:element name="a">\r
-        <xsl:attribute name="href">../../<xsl:value-of select="@module"/>/doc/html/index.html</xsl:attribute>\r
-        <xsl:value-of select="@module"/>\r
-      </xsl:element> module</h2>\r
-    </xsl:if>\r
-    <xsl:element name="dl">\r
-      <xsl:attribute name="class"><xsl:value-of select="@type"/></xsl:attribute>\r
-      <dt><h3><xsl:value-of select="translate(@type,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/> items</h3></dt>\r
+  <xsl:template match="compound">\r
+    <dt>\r
+      <xsl:element name="a">\r
+        <xsl:attribute name="href"><xsl:value-of select="fn:id2url(@id)"/></xsl:attribute>\r
+        <b><xsl:value-of select="@name"/></b>\r
+      </xsl:element>\r
+    </dt>\r
+    <dd>\r
       <xsl:apply-templates/>\r
-    </xsl:element>\r
+    </dd>\r
   </xsl:template>\r
 \r
+  <xsl:template match="item">\r
+    <p><xsl:apply-templates/></p>\r
+  </xsl:template>\r
+  \r
+  <!-- ====================================================================== -->\r
+  <!-- Helper functions                                                       -->\r
+\r
   <fn:nsquote>\r
     <fn:replacement>\r
       <fn:match>_1_1</fn:match>\r
 \r
   <xsl:variable name="nsquote" select="document('')//fn:nsquote/fn:replacement"/>\r
   \r
-  <xsl:template match="compound">\r
+  <func:function name="fn:id2url">\r
+    <xsl:param name="id"/>\r
     <!-- Yuck ... I HATE this .. why doesn't xsltproc support XPath 2.0 ... grmpf -->\r
     <xsl:variable name="quoted">\r
-      <xsl:apply-templates select="str:replace(@id,$nsquote/fn:match,$nsquote/fn:replace)"/>\r
+      <xsl:apply-templates select="str:replace($id,$nsquote/fn:match,$nsquote/fn:replace)"/>\r
     </xsl:variable>\r
     <xsl:variable name="anchor" select="substring-after($quoted,'_1')"/>\r
     <xsl:variable name="file">\r
       <xsl:apply-templates select="str:replace(substring($quoted,1,string-length($quoted) - number(boolean($anchor))*2 - string-length($anchor)),$nsquote/fn:replace,$nsquote/fn:match)"/>\r
     </xsl:variable>\r
     <xsl:variable name="sep" select="substring('#',2-number(boolean($anchor)))"/>\r
-    <dt>\r
-      <xsl:element name="a">\r
-        <xsl:attribute name="href">../../<xsl:value-of select="ancestor::xreflist/@module"/>/doc/html/<xsl:value-of select="$file"/>.html<xsl:value-of select="$sep"/><xsl:value-of select="$anchor"/></xsl:attribute>\r
-        <b><xsl:value-of select="@name"/></b>\r
-      </xsl:element>\r
-    </dt>\r
-    <dd>\r
-      <xsl:apply-templates/>\r
-    </dd>\r
-  </xsl:template>\r
-\r
-  <xsl:template match="item">\r
-    <p><xsl:apply-templates/></p>\r
-  </xsl:template>\r
+    <func:result>../../<xsl:value-of select="ancestor::xreflist/@module"/>/doc/html/<xsl:value-of select="$file"/>.html<xsl:value-of select="$sep"/><xsl:value-of select="$anchor"/></func:result>\r
+  </func:function>\r
 \r
 </xsl:stylesheet>\r
index e09ff4f..8a79414 100644 (file)
@@ -17,9 +17,9 @@
           <xsl:value-of select="string(varlistentry/term)"/>\r
         </xsl:attribute>\r
         <xsl:text>&#xA;</xsl:text>\r
-        <xsl:variable name="curid" select="varlistentry/term/ref/@refid"/>\r
+        <xsl:variable name="curid" select="varlistentry/term/ref[1]/@refid"/>\r
         <xsl:apply-templates \r
-          select="//variablelist[varlistentry/term/ref/@refid=$curid]"\r
+          select="//variablelist[varlistentry/term/ref[1]/@refid=$curid]"\r
           mode="inlist"/>\r
       </xsl:element>\r
       <xsl:text>&#xA;</xsl:text>\r