svn commit: samba-docs r1123 - in trunk: manpages-3 xslt

ab at samba.org ab at samba.org
Wed Jun 6 15:36:51 GMT 2007


Author: ab
Date: 2007-06-06 15:36:50 +0000 (Wed, 06 Jun 2007)
New Revision: 1123

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-docs&rev=1123

Log:
Fix another bunch of samba-docs bugs. Use <literal> to escape slashes with text
Modified:
   trunk/manpages-3/smb.conf.5.xml
   trunk/xslt/man.xsl


Changeset:
Modified: trunk/manpages-3/smb.conf.5.xml
===================================================================
--- trunk/manpages-3/smb.conf.5.xml	2007-06-06 13:43:17 UTC (rev 1122)
+++ trunk/manpages-3/smb.conf.5.xml	2007-06-06 15:36:50 UTC (rev 1123)
@@ -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 @@
 		<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>

Modified: trunk/xslt/man.xsl
===================================================================
--- trunk/xslt/man.xsl	2007-06-06 13:43:17 UTC (rev 1122)
+++ trunk/xslt/man.xsl	2007-06-06 15:36:50 UTC (rev 1123)
@@ -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/>



More information about the samba-cvs mailing list