Changeset a6c57de


Ignore:
Timestamp:
09/17/2023 07:41:42 AM (10 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
b39f283
Parents:
6d9bd8e
git-author:
Pierre Labastie <pierre.labastie@…> (09/16/2023 07:58:47 PM)
git-committer:
Pierre Labastie <pierre.labastie@…> (09/17/2023 07:41:42 AM)
Message:

Process <prompt> tags in mit-kerberos

when we have a command followed by prompts:
command
<prompt>command:</prompt> instr
...
we want to transform to:
command << PROMPT_EOF
instr
...
quit
PROMPT_EOF.
This patch implements this. The problem is that the <prompt>
tags may occur in several consecutive <screen> ones. So we create
a fragment tree and process it recursively.

Location:
BLFS/xsl
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • BLFS/xsl/scripts.xsl

    r6d9bd8e ra6c57de  
    8080<!-- include the template for replaceable tags -->
    8181  <xsl:include href="process-replaceable.xsl"/>
     82
     83<!-- include the template for prompt tags -->
     84  <xsl:include href="process-prompt.xsl"/>
    8285
    8386<!--=================== Begin processing ========================-->
     
    386389      <xsl:when test="@role = 'configuration'">
    387390        <xsl:text>&#xA;</xsl:text>
    388         <xsl:apply-templates mode="config"
    389              select=".//screen[not(@role = 'nodump') and ./userinput]"/>
     391        <xsl:choose>
     392          <xsl:when test=".//screen/userinput/prompt">
     393            <xsl:call-template name="process-prompt">
     394              <xsl:with-param
     395                name="instructions"
     396                select=".//screen[not(@role = 'nodump') and ./userinput]"/>
     397              <xsl:with-param name="root-seen" select="false"/>
     398              <xsl:with-param name="prompt-seen" select="false"/>
     399            </xsl:call-template>
     400          </xsl:when>
     401          <xsl:otherwise>
     402            <xsl:apply-templates mode="config"
     403                 select=".//screen[not(@role = 'nodump') and ./userinput]"/>
     404          </xsl:otherwise>
     405        </xsl:choose>
    390406      </xsl:when><!-- @role="configuration" -->
    391407
Note: See TracChangeset for help on using the changeset viewer.