Fix lfs.xsl for cross2, and change scriptlet numbering for trunk and cross2
This commit is contained in:
parent
9ef12f76bb
commit
36f5dce727
1 changed files with 45 additions and 44 deletions
71
LFS/lfs.xsl
71
LFS/lfs.xsl
|
@ -102,30 +102,35 @@ otherwise it is in /bin.-->
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
|
<!-- Start of templates -->
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<xsl:apply-templates select="//sect1[not(@revision) or
|
<xsl:apply-templates select="//chapter[
|
||||||
@revision=$revision]"/>
|
@id='chapter-final-preps' or
|
||||||
|
@id='chapter-cross-tools' or
|
||||||
|
@id='chapter-temporary-tools' or
|
||||||
|
@id='chapter-chroot-temporary-tools' or
|
||||||
|
@id='chapter-building-system' or
|
||||||
|
@id='chapter-config' or
|
||||||
|
@id='chapter-bootscripts' or
|
||||||
|
@id='chapter-bootable']"/>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="chapter">
|
||||||
|
<xsl:apply-templates select="./sect1[
|
||||||
|
(not(@revision) or @revision=$revision) and
|
||||||
|
.//screen[(not(@role) or @role != 'nodump') and
|
||||||
|
(not(@revision) or @revision=$revision)]/
|
||||||
|
userinput[not(starts-with(string(),'chroot'))]]">
|
||||||
|
<xsl:with-param name="chap-num" select="position()+3"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
<!-- The last condition is a hack to allow old versions of the
|
||||||
|
book where the chroot commands did not have role="nodump".
|
||||||
|
It only works if the chroot command is the only one on the page -->
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="sect1">
|
<xsl:template match="sect1">
|
||||||
<!-- Since this xsl:if tag encloses the whole template, it would
|
<xsl:param name="chap-num" select="'1'"/>
|
||||||
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
|
|
||||||
../@id='chapter-final-preps' or
|
|
||||||
../@id='chapter-building-system' or
|
|
||||||
../@id='chapter-bootscripts' or
|
|
||||||
../@id='chapter-config' or
|
|
||||||
../@id='chapter-bootable') and
|
|
||||||
(sect2[not(@revision) or @revision=$revision]//..|.)/
|
|
||||||
screen[(not(@role) or @role != 'nodump') and
|
|
||||||
(not(@revision) or @revision=$revision)]/
|
|
||||||
userinput[not(starts-with(string(),'chroot'))]">
|
|
||||||
<!-- The last condition is a hack to allow previous versions of the
|
|
||||||
book where the chroot commands did not have role="nodump".
|
|
||||||
It only works if the chroot command is the only one on the page -->
|
|
||||||
<!-- The dirs names -->
|
<!-- The dirs names -->
|
||||||
<xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
|
<xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
|
||||||
<xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
|
<xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
|
||||||
|
@ -138,22 +143,16 @@ otherwise it is in /bin.-->
|
||||||
<!-- The build order -->
|
<!-- The build order -->
|
||||||
<xsl:variable name="position" select="position()"/>
|
<xsl:variable name="position" select="position()"/>
|
||||||
<xsl:variable name="order">
|
<xsl:variable name="order">
|
||||||
<xsl:choose>
|
<xsl:value-of select="$chap-num"/>
|
||||||
<xsl:when test="string-length($position) = 1">
|
<xsl:if test="string-length($position) = 1">
|
||||||
<xsl:text>00</xsl:text>
|
|
||||||
<xsl:value-of select="$position"/>
|
|
||||||
</xsl:when>
|
|
||||||
<xsl:when test="string-length($position) = 2">
|
|
||||||
<xsl:text>0</xsl:text>
|
<xsl:text>0</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
<xsl:value-of select="$position"/>
|
<xsl:value-of select="$position"/>
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="$position"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
<!-- Inclusion of package manager scriptlets -->
|
<!-- Inclusion of package manager scriptlets -->
|
||||||
<xsl:if test="@id='ch-tools-stripping' and $pkgmngt='y'">
|
<xsl:if test="@id='ch-tools-stripping' and
|
||||||
|
$pkgmngt='y' and
|
||||||
|
$bashdir='/tools'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[contains(@id,'ch-tools')]"
|
select="document('packageManager.xml')//sect1[contains(@id,'ch-tools')]"
|
||||||
mode="pkgmngt">
|
mode="pkgmngt">
|
||||||
|
@ -161,9 +160,12 @@ otherwise it is in /bin.-->
|
||||||
<xsl:with-param name="dirname" select="$dirname"/>
|
<xsl:with-param name="dirname" select="$dirname"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="@id='ch-system-strippingagain' and $pkgmngt='y'">
|
<xsl:if test="@id='ch-system-strippingagain' and
|
||||||
|
$pkgmngt='y' and
|
||||||
|
$bashdir='/tools'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[contains(@id,'ch-system')]"
|
select="document('packageManager.xml')//sect1[
|
||||||
|
contains(@id,'ch-system')]"
|
||||||
mode="pkgmngt">
|
mode="pkgmngt">
|
||||||
<xsl:with-param name="order" select="$order"/>
|
<xsl:with-param name="order" select="$order"/>
|
||||||
<xsl:with-param name="dirname" select="$dirname"/>
|
<xsl:with-param name="dirname" select="$dirname"/>
|
||||||
|
@ -214,7 +216,6 @@ otherwise it is in /bin.-->
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:text>exit
</xsl:text>
|
<xsl:text>exit
</xsl:text>
|
||||||
</exsl:document>
|
</exsl:document>
|
||||||
</xsl:if>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
|
|
Reference in a new issue