Commit e78abc48 authored by Ander Conselvan de Oliveira's avatar Ander Conselvan de Oliveira Committed by Kristian Høgsberg
Browse files

doc: Split protocol description paragraphs properly

The xsl translation from the protocol xml to publican would create only
one paragraph for all the text in a description. Make it generate one
paragraph for each block of text separated by two consecutive line
breaks instead.
Signed-off-by: Ander Conselvan de Oliveira's avatarAnder Conselvan de Oliveira <>
Signed-off-by: default avatarTiago Vignatti <>
parent 0d77c530
...@@ -20,6 +20,25 @@ ...@@ -20,6 +20,25 @@
</appendix> </appendix>
</xsl:template> </xsl:template>
<!-- Break text blocks separated by two new lines into paragraphs -->
<xsl:template name="break">
<xsl:param name="text" />
<xsl:param name="linebreak" select="'&#10;&#10;'" />
<xsl:when test="contains($text,$linebreak)">
<xsl:value-of select="substring-before($text,$linebreak)" />
<xsl:call-template name="break">
<xsl:with-param name="text" select="substring-after($text,$linebreak)" />
<para><xsl:value-of select="$text" /></para>
<!-- Copyright blurb --> <!-- Copyright blurb -->
<xsl:template match="copyright"> <xsl:template match="copyright">
<para> <para>
...@@ -41,9 +60,9 @@ ...@@ -41,9 +60,9 @@
- <xsl:value-of select="description/@summary" /> - <xsl:value-of select="description/@summary" />
</xsl:if> </xsl:if>
</title> </title>
<para> <xsl:call-template name="break">
<xsl:value-of select="description"/> <xsl:with-param name="text" select="description" />
</para> </xsl:call-template>
<xsl:if test="request"> <xsl:if test="request">
<section> <section>
<title>Requests provided by <xsl:value-of select="@name" /></title> <title>Requests provided by <xsl:value-of select="@name" /></title>
...@@ -93,7 +112,9 @@ ...@@ -93,7 +112,9 @@
- <xsl:value-of select="description/@summary" /> - <xsl:value-of select="description/@summary" />
</xsl:if> </xsl:if>
</title> </title>
<para><xsl:value-of select="description"/></para> <xsl:call-template name="break">
<xsl:with-param name="text" select="description" />
<xsl:if test="arg"> <xsl:if test="arg">
<variablelist> <variablelist>
<title><xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> arguments</title> <title><xsl:value-of select="../@name"/>::<xsl:value-of select="@name" /> arguments</title>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment