Andy Bierman <[email protected]> writes:
> I agree with Juergen that the implementation of YANG constraints
> on a datastore is not XML-specific. The text refers to data nodes
> not XML elements. It is quite possible for a server to populate data
The text says in sec. 6.4: "The data model used in the XPath expressions
is the same as that used in XPath 1.0 [XPATH], …", and the data model in
[XPATH] is about elements, attributes, namespaces etc. In order to
correctly interpret [XPATH], one needs to map (conceptually, if you
wish) the data tree onto the XPath data model.
> nodes in a datastore without NETCONF of XML being involved.
And what about RPCs and notifications? In this case the accessible data
tree is defined as the corresponding XML instance document.
Consider this definition:
rpc foo {
input {
leaf x {
type uint8;
must ". = ../y";
}
leaf y {
type string;
}
}
}
Then what's the result of conceptual XPath evaluation for this RPC
request?
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="101">
<foo xmlns="http://example.com/xtest">
<x>+1</x>
<y>1</y>
</foo>
</rpc>
And how about this RPC input in JSON?
{
"foorpc:input": {
"x": +1,
"y": "1"
}
}
>
> We keep getting stuck on the difference between resource representations
> on the wire, and implementation details within a client or server.
This is not my problem here.
Lada
> There is no requirement that they be the same "XML or JSON".
> inside.
>
--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod