A module can be a special case, too (perl-test-mockmodule)
This commit is contained in:
parent
6e28f3c4de
commit
1646303d91
2 changed files with 55 additions and 28 deletions
|
@ -224,6 +224,33 @@ for ver_ent in $EXCEPTIONS; do
|
|||
[[ -z $id ]] && continue
|
||||
cat >>$SPECIAL_FILE << EOF
|
||||
<xsl:when test="@id='$id'">
|
||||
<!-- 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"/>
|
||||
<!-- End dependencies -->
|
||||
<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>
|
||||
|
@ -246,6 +273,8 @@ for ver_ent in $EXCEPTIONS; do
|
|||
<!-- End dependencies -->
|
||||
<xsl:text>
 </xsl:text>
|
||||
</package><xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
EOF
|
||||
done
|
||||
|
|
|
@ -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>
|
||||
|
|
Reference in a new issue