jcs:emit-comment Template
XSLT 语法
<junos:comment> <xsl:text>...</xsl:text> </junos:comment>
描述
从提交、事件或操作脚本中在配置中生成注释。模板包含一个<junos:comment>元素。从不直接调用jcs:emit-comment模板。相反,您可以在对模板、元素或<transient-change>元素的jcs:emit-change调用中包含其<junos:comment>元素和子元素<xsl:text>。<change>
使用示例
以下示例演示如何在提交脚本中调用此模板:
<xsl:call-template name="jcs:emit-change"> <xsl:with-param name="content"> <term> <name>very-last</name> <junos:comment> <xsl:text>This term was added by a commit script</xsl:text> </junos:comment> <then> <accept/> </then> </term> </xsl:with-param> </xsl:call-template>
发出 show firewall 配置模式命令时,将显示以下输出:
[edit]
user@host# show firewall
family inet {
term very-last {
/* This term was added by a commit script */
then accept;
}
}