Subject: Re: [netmod] AD review of draft-ietf-netmod-system-mgmt

From: Randy Presuhn <[email-masked]>
Date: Fri, 13 Dec 2013 11:34:28 -0800 (GMT-08:00)

Hi -

>From: Martin Bjorklund <[email-masked]>
>Sent: Dec 12, 2013 11:22 PM
>To: [email-masked]
>Cc: [email-masked]
>Subject: Re: [netmod] AD review of draft-ietf-netmod-system-mgmt
>
>Randy Presuhn <[email-masked]> wrote:
>> Hi -
>> 
>> >From: Juergen Schoenwaelder <[email-masked]>
>> >Sent: Dec 12, 2013 3:52 AM
>> >To: Randy Presuhn <[email-masked]>, [email-masked]
>> >Cc: [email-masked]
>> >Subject: Re: [netmod] AD review of draft-ietf-netmod-system-mgmt
>> >
>> >On Thu, Dec 12, 2013 at 12:42:57AM -0800, Randy Presuhn wrote:
>> >>
>> >> >    o  An implementation MUST allow any legal "string" (YANG string).
>> >> 
>> >> There are good reasons to restrict formatting and control characters -
>> >> I'll assume YANG strings do this already.  If not, that's another long
>> >> discussion.
>> >
>> >RFC 6020 says:
>> >
>> >   The string built-in type represents human-readable strings in YANG.
>> >   Legal characters are tab, carriage return, line feed, and the legal
>> >   characters of Unicode and ISO/IEC 10646 [ISO.10646]:
>> >
>> >     ;; any Unicode character, excluding the surrogate blocks,
>> >     ;; FFFE, and FFFF.
>> >     string = *char
>> >     char = %x9 / %xA / %xD / %x20-D7FF / %xE000-FFFD /
>> >            %x10000-10FFFF
>> >
>> >And so far, we have used these strings without further restrictions in
>> >data models when there was something to be named.
>> 
>> Very odd.  It restricts the C0 controls, but permits the C1
>> control codes?  I hope someone thought that through carefully.
>
>It is what XML Schema 1.0 says is a string.  See
>http://www.w3.org/TR/xmlschema-2/#string and the reference to
>http://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Char

Let me be more direct.  To exclude, for example,
VT (vertical tab) but at the same time to include
RI (reverse line feed) in the set of permitted
characters seems ill-advised, to say the least.

I hope the rationale for including the C1 controls
(%x80-9F) while quite correctly severely limiting
the C0 controls is documented somewhere.

Randy

---

From: Ladislav Lhotka <[email-masked]>
Date: Fri, 13 Dec 2013 20:58:33 +0100

> characters seems ill-advised, to say the least.

That was the (somewhat arbitrary) decision taken for XML 1.0. And since it is the serialization format for NETCONF, it was quite logical to adopt it for YANG, too.

> the C0 controls is documented somewhere.

Note that XML 1.1 allows #x1..#x1f, represented as character references. BTW, an ultra-long discussion about hairy Unicode issues is now going on in the JSON WG mailing list.

Lada

> 
> Randy
> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

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