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;
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%;
}
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
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