|
Boost-Commit : |
From: fmhess_at_[hidden]
Date: 2007-11-29 09:44:13
Author: fmhess
Date: 2007-11-29 09:44:12 EST (Thu, 29 Nov 2007)
New Revision: 41461
URL: http://svn.boost.org/trac/boost/changeset/41461
Log:
Made generated ids for functions and overloaded functions human-readable
which also results in (mostly) human-readable names for
their .html output files. Made generate.id template properly use
its node parameter.
Text files modified:
sandbox/boost_docs/trunk/tools/boostbook/xsl/chunk-common.xsl | 3 ++-
sandbox/boost_docs/trunk/tools/boostbook/xsl/lookup.xsl | 8 +++++---
sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl | 20 +++++++++++++-------
3 files changed, 20 insertions(+), 11 deletions(-)
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/chunk-common.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/chunk-common.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/chunk-common.xsl 2007-11-29 09:44:12 EST (Thu, 29 Nov 2007)
@@ -32,7 +32,8 @@
<xsl:variable name="basename" select="substring-before( $their, $html.ext )"/>
<xsl:choose>
<xsl:when test="not($recursive)">
- <xsl:value-of select="translate( $basename, '.', '/' )"/>
+ <!-- translate dots into directory separators, and replace illegal file path characters with underscores -->
+ <xsl:value-of select="translate( $basename, '.<>\:*?"|', '/_______' )"/>
<xsl:value-of select="$html.ext"/>
</xsl:when>
<xsl:otherwise>
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/lookup.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/lookup.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/lookup.xsl 2007-11-29 09:44:12 EST (Thu, 29 Nov 2007)
@@ -15,9 +15,11 @@
<xsl:template name="generate.id">
<xsl:param name="node" select="."/>
<xsl:apply-templates select="$node" mode="generate.id"/>
- <xsl:if test="ancestor::class-specialization|ancestor::struct-specialization|ancestor::union-specialization">
- <xsl:text>-spec</xsl:text>
- <xsl:value-of select="generate-id(.)"/>
+ <xsl:if test="$node/ancestor-or-self::class-specialization|
+ $node/ancestor-or-self::struct-specialization|
+ $node/ancestor-or-self::union-specialization">
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="generate-id($node)"/>
</xsl:if>
</xsl:template>
Modified: sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl
==============================================================================
--- sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl (original)
+++ sandbox/boost_docs/trunk/tools/boostbook/xsl/type.xsl 2007-11-29 09:44:12 EST (Thu, 29 Nov 2007)
@@ -34,13 +34,10 @@
</xsl:template>
<xsl:template match="class-specialization|struct-specialization|union-specialization" mode="generate.id">
- <xsl:variable name="specialization-name">
- <xsl:call-template name="fully-qualified-name">
- <xsl:with-param name="node" select="."/>
- <xsl:with-param name="separator" select="'.'"/>
- </xsl:call-template>
- </xsl:variable>
- <xsl:value-of select="translate($specialization-name, '<>', '__')"/>
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="separator" select="'.'"/>
+ </xsl:call-template>
</xsl:template>
<xsl:template match="typedef" mode="generate.id">
@@ -66,6 +63,15 @@
<xsl:value-of select="@name"/>
</xsl:template>
+ <xsl:template match="function | overloaded-function" mode="generate.id">
+ <xsl:call-template name="fully-qualified-name">
+ <xsl:with-param name="node" select="."/>
+ <xsl:with-param name="separator" select="'.'"/>
+ </xsl:call-template>
+ <xsl:text>_</xsl:text>
+ <xsl:value-of select="generate-id(.)"/>
+ </xsl:template>
+
<!-- Display the full name of the current node, e.g., "Class
template function". -->
<xsl:template name="type.display.name">
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk