Closed kannanwst closed 8 months ago
Reported Issue: RNG file does NOT contain min-elements tag when the value is 1. RNG file contains min-elements tag when the value is > 1.
Step1 - mod1.yang
module mod1 { namespace "urn:mod1"; prefix m1;
leaf-list le1 { type string; min-elements 1; max-elements 4; } }
Step2 - run the command
pyang -f dsdl --dsdl-no-documentation --dsdl-lax-yang-version mod1.yang -o mod1.rng
Step3 - mod1.rng output
" <?xml version="1.0" encoding="UTF-8"?>2024-03-19</dc:date>YANG module 'mod1'</dc:source></nma:data>YANG module 'mod1'</dc:source></nma:data> "
Step 4 - Issue
min-elements ="1" Not available for .rng file.
This is by design. Please see section 10.28 in RFC 6110.
Thanks for quick response
Reported Issue: RNG file does NOT contain min-elements tag when the value is 1. RNG file contains min-elements tag when the value is > 1.
Step1 - mod1.yang
module mod1 { namespace "urn:mod1"; prefix m1;
leaf-list le1 { type string; min-elements 1; max-elements 4; } }
Step2 - run the command
pyang -f dsdl --dsdl-no-documentation --dsdl-lax-yang-version mod1.yang -o mod1.rng
Step3 - mod1.rng output
" <?xml version="1.0" encoding="UTF-8"?>2024-03-19</dc:date>YANG module 'mod1'</dc:source> </nma:data> YANG module 'mod1'</dc:source> </nma:data> "
Step 4 - Issue
min-elements ="1" Not available for .rng file.