[lfs] branch trunk updated: Fix dump-commands for inner <userinput>
| Newsgroups | gmane.linux.lfs.book |
|---|---|
| Message-ID | <178663416583.210937.15744414944277678674@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch trunk
in repository lfs.
The following commit(s) were added to refs/heads/trunk by this push:
new 8cc9d2a18 Fix dump-commands for inner <userinput>
8cc9d2a18 is described below
commit 8cc9d2a18f6316ccfa64c2caf3ec7492f038bad4
Author: Pierre Labastie <[email protected]>
AuthorDate: Thu Aug 13 17:08:39 2026 +0200
Fix dump-commands for inner <userinput>
The stylesheet for dump-commands.xsl unconditionally insert a
new line after each <userinput>...</userinput> block. This
may not be intended if a <userinput> block contains an inner
<userinput> block. The fix is:
to apply-templates in <userinput> templates with a "mode="
attribute so that a template without mode cannot be used.
Then add the mode= attribute to any template that must be
processed inside a <userinput> block (currently only <replaceable>
ones). The inner <userinput> is then processed by the default
template (write text), and not the one in the stylesheet.
---
stylesheets/dump-commands.xsl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/stylesheets/dump-commands.xsl b/stylesheets/dump-commands.xsl
index 83e24dfc6..a1a6edf9e 100644
--- a/stylesheets/dump-commands.xsl
+++ b/stylesheets/dump-commands.xsl
@@ -70,7 +70,7 @@
<xsl:text># This block must be edited to suit your needs.</xsl:text>
<xsl:value-of select="$newline"/>
</xsl:if>
- <xsl:apply-templates/>
+ <xsl:apply-templates mode="userinput"/>
<xsl:value-of select="$newline"/>
<xsl:if test=".//replaceable">
<xsl:text># End of editable block.</xsl:text>
@@ -78,7 +78,7 @@
</xsl:if>
</xsl:template>
- <xsl:template match="replaceable">
+ <xsl:template match="replaceable" mode="userinput">
<xsl:text>**EDITME</xsl:text>
<xsl:apply-templates/>
<xsl:text>EDITME**</xsl:text>
--
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