Hi Jon,
Thanks for these two corrections about the YANG language pattern match
below.

We authors will reflect your comments on the following two I2NSF drafts
under RFC Ed Queue, and
submit the revisions:
https://datatracker.ietf.org/doc/html/draft-ietf-i2nsf-nsf-monitoring-data-model-19
https://datatracker.ietf.org/doc/html/draft-ietf-i2nsf-nsf-facing-interface-dm-28

Thanks.

Best Regards,
Paul



On Wed, Jun 1, 2022 at 9:49 PM <[email protected]> wrote:

> Hi there,
>
>
>
> I appreciate that this may be a bit late in the day, but I have found a
> couple of issues with the YANG language pattern match when doing a check
> against draft-ietf-dots-telemetry-25.txt, currently in AUTH48.  What I have
> reported against that draft is:-
>
>
>
> During testing of the horrendous pattern provided for pattern matching
>
> against description-lang, I have found an alternate branch error which
> needs
>
> correcting.
>
>
>
> OLD:
>
>          leaf description-lang {
>
>            type string {
>
>              pattern '(([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
>
>                    + '{0,2})?|[A-Za-z]{4}|[A-Za-z]{5,8})(-[A-Za-z]{4})?'
>
> NEW:
>
>          leaf description-lang {
>
>            type string {
>
>              pattern '((([A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
>
>                    + '{0,2})?)|[A-Za-z]{4}|[A-Za-z]{5,8})(-[A-Za-z]{4})?'
>
>
>
> I.e, additional () around A-Za-z]{2,3}(-[A-Za-z]{3}(-[A-Za-z]{3})'
>
>                    + '{0,2})?
>
>
>
> Reasoning - RFC5646 2.1
>
> language      = 2*3ALPHA            ; shortest ISO 639 code
>
>                  ["-" extlang]       ; sometimes followed by
>
>                                      ; extended language subtags
>
>                / 4ALPHA              ; or reserved for future use
>
>                / 5*8ALPHA            ; or registered language subtag
>
>
>
> The additional () contain the 2*3ALPHA ["-" extlang] as a branch
> alternative
>
> to 4*ALPHA or 5*ALPHA.
>
>
>
> There also is an unneeded character range, namely
>
>
>
> OLD:
>
>                  + '|([0-9][A-Za-z0-9]{3})))*(-[0-9A-WY-Za-wy-z]'
>
> NEW:
>
>                  + '|([0-9][A-Za-z0-9]{3})))*(-[0-9A-WYZa-wyz]'
>
>
>
> As y is alphabetically adjacent to z ([0-9A-WYZa-wyz] is the singleton
>
> definition).
>
>
>
> Regards
>
>
>
> Jon
> _______________________________________________
> I2nsf mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/i2nsf
>
_______________________________________________
I2nsf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/i2nsf

Reply via email to