[yelp-xsl] Improvements to API docs
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-xsl] Improvements to API docs
- Date: Wed, 22 Jul 2015 04:20:14 +0000 (UTC)
commit fabc98d52ac74711189d7896c5e54f7ae9145c00
Author: Shaun McCance <shaunm gnome org>
Date: Wed Jul 22 00:19:54 2015 -0400
Improvements to API docs
doc/yelp-xsl/xsldoc-scan.xsl | 55 ++++++++++++++++++++++++++++++++-
xslt/mallard/common/mal-if.xsl | 2 +-
xslt/mallard/html/mal2html-block.xsl | 1 +
3 files changed, 55 insertions(+), 3 deletions(-)
---
diff --git a/doc/yelp-xsl/xsldoc-scan.xsl b/doc/yelp-xsl/xsldoc-scan.xsl
index 77bbd19..fc972a8 100644
--- a/doc/yelp-xsl/xsldoc-scan.xsl
+++ b/doc/yelp-xsl/xsldoc-scan.xsl
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?><!-- -*- indent-tabs-mode: nil -*- -->
<!--
xsldoc-scan.xsl - Put more information in the output from xsldoc-scan.awk
-Copyright (C) 2006 Shaun McCance <shaunm gnome org>
+Copyright (C) 2006-2015 Shaun McCance <shaunm gnome org>
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -94,7 +94,9 @@ free software.
<title>Calls Templates</title>
<xsl:for-each select="$calls_templates_nodes">
<xsl:sort select="."/>
- <item><p><xsl:copy-of select="."/></p></item>
+ <xsl:if test="not(preceding-sibling::*[ xref = current()/@xref])">
+ <item><p><xsl:copy-of select="."/></p></item>
+ </xsl:if>
</xsl:for-each>
</list>
</xsl:if>
@@ -212,6 +214,51 @@ free software.
</xsl:if>
</xsl:template>
+<xsl:template name="implements_templates">
+ <xsl:param name="node" select="."/>
+ <xsl:param name="page"/>
+ <xsl:param name="xslt_node"/>
+ <xsl:variable name="impls">
+ <xsl:for-each select="$xslt_node/xsl:template[ match]">
+ <xsl:variable name="mode" select="@mode"/>
+ <xsl:if test="not($page/processing-instruction('xslt-private')[string(.) = $mode])">
+ <template mode="{$mode}" match="{ match}"/>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:variable name="impls_nodes" select="exsl:node-set($impls)/*"/>
+ <xsl:if test="count($impls_nodes) != 0">
+ <table>
+ <title>Implements Templates</title>
+ <thead>
+ <tr>
+ <th><p>Mode</p></th>
+ <th><p>Match</p></th>
+ </tr>
+ </thead>
+ <tbody>
+ <xsl:for-each select="$impls_nodes">
+ <xsl:sort select="@mode"/>
+ <tr>
+ <td><p>
+ <xsl:choose>
+ <xsl:when test="@mode != ''">
+ <link xref="{ mode}">
+ <xsl:value-of select="@mode"/>
+ </link>
+ </xsl:when>
+ </xsl:choose>
+ </p></td>
+ <td><p>
+ <code><xsl:value-of select="@match"/></code>
+ </p></td>
+ </tr>
+ </xsl:for-each>
+ </tbody>
+ </table>
+ </xsl:if>
+</xsl:template>
+
<xsl:template name="read_chars">
<xsl:param name="string" select="''"/>
<xsl:if test="$string != ''">
@@ -325,6 +372,10 @@ free software.
<xsl:with-param name="page" select="$page"/>
<xsl:with-param name="xslt_node" select="$xslt_file"/>
</xsl:call-template>
+ <xsl:call-template name="implements_templates">
+ <xsl:with-param name="page" select="$page"/>
+ <xsl:with-param name="xslt_node" select="$xslt_file"/>
+ </xsl:call-template>
</page>
</xsl:template>
diff --git a/xslt/mallard/common/mal-if.xsl b/xslt/mallard/common/mal-if.xsl
index 93de009..3507f36 100644
--- a/xslt/mallard/common/mal-if.xsl
+++ b/xslt/mallard/common/mal-if.xsl
@@ -115,7 +115,7 @@ $test: The test expression.
This template evaluates the test expression ${test}, which is taken automatically
from the #{test} or #{if:test} attribute of $node. It splits the expression on
-commas into subexpression, then splits each subexpression on spaces into tokens.
+commas into subexpressions, then splits each subexpression on spaces into tokens.
A token is taken to be true if it's in one of the space-separated lists from
@{mal.if.target}, @{mal.if.platform}, @{mal.if.features}, or @{mal.if.custom}.
If the token starts with an exclamation point, the exclamation point is stripped
diff --git a/xslt/mallard/html/mal2html-block.xsl b/xslt/mallard/html/mal2html-block.xsl
index 24ccdd8..5595692 100644
--- a/xslt/mallard/html/mal2html-block.xsl
+++ b/xslt/mallard/html/mal2html-block.xsl
@@ -599,6 +599,7 @@ in accordance with the Mallard specification on fallback block content.
</xsl:if>
</xsl:template>
+<!--#% _mal2html.choose.mode -->
<xsl:template mode="_mal2html.choose.mode" match="if:when">
<xsl:variable name="if">
<xsl:call-template name="mal.if.test"/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]