Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?





Define the return value for a function. The value can be a simple scalar value, an XML element or XPath expression, or a set of instructions that emit the value to be returned.


result expression

XPath expression defining the return value of the function.

SLAX Example

The following example defines three extension functions, my:size(), my:box-parts(), and my:ark(). The my:ark() function returns a node set containing an <ark> element that encloses the node set returned by the my:box-parts() function. The my:box-parts() function returns a node set containing a <box> element enclosing three <part> child elements. The content of each <part> element is the value returned by the my:size() function. The return value of the my:size() function is the product of the three parameters width, height, and scale.

Release Information

Statement introduced in version 1.1 of the SLAX language, which is supported in Junos OS Release 12.2 and later releases.