summaryrefslogtreecommitdiff
path: root/docs/xslt
diff options
context:
space:
mode:
authorAlexander Bokovoy <ab@samba.org>2007-06-06 15:36:50 +0000
committerGerald W. Carter <jerry@samba.org>2008-04-23 08:47:33 -0500
commit586de38b133b617aa09de599c64ba138dd6763b5 (patch)
treebe1fb35bd66fe8ad4161401d3fb5ef392dbdac66 /docs/xslt
parentea6023b254946fbeebfb707b6b79811c7e394385 (diff)
downloadsamba-586de38b133b617aa09de599c64ba138dd6763b5.tar.gz
samba-586de38b133b617aa09de599c64ba138dd6763b5.tar.bz2
samba-586de38b133b617aa09de599c64ba138dd6763b5.zip
Fix another bunch of samba-docs bugs. Use <literal> to escape slashes with text
(This used to be commit 00effd0a1ef529fa9c313be840431bf3e25949bf)
Diffstat (limited to 'docs/xslt')
-rw-r--r--docs/xslt/man.xsl46
1 files changed, 46 insertions, 0 deletions
diff --git a/docs/xslt/man.xsl b/docs/xslt/man.xsl
index 38d99f9840..c810e2295b 100644
--- a/docs/xslt/man.xsl
+++ b/docs/xslt/man.xsl
@@ -9,6 +9,27 @@
<xsl:param name="chunk.first.sections" select="1"/>
<xsl:param name="use.id.as.filename" select="1"/>
+<xsl:template name="string-subst">
+ <xsl:param name="content" select="''"/>
+ <xsl:param name="replace" select="''"/>
+ <xsl:param name="with" select="''"/>
+ <xsl:choose>
+ <xsl:when test="not(contains($content,$replace))">
+ <xsl:value-of select="$content"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="substring-before($content,$replace)"/>
+ <xsl:value-of select="$with"/>
+ <xsl:call-template name="string-subst">
+ <xsl:with-param name="content"
+ select="substring-after($content,$replace)"/>
+ <xsl:with-param name="replace" select="$replace"/>
+ <xsl:with-param name="with" select="$with"/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<!--
Our ulink stylesheet omits @url part if content was specified
-->
@@ -138,6 +159,31 @@
<xsl:text>\fR</xsl:text>
</xsl:template>
+<xsl:template match="//literal">
+<xsl:variable name="foo">
+ <xsl:apply-templates />
+</xsl:variable>
+ <xsl:call-template name="string-subst">
+ <xsl:with-param name="content" select="$foo" />
+ <xsl:with-param name="replace" select="'\'" />
+ <xsl:with-param name="with" select="'\\'" />
+ </xsl:call-template>
+</xsl:template>
+
+<xsl:template match="itemizedlist/listitem">
+ <xsl:text>\(bu&#10;</xsl:text>
+ <xsl:apply-templates/>
+ <xsl:if test="following-sibling::listitem">
+ <xsl:text>.TP</xsl:text>
+ <xsl:if test="not($list-indent = '')">
+ <xsl:text> </xsl:text>
+ <xsl:value-of select="$list-indent"/>
+ </xsl:if>
+ <xsl:text>&#10;</xsl:text>
+ </xsl:if>
+</xsl:template>
+
+
<xsl:template match="para|simpara|remark" mode="list">
<xsl:variable name="foo">
<xsl:apply-templates/>