Author: pierre Date: Fri Nov 23 06:30:06 2018 New Revision: 4066 Log: A module can be a special case, too (perl-test-mockmodule)
Modified: jhalfs/trunk/BLFS/gen-special.sh jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl Modified: jhalfs/trunk/BLFS/gen-special.sh ============================================================================== --- jhalfs/trunk/BLFS/gen-special.sh Fri Sep 28 07:39:18 2018 (r4065) +++ jhalfs/trunk/BLFS/gen-special.sh Fri Nov 23 06:30:06 2018 (r4066) @@ -224,28 +224,57 @@ [[ -z $id ]] && continue cat >>$SPECIAL_FILE << EOF <xsl:when test="@id='$id'"> - <xsl:text> </xsl:text> - <package><xsl:text>
 </xsl:text> - <xsl:element name="name">$id</xsl:element> - <xsl:text>
 </xsl:text> - <xsl:element name="version">$ver_ent</xsl:element> - <xsl:if - test="document(\$installed-packages)//package[name=current()/@id]"> - <xsl:text>
 </xsl:text> - <xsl:element name="inst-version"> - <xsl:value-of - select="document(\$installed-packages - )//package[name=current()/@id]/version"/> - </xsl:element> - </xsl:if> +<!-- if there is a sect1 ancestor, we have a module --> + <xsl:choose> + <xsl:when test="ancestor::sect1"> + <xsl:text> </xsl:text> + <module><xsl:text>
 </xsl:text> + <xsl:element name="name">$id</xsl:element> + <xsl:text>
 </xsl:text> + <xsl:element name="version">$ver_ent</xsl:element> + <xsl:if + test="document(\$installed-packages)//package[name=current()/@id]"> + <xsl:text>
 </xsl:text> + <xsl:element name="inst-version"> + <xsl:value-of + select="document(\$installed-packages + )//package[name=current()/@id]/version"/> + </xsl:element> + </xsl:if> <!-- Dependencies --> - <xsl:apply-templates select=".//para[@role='required' or - @role='recommended' or - @role='optional']" - mode="dependency"/> + <xsl:apply-templates select=".//para[@role='required' or + @role='recommended' or + @role='optional']" + mode="dependency"/> <!-- End dependencies --> - <xsl:text>
 </xsl:text> - </package><xsl:text>
</xsl:text> + <xsl:text>
 </xsl:text> + </module><xsl:text>
</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text> </xsl:text> + <package><xsl:text>
 </xsl:text> + <xsl:element name="name">$id</xsl:element> + <xsl:text>
 </xsl:text> + <xsl:element name="version">$ver_ent</xsl:element> + <xsl:if + test="document(\$installed-packages)//package[name=current()/@id]"> + <xsl:text>
 </xsl:text> + <xsl:element name="inst-version"> + <xsl:value-of + select="document(\$installed-packages + )//package[name=current()/@id]/version"/> + </xsl:element> + </xsl:if> +<!-- Dependencies --> + <xsl:apply-templates select=".//para[@role='required' or + @role='recommended' or + @role='optional']" + mode="dependency"/> +<!-- End dependencies --> + <xsl:text>
 </xsl:text> + </package><xsl:text>
</xsl:text> + </xsl:otherwise> + </xsl:choose> </xsl:when> EOF done Modified: jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl ============================================================================== --- jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl Fri Sep 28 07:39:18 2018 (r4065) +++ jhalfs/trunk/BLFS/xsl/gen_pkg_list.xsl Fri Nov 23 06:30:06 2018 (r4066) @@ -189,14 +189,12 @@ <xsl:value-of select="normalize-space(title)"/> </xsl:element> <xsl:text>
</xsl:text> -<!-- Do not use .//*, which would include self. --> - <xsl:apply-templates - select="descendant::node()[contains(translate(@xreflabel, - '123456789', - '000000000'), - '-0') - ]" - mode="normal"> +<!-- Do not use .//*, which would include self. + Even a module can be a special case, so + call the template of specialCases.xsl, + which calls the "normal" template when the + case is normal. --> + <xsl:apply-templates select="descendant::*" mode="special"> <xsl:sort select="@id"/> </xsl:apply-templates> <xsl:text> </xsl:text> -- http://lists.linuxfromscratch.org/listinfo/alfs-log Unsubscribe: See the above information page