Hi
When I was learning nano service, I found this expression in the nso example.
string(*[local-name()=$IFNAME])
I do not understand the meaning of ' *[local-name()=$IFNAME] '.
What is the meanings of the expression '*[ ....]' and the function ' local-name() '.
xml template file:
nso-5.5.5.2.3/examples.ncs/getting-started/developing-with-ncs/20-nano-services/packages/link/templates/link-template.xml
<devices xmlns="http://tail-f.com/ns/ncs">
<?foreach {endpoints}?>
<?foreach {a-device|b-device}?>
<?set IFNAME={substring(local-name(), 1, 1)}-interface?>
<device>
<name>{.}</name>
<config>
<sys xmlns="http://example.com/router">
<interfaces>
<interface tags="merge">
<name>{string(*[local-name()=$IFNAME])}</name>
<?set-context-node {..}?>
<unit>
<name>{unit}</name>
<vlan-id>{vlan-id}</vlan-id>
</unit>
</interface>
</interfaces>
</sys>
</config>
</device>
<?end?>
<?end?>
</devices>
</config-template>