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:template match="dependency">
<xsl:variable name="depname"> <xsl:variable name="depname">
<xsl:choose> <xsl:choose>
<xsl:when test="@name='xorg-env'"/>
<xsl:when test="@name='x-window-system'">xinit</xsl:when> <xsl:when test="@name='x-window-system'">xinit</xsl:when>
<xsl:when test="@name='xorg7'">xinit</xsl:when> <xsl:when test="@name='xorg7'">xinit</xsl:when>
<xsl:when test="@name='server-mail'"> <xsl:when test="@name='server-mail'">

View file

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