Subject: [netmod] canonical data type representation

From: Andy Bierman <[email-masked]>
Date: Sat, 25 Oct 2008 08:45:07 -0700

Hi,

I think the YANG draft should add a short section
after each 'Lexicographic Representation' section,
defining the canonical format for value-space comparison.

There is (hopefully) a single authoritative reference
that can be used for each 'borrowed' data type,
like string, float32, binary (base64), int32, etc.

The custom type 'bits' needs to specify a canonical
order, which is the xsd:list representation of each
set bit name, in some order -- is it the bit-stmt order,
or the order specified by the value of each position val?
(Pick 1)

An enum can be any string (with no leading or trailing WSP).
Enum comparisons must use the same normalization rules as
the 'string' data type.

For leaf-list and list, canonical ordering could be considered
out of scope.  That is, system-ordered means internal system,
not standardized system.  (OK with me).  The agent is free
to return entries in natural order.

Within a list or container entry, there might be canonical ordering
to consider, or not.  I keep entries in schema order, except
for key leafs moved to the front, in key-stmt order.

A choice/case does not show up in the instance document,
but a canonical order, based on schema order, could be
used for siblings within each case-stmt.

The number 1 priority is that NETMOD not re-invent any standards
for data type normalization.

Andy

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

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 30 Oct 2008 11:14:09 +0100 (CET)

> defining the canonical format for value-space comparison.

Ok.  I will add such subsections.

> like string, float32, binary (base64), int32, etc.

For the float types, I guess there is a canonical format defined
(somewhere).  Does anybody know?   Should we copy&paste from the XSD
spec?

> Enum comparisons must use the same normalization rules as

I suggest we do not do any Unicode normalization of strings.

Another problem is the types where the XML prefix is part of the
encoding (i.e. "instance-identifier" and "identityref").  Should we do
as XSD does for the QName type, i.e. don't define a canonical
representation?

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 30 Oct 2008 12:52:39 +0100

> (somewhere).  Does anybody know?   Should we copy&paste from the XSD

IEEE 754

> spec?

YANG could use XSD datatypes for all built-in types and refer to the W3C
spec. QName is there, too.

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 30 Oct 2008 13:03:57 +0100 (CET)

> > (somewhere).  Does anybody know?   Should we copy&paste from the XSD

Is there a canonical form specified there?  I wouldn't know, b/c I
can't read their standard as I'm not a member.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 30 Oct 2008 13:09:27 +0100

> can't read their standard as I'm not a member.

Neither am I. I could probably get the standard somewhere but perhaps we
could just creatively reuse the text from the XSD spec.

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C