> On Oct 16, 2018, at 7:39 PM, Andy Bierman <[email protected]> wrote:
>
>
>
> On Tue, Oct 16, 2018 at 3:15 PM, Christian Hopps <[email protected]> wrote:
>
> Andy Bierman <[email protected]> writes:
>
> This draft needs to define the module-tag encoding wrt/
> - valid characters (e.g., some subset of UTF-8)
> - min/max length (e.g., implementation MUST support at least 64 chars
> and can support larger)
>
> I'm looking for suggestions on how to do this subset. We had intended to
> allow for as wide as possible content; however, I think disallowing tabs,
> newlines, carriage returns is more than reasonable. Has a type like this
> already been standardized or is there an example available somewhere?
>
> I suppose yang-identifier type is too restrictive so I will agree that
> restricting whitespace and colon chars
> is probably good enough
I'm going to use:
typedef tag {
type string {
pattern '[a-zA-Z_][a-zA-Z0-9\-_]*:[\S ]+';
length "1..max";
}
description
"A tag value is composed of a standard prefix followed
by any string value that does not include carriage return,
form-feed, newline or tab characters."
}
I left in space -- lot's of people in the non-unix world use spaces.
Thanks,
Chris.
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod