[jhalfs] 01/02: outputpkgdest: fix the case of several <literal>
| Newsgroups | gmane.linux.lfs.automated |
|---|---|
| Message-ID | <[email protected]> |
This is an automated email from the git hooks/post-receive script. git pushed a commit to branch trunk in repository jhalfs. commit 6ac0d96300ab74cd7c21d8cd73ed327425d9e07b Author: Pierre Labastie <[email protected]> AuthorDate: Sun Mar 19 10:10:24 2023 +0100 outputpkgdest: fix the case of several <literal> We output text()[1], literal (literally), text(2). This does not work if there are several <literal> tags. Change it to outputing preceding-sibling::text()[1], literal for each literal tag, then output text()[last()] (which works also when there are no literal tag, so it removes a choose. --- BLFS/xsl/scripts.xsl | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/BLFS/xsl/scripts.xsl b/BLFS/xsl/scripts.xsl index eb04609..d5d0fa3 100644 --- a/BLFS/xsl/scripts.xsl +++ b/BLFS/xsl/scripts.xsl @@ -930,22 +930,15 @@ echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG <xsl:template match="userinput" mode="destdir"> <xsl:text> </xsl:text> - <xsl:choose> - <xsl:when test="./literal"> - <xsl:call-template name="outputpkgdest"> - <xsl:with-param name="outputstring" select="text()[1]"/> - </xsl:call-template> - <xsl:apply-templates select="literal"/> - <xsl:call-template name="outputpkgdest"> - <xsl:with-param name="outputstring" select="text()[2]"/> - </xsl:call-template> - </xsl:when> - <xsl:otherwise> - <xsl:call-template name="outputpkgdest"> - <xsl:with-param name="outputstring" select="string()"/> - </xsl:call-template> - </xsl:otherwise> - </xsl:choose> + <xsl:for-each select="./literal"> + <xsl:call-template name="outputpkgdest"> + <xsl:with-param name="outputstring" select="preceding-sibling::text()[1]"/> + </xsl:call-template> + <xsl:apply-templates select="."/> + </xsl:for-each> + <xsl:call-template name="outputpkgdest"> + <xsl:with-param name="outputstring" select="text()[last()]"/> + </xsl:call-template> </xsl:template> <xsl:template name="outputpkgdest"> -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/alfs-discuss Unsubscribe: See the above information page