Re: [j-nsp] understand the index in jcs:break-lines() function in SLAX

2016-01-14 Thread Phil Shafer
Martin T writes: >However, script above returns an empty line. $line is a node-set, but you are making a string out of it. XPath specifies that when you turn a node-set into a string, it "is converted to a string by returning the string-value of the node in the node-set that is first in document

[j-nsp] understand the index in jcs:break-lines() function in SLAX

2016-01-14 Thread Martin T
Hi, jcs:break-lines() function in SLAX allows one to break content into multiple lines. For example here I break the output of "show chassis mac-addresses" into lines: version 1.0; ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0";; match / { { var $sh_mac_results = jcs:invoke(