summaryrefslogtreecommitdiff
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
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)
-rw-r--r--docs/manpages-3/smb.conf.5.xml4
-rw-r--r--docs/xslt/man.xsl46
2 files changed, 48 insertions, 2 deletions
diff --git a/docs/manpages-3/smb.conf.5.xml b/docs/manpages-3/smb.conf.5.xml
index 52780a04be..83fff41f80 100644
--- a/docs/manpages-3/smb.conf.5.xml
+++ b/docs/manpages-3/smb.conf.5.xml
@@ -55,7 +55,7 @@
</para>
<para>
- Any line ending in a <quote>\\</quote> is continued on the next line in the customary UNIX fashion.
+ Any line ending in a <quote><literal>\</literal></quote> is continued on the next line in the customary UNIX fashion.
</para>
<para>
@@ -677,7 +677,7 @@ chmod 1770 /usr/local/samba/lib/usershares
<listitem><para>
If the client has passed a username/password pair and that username/password pair is validated by the UNIX
system's password programs, the connection is made as that username. This includes the
- <literal>\\server\service%<replaceable>username</replaceable></literal> method of passing a username.
+ <literal>\\server\service</literal>%<replaceable>username</replaceable> method of passing a username.
</para></listitem>
<listitem><para>
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/>