William Lupton <[email protected]> writes:

The intent was "ascii-printable". Would be nice if there was an easier
way to specify this. :)

Printable ASCII characters are ' ' (space) through '~' (tilde) so naively [
-~] should work ... but perhaps that makes unacceptable assumptions about
the locale and/or character encoding? (Certainly it should be OK if we can
assume UTF-8, because all printable ASCII characters retain their ASCII
representations in UTF-8.)

I think your suggestion is a good one!

YANG references <https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#dt-regex> says it 
will work too (its the range between the UTF code points, which in this case are the ascii 
values), but then that reference is also where i got the "#x22" hex format from that 
Martin said was invalid. :)

Thanks,
Chris.


On Mon, 4 Mar 2019 at 20:20, Christian Hopps <[email protected]> wrote:


Martin Bjorklund <[email protected]> writes:

> Hi,
>
> Just some quick comments on the YANG:
>
> However, it seems libxml2's regexp engine requires both "[" and "^" to
> be escaped:
>
>         '[-0-9a-z "#\[\]' +
>         '!$%&()*+,./:;<=>?@\\\^_`{|}~]+';
>
> This expression isn't wrong, but it seems to me that these characters
> should not have to be escaped.
>
> The pattern allows double quote (") but not single quote (').  Is
> that intentional?

The intent was "ascii-printable". Would be nice if there was an easier way
to specify this. :)

> [a simple way to test the patterns is to have a "default" statement
> and a YANG complier that verifies defaults]

Does pyang do this?

> I recommend that you rename the example module in section to
> "example-uses-geo-location" (and change the namespace to
> urn:example:uses-geo-location).   We should not use the "ietf"
> namespace for examples.

Will do.

Thanks,
Chris.

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


Attachment: signature.asc
Description: PGP signature

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

Reply via email to