[lfs] 01/02: dump-commands.xsl: use a string for newline variable
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| 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 lfs. commit 1854b8b0ff1804360eb67b39540f36a781c4984c Author: Pierre Labastie <[email protected]> AuthorDate: Thu Aug 13 17:45:37 2026 +0200 dump-commands.xsl: use a string for newline variable This allows using copy-of, which is much faster than value-of --- stylesheets/dump-commands.xsl | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl index a1a6edf9e..a7dce0689 100644 --- a/stylesheets/dump-commands.xsl +++ b/stylesheets/dump-commands.xsl @@ -6,9 +6,7 @@ <!-- XSLT stylesheet to extract commands from [B,H]LFS books. --> - <xsl:variable name="newline"> - <xsl:text>
</xsl:text> - </xsl:variable> + <xsl:variable name="newline" select="'
'"/> <xsl:template match="/"> <xsl:apply-templates select="//sect1"/> @@ -52,29 +50,29 @@ <xsl:choose> <xsl:when test="@role = 'root'"> <xsl:text># Run this as root</xsl:text> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> <xsl:apply-templates select="userinput"/> <xsl:text># End root commands</xsl:text> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> </xsl:when> <xsl:otherwise> <xsl:apply-templates select="userinput"/> </xsl:otherwise> </xsl:choose> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> </xsl:if> </xsl:template> <xsl:template match="userinput"> <xsl:if test=".//replaceable"> <xsl:text># This block must be edited to suit your needs.</xsl:text> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> </xsl:if> <xsl:apply-templates mode="userinput"/> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> <xsl:if test=".//replaceable"> <xsl:text># End of editable block.</xsl:text> - <xsl:value-of select="$newline"/> + <xsl:copy-of select="$newline"/> </xsl:if> </xsl:template> -- To stop receiving notification emails like this one, please contact the administrator of this repository. -- http://lists.linuxfromscratch.org/sympa/info/lfs-book Unsubscribe: See the above information page