[Contents] [Prev] [Next] [Index] [Report an Error]

<jcs:edit-path> Template

The <jcs:edit> template generates an <edit-path> element suitable for inclusion in an <xnm:error> or <xnm:warning> element. The location of the configuration error is passed as dot into the <jcs:edit-path> template. This location defaults to “ .” , the current position in the XML hierarchy. You can alter the default by including the select attribute of the dot parameter. The following example demonstrates how to call this template in a commit script and set the context to the [edit chassis] hierarchy level:

<xsl:if test="not(chassis/source-route)">
    <xnm:warning>
<xsl:call-template name="jcs:edit-path">
            <xsl:with-param name="dot" select="chassis"/>
   </xsl:call-template>
        <message>IP source-route processing is not enabled.</message>
    </xnm:warning>
</xsl:if>

When you commit a configuration that does not enable IP source routing, the <xnm:warning> element results in the following command-line interface (CLI) output:

user@host# commit

[edit chassis]   # The hierarchy level is generated by the <jcs:edit-path> template.
    warning: IP source-route processing is not enabled.
commit complete

[Contents] [Prev] [Next] [Index] [Report an Error]