Fix the case of the "symlinks.xml" file, which has revision attributes in sect2, which defeats a filter

based solely on screen and sect1 attributes.
This commit is contained in:
Pierre Labastie 2017-03-27 16:14:49 +00:00
parent 0ad3a337f1
commit 1814367e83

View file

@ -53,15 +53,19 @@
</xsl:template> </xsl:template>
<xsl:template match="sect1"> <xsl:template match="sect1">
<!-- Since this xsl:if tag encloses the whole template, it would
be much better to transpose this condition to the select part
of the "calling" apply-template. But that would change the numbering,
so that it would be difficult to compare to previous versions. So for
version 2.4, let us keep this -->
<xsl:if test="(../@id='chapter-temporary-tools' or <xsl:if test="(../@id='chapter-temporary-tools' or
../@id='chapter-building-system' or ../@id='chapter-building-system' or
../@id='chapter-bootscripts' or ../@id='chapter-bootscripts' or
../@id='chapter-bootable') and ../@id='chapter-bootable') and
count(descendant::screen/userinput) &gt; 0 and (sect2[not(@revision) or @revision=$revision]//..|.)/
count(descendant::screen/userinput) &gt; screen[(not(@role) or @role != 'nodump') and
count(descendant::screen[@role='nodump']) and (not(@revision) or @revision=$revision)]/
count(descendant::screen/userinput) &gt; userinput[not(starts-with(string(),'chroot'))]">
count(descendant::screen/userinput[starts-with(string(),'chroot')])">
<!-- The last condition is a hack to allow previous versions of the <!-- The last condition is a hack to allow previous versions of the
book where the chroot commands did not have role="nodump". book where the chroot commands did not have role="nodump".
It only works if the chroot command is the only one on the page --> It only works if the chroot command is the only one on the page -->