Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


jcs:edit-path Template

XSLT Syntax

SLAX Syntax


Generate an <edit-path> element suitable for inclusion in an <xnm:error> or <xnm:warning> element. This template converts a location in the configuration hierarchy into the standard text representation that you would see in the Junos OS configuration mode banner. By default, the location of the configuration error is passed into the jcs:edit-path template as the value of dot. This location defaults to “ . ”, the current position in the XML hierarchy. You can alter the default by including a valid XPath expression for the dot parameter when you call the template.



XPath expression specifying the hierarchy level. The default location is the position in the XML hierarchy that the script is currently evaluating. You can alter the default when you call the template by including a valid XPath expression either for the dot parameter in SLAX scripts or for the select attribute of the dot parameter in XSLT scripts.

Usage Examples

The following example demonstrates how to call the jcs:edit-path template in a commit script and set the context to the [edit chassis] hierarchy level:

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