I don’t want to support oper-data for some product.
deviation "/pear:equipment/pear:slot/pear:subslot/pear:oper-data" {
// based on some condition it should call.
deviate not-supported;
}
so i tried based on dev with must, But it won’t work.
deviation "/pear:equipment/pear:slot/pear:subslot/pear:oper-data" {
must "current()../subslotId != '1'" {
deviate not-supported;
}
}
getting error as undefined keyword, Is there any other way to restrict/not-support based on a condition.
It may not be exactly what you want but you could use “augment” and “when” to conditionally remove the oper-data nodes:
o If the "when" statement is a child of an "augment" statement, then
the context node is the augment's target node in the data tree, if
the target node is a data node. Otherwise, the context node is
the closest ancestor node to the target node that is also a data
node. If no such node exists, the context node is the root node.
The accessible tree is tentatively altered during the processing
of the XPath expression by removing all instances (if any) of the
nodes added by the "augment" statement.