Hi,
Consider we have 2 records as given below  
  <config> (Rec1)
    <name>10</name>
    <foo>fred</foo>
  </config>
  <config> (Rec2)
    <name>20</name>
    <foo>fred</foo>
    <foo>barney</foo>
    <foo>wilma</foo>
    <foo>someother</foo>
  </config>

Q1 : Using subtree filtering which condition on the leaf-list node can the user 
give such that he selects the record which contains foo=fred only...
   [we can assume user does not know the value of "name"]

Q2 : Also about the leaf-list, I have tried searching but have not found how 
this leaf-list originated ? Whether XSD list is the representation for 
leaf-list in xsd ?
     The XSD list is represented slightly differently as per 
http://www.w3schools.com/xml/el_list.asp  : <stringvalues>I love XML 
Schema</stringvalues>



-----Original Message-----
From: Ladislav Lhotka [mailto:[email protected]] 
Sent: 16 December, 2016 17:40
To: Rohit R Ranade
Cc: NETMOD WG
Subject: Re: [Netconf] Leaf-list usage

Hi,

> On 16 Dec 2016, at 06:44, Rohit R Ranade <[email protected]> wrote:
> 
> I was going through the ietf discussion for leaf-list subtree and found a 
> link (https://www.ietf.org/mail-archive/web/netmod/current/msg01982.html)

Your question belongs to to the NETMOD mailing list, so I am moving it there.

>  
> A question that I have :
> 1)      Consider leaf-list f1= [1, 2, 3] in DB.. If I provide condition on 
> leaflist f1=[1],  will it select [1,2,3] ? Will it always be sub-set match   
> ? How to get an exact match for the whole leaf-list.

I assume you mean condition expressed in XPath. In this case you cannot test 
whole lists on equality, but if you have

must "f1 = 1";

then

"f1": [1, 2, 3]

would satisfy that condition. You could also write, for example,

must "f1 = 1 and count(f1) = 1";

and then only

"f1": [1]

will match.

Lada

>  
>  
>  
> _______________________________________________
> Netconf mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netconf

--
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C




_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to