Suppress dependency on the preceding page in X chapter

This commit is contained in:
Pierre Labastie 2013-12-28 20:51:15 +00:00
parent 94744cd687
commit 7735c7ae5e
2 changed files with 11 additions and 33 deletions

View file

@ -42,6 +42,7 @@
<xsl:template match="dependency">
<xsl:variable name="depname">
<xsl:choose>
<xsl:when test="@name='xorg-env'"/>
<xsl:when test="@name='x-window-system'">xinit</xsl:when>
<xsl:when test="@name='xorg7'">xinit</xsl:when>
<xsl:when test="@name='server-mail'">

View file

@ -200,41 +200,18 @@
</xsl:element>
</xsl:if>
<!-- Dependencies -->
<!-- If in Xorg or KDE chapter, consider that the preceding package is
the first dependency (not always noted in the book) -->
<xsl:if test="ancestor::chapter[@id='kde4-core'] or
(ancestor::chapter[@id='x-window-system'] and
preceding-sibling::sect1[@id != 'xorg7'])">
<!-- If in Xorg (not anymore) or KDE chapter, consider that the preceding
package is the first dependency (not always noted in the book)-->
<xsl:if test="ancestor::chapter[@id='kde4-core']">
<xsl:text>
</xsl:text>
<xsl:choose>
<xsl:when test="contains(preceding-sibling::sect1[1]/@id,
'xorg7-') and
not(contains(preceding-sibling::sect1[1]/@id,
'driver'))">
<xsl:call-template name="expand-deps">
<xsl:with-param name="section">
<xsl:value-of select="preceding-sibling::sect1[1]/@id"/>
</xsl:with-param>
<xsl:with-param name="status" select="'required'"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:element name="dependency">
<xsl:attribute name="status">required</xsl:attribute>
<xsl:attribute name="name">
<xsl:choose>
<xsl:when test="@id='printproto'">xorg-server</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="preceding-sibling::sect1[1]/@id"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="type">ref</xsl:attribute>
</xsl:element>
</xsl:otherwise>
</xsl:choose>
<xsl:element name="dependency">
<xsl:attribute name="status">required</xsl:attribute>
<xsl:attribute name="name">
<xsl:value-of select="preceding-sibling::sect1[1]/@id"/>
</xsl:attribute>
<xsl:attribute name="type">ref</xsl:attribute>
</xsl:element>
</xsl:if>
<xsl:apply-templates select=".//para[@role='required' or
@role='recommended' or