Skip to content

Commit

Permalink
Merge pull request #580 from openSUSE/517-substeps-performance
Browse files Browse the repository at this point in the history
Fix #517: Process substeps/@performance='optional'
  • Loading branch information
tomschr authored Oct 19, 2023
2 parents 9969396 + 9da9b9c commit 386d341
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions suse2022-ns/fo/lists.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
local-name()='simpara' or
local-name()='formalpara']"
priority="2">

<xsl:variable name="perf" select="(../@performance|../../@performance)[last()]"/>
<fo:block xsl:use-attribute-sets="para.properties">
<xsl:call-template name="no-break-after-colon"/>

Expand All @@ -335,7 +335,7 @@
<xsl:with-param name="arch-value" select="@arch"/>
</xsl:call-template>
</xsl:if>
<xsl:if test="(self::d:para or self::d:simpara) and ../@performance='optional'">
<xsl:if test="(self::d:para or self::d:simpara) and $perf='optional'">
<fo:inline color="&mid-gray;" xsl:use-attribute-sets="italicized">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'step.optional'"/>
Expand Down
4 changes: 3 additions & 1 deletion suse2022-ns/xhtml/lists.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
</xsl:template>

<xsl:template match="d:step/*[1][local-name()='para' or local-name()='simpara']">
<xsl:variable name="perf" select="(../@performance|../../@performance)[last()]"/>
<xsl:call-template name="paragraph">
<xsl:with-param name="class">
<xsl:if test="@role and $para.propagates.style != 0">
Expand All @@ -125,7 +126,7 @@
</xsl:call-template>
</xsl:if>
<xsl:call-template name="anchor"/>
<xsl:if test="../@performance='optional'">
<xsl:if test="$perf='optional'">
<span class="step-optional">
<xsl:call-template name="gentext">
<xsl:with-param name="key" select="'step.optional'"/>
Expand All @@ -138,6 +139,7 @@
</xsl:call-template>
</xsl:template>


<xsl:template match="d:listitem/d:simpara" priority="10">
<!-- Unlike the original DocBook stylesheets, if a listitem contains only a
single simpara, we still want to output the <p> wrapper... This is essentially
Expand Down

0 comments on commit 386d341

Please sign in to comment.