Debian Codegraph @

rfc9165.html

raw
1 <!DOCTYPE html>
2 <html lang="en" class="RFC">
3 <head>
4 <meta charset="utf-8">
5 <meta content="Common,Latin" name="scripts">
6 <meta content="initial-scale=1.0" name="viewport">
7 <title>RFC 9165: Additional Control Operators for the Concise Data Definition Language (CDDL)</title>
8 <meta content="Carsten Bormann" name="author">
9 <meta content='
10 The Concise Data Definition Language (CDDL), standardized in RFC 8610,
11 provides "control operators" as its main language extension point.
12 The present document defines a number of control operators that were
13 not yet ready at the time RFC 8610 was completed:
14 .plus , .cat , and .det for the construction of constants;
15 .abnf / .abnfb for including ABNF (RFC 5234 and RFC 7405) in CDDL specifications; and
16 .feature for indicating the use of a non-basic feature in an instance.
17 ' name="description">
18 <meta content="xml2rfc 3.12.0" name="generator">
19 <meta content="binary format" name="keyword">
20 <meta content="data interchange format" name="keyword">
21 <meta content="description language" name="keyword">
22 <meta content="schema language" name="keyword">
23 <meta content="tree grammar" name="keyword">
24 <meta content="ABNF" name="keyword">
25 <meta content="Augmented BNF" name="keyword">
26 <meta content="feature indication" name="keyword">
27 <meta content="9165" name="rfc.number">
28 <!-- Generator version information:
29 xml2rfc 3.12.0
30 Python 3.6.13
31 appdirs 1.4.4
32 ConfigArgParse 1.4.1
33 google-i18n-address 2.4.0
34 html5lib 1.0.1
35 intervaltree 3.0.2
36 Jinja2 2.11.3
37 kitchen 1.2.6
38 lxml 4.4.2
39 pycairo 1.15.1
40 pycountry 19.8.18
41 pyflakes 2.1.1
42 PyYAML 5.4.1
43 requests 2.24.0
44 setuptools 40.5.0
45 six 1.14.0
46 WeasyPrint 52.5
47 -->
48 <link href="rfc9165.xml" rel="alternate" type="application/rfc+xml">
49 <link href="#copyright" rel="license">
50 <style type="text/css">/*
51
52 NOTE: Changes at the bottom of this file overrides some earlier settings.
53
54 Once the style has stabilized and has been adopted as an official RFC style,
55 this can be consolidated so that style settings occur only in one place, but
56 for now the contents of this file consists first of the initial CSS work as
57 provided to the RFC Formatter (xml2rfc) work, followed by itemized and
58 commented changes found necssary during the development of the v3
59 formatters.
60
61 */
62
63 /* fonts */
64 @import url('https://fonts.googleapis.com/css?family=Noto+Sans'); /* Sans-serif */
65 @import url('https://fonts.googleapis.com/css?family=Noto+Serif'); /* Serif (print) */
66 @import url('https://fonts.googleapis.com/css?family=Roboto+Mono'); /* Monospace */
67
68 @viewport {
69 zoom: 1.0;
70 width: extend-to-zoom;
71 }
72 @-ms-viewport {
73 width: extend-to-zoom;
74 zoom: 1.0;
75 }
76 /* general and mobile first */
77 html {
78 }
79 body {
80 max-width: 90%;
81 margin: 1.5em auto;
82 color: #222;
83 background-color: #fff;
84 font-size: 14px;
85 font-family: 'Noto Sans', Arial, Helvetica, sans-serif;
86 line-height: 1.6;
87 scroll-behavior: smooth;
88 }
89 .ears {
90 display: none;
91 }
92
93 /* headings */
94 #title, h1, h2, h3, h4, h5, h6 {
95 margin: 1em 0 0.5em;
96 font-weight: bold;
97 line-height: 1.3;
98 }
99 #title {
100 clear: both;
101 border-bottom: 1px solid #ddd;
102 margin: 0 0 0.5em 0;
103 padding: 1em 0 0.5em;
104 }
105 .author {
106 padding-bottom: 4px;
107 }
108 h1 {
109 font-size: 26px;
110 margin: 1em 0;
111 }
112 h2 {
113 font-size: 22px;
114 margin-top: -20px; /* provide offset for in-page anchors */
115 padding-top: 33px;
116 }
117 h3 {
118 font-size: 18px;
119 margin-top: -36px; /* provide offset for in-page anchors */
120 padding-top: 42px;
121 }
122 h4 {
123 font-size: 16px;
124 margin-top: -36px; /* provide offset for in-page anchors */
125 padding-top: 42px;
126 }
127 h5, h6 {
128 font-size: 14px;
129 }
130 #n-copyright-notice {
131 border-bottom: 1px solid #ddd;
132 padding-bottom: 1em;
133 margin-bottom: 1em;
134 }
135 /* general structure */
136 p {
137 padding: 0;
138 margin: 0 0 1em 0;
139 text-align: left;
140 }
141 div, span {
142 position: relative;
143 }
144 div {
145 margin: 0;
146 }
147 .alignRight.art-text {
148 background-color: #f9f9f9;
149 border: 1px solid #eee;
150 border-radius: 3px;
151 padding: 1em 1em 0;
152 margin-bottom: 1.5em;
153 }
154 .alignRight.art-text pre {
155 padding: 0;
156 }
157 .alignRight {
158 margin: 1em 0;
159 }
160 .alignRight > *:first-child {
161 border: none;
162 margin: 0;
163 float: right;
164 clear: both;
165 }
166 .alignRight > *:nth-child(2) {
167 clear: both;
168 display: block;
169 border: none;
170 }
171 svg {
172 display: block;
173 }
174 .alignCenter.art-text {
175 background-color: #f9f9f9;
176 border: 1px solid #eee;
177 border-radius: 3px;
178 padding: 1em 1em 0;
179 margin-bottom: 1.5em;
180 }
181 .alignCenter.art-text pre {
182 padding: 0;
183 }
184 .alignCenter {
185 margin: 1em 0;
186 }
187 .alignCenter > *:first-child {
188 border: none;
189 /* this isn't optimal, but it's an existence proof. PrinceXML doesn't
190 support flexbox yet.
191 */
192 display: table;
193 margin: 0 auto;
194 }
195
196 /* lists */
197 ol, ul {
198 padding: 0;
199 margin: 0 0 1em 2em;
200 }
201 ol ol, ul ul, ol ul, ul ol {
202 margin-left: 1em;
203 }
204 li {
205 margin: 0 0 0.25em 0;
206 }
207 .ulCompact li {
208 margin: 0;
209 }
210 ul.empty, .ulEmpty {
211 list-style-type: none;
212 }
213 ul.empty li, .ulEmpty li {
214 margin-top: 0.5em;
215 }
216 ul.ulBare, li.ulBare {
217 margin-left: 0em !important;
218 }
219 ul.compact, .ulCompact,
220 ol.compact, .olCompact {
221 line-height: 100%;
222 margin: 0 0 0 2em;
223 }
224
225 /* definition lists */
226 dl {
227 }
228 dl > dt {
229 float: left;
230 margin-right: 1em;
231 }
232 /*
233 dl.nohang > dt {
234 float: none;
235 }
236 */
237 dl > dd {
238 margin-bottom: .8em;
239 min-height: 1.3em;
240 }
241 dl.compact > dd, .dlCompact > dd {
242 margin-bottom: 0em;
243 }
244 dl > dd > dl {
245 margin-top: 0.5em;
246 margin-bottom: 0em;
247 }
248
249 /* links */
250 a {
251 text-decoration: none;
252 }
253 a[href] {
254 color: #22e; /* Arlen: WCAG 2019 */
255 }
256 a[href]:hover {
257 background-color: #f2f2f2;
258 }
259 figcaption a[href],
260 a[href].selfRef {
261 color: #222;
262 }
263 /* XXX probably not this:
264 a.selfRef:hover {
265 background-color: transparent;
266 cursor: default;
267 } */
268
269 /* Figures */
270 tt, code, pre, code {
271 background-color: #f9f9f9;
272 font-family: 'Roboto Mono', monospace;
273 }
274 pre {
275 border: 1px solid #eee;
276 margin: 0;
277 padding: 1em;
278 }
279 img {
280 max-width: 100%;
281 }
282 figure {
283 margin: 0;
284 }
285 figure blockquote {
286 margin: 0.8em 0.4em 0.4em;
287 }
288 figcaption {
289 font-style: italic;
290 margin: 0 0 1em 0;
291 }
292 @media screen {
293 pre {
294 overflow-x: auto;
295 max-width: 100%;
296 max-width: calc(100% - 22px);
297 }
298 }
299
300 /* aside, blockquote */
301 aside, blockquote {
302 margin-left: 0;
303 padding: 1.2em 2em;
304 }
305 blockquote {
306 background-color: #f9f9f9;
307 color: #111; /* Arlen: WCAG 2019 */
308 border: 1px solid #ddd;
309 border-radius: 3px;
310 margin: 1em 0;
311 }
312 cite {
313 display: block;
314 text-align: right;
315 font-style: italic;
316 }
317
318 /* tables */
319 table {
320 width: 100%;
321 margin: 0 0 1em;
322 border-collapse: collapse;
323 border: 1px solid #eee;
324 }
325 th, td {
326 text-align: left;
327 vertical-align: top;
328 padding: 0.5em 0.75em;
329 }
330 th {
331 text-align: left;
332 background-color: #e9e9e9;
333 }
334 tr:nth-child(2n+1) > td {
335 background-color: #f5f5f5;
336 }
337 table caption {
338 font-style: italic;
339 margin: 0;
340 padding: 0;
341 text-align: left;
342 }
343 table p {
344 /* XXX to avoid bottom margin on table row signifiers. If paragraphs should
345 be allowed within tables more generally, it would be far better to select on a class. */
346 margin: 0;
347 }
348
349 /* pilcrow */
350 a.pilcrow {
351 color: #666; /* Arlen: AHDJ 2019 */
352 text-decoration: none;
353 visibility: hidden;
354 user-select: none;
355 -ms-user-select: none;
356 -o-user-select:none;
357 -moz-user-select: none;
358 -khtml-user-select: none;
359 -webkit-user-select: none;
360 -webkit-touch-callout: none;
361 }
362 @media screen {
363 aside:hover > a.pilcrow,
364 p:hover > a.pilcrow,
365 blockquote:hover > a.pilcrow,
366 div:hover > a.pilcrow,
367 li:hover > a.pilcrow,
368 pre:hover > a.pilcrow {
369 visibility: visible;
370 }
371 a.pilcrow:hover {
372 background-color: transparent;
373 }
374 }
375
376 /* misc */
377 hr {
378 border: 0;
379 border-top: 1px solid #eee;
380 }
381 .bcp14 {
382 font-variant: small-caps;
383 }
384
385 .role {
386 font-variant: all-small-caps;
387 }
388
389 /* info block */
390 #identifiers {
391 margin: 0;
392 font-size: 0.9em;
393 }
394 #identifiers dt {
395 width: 3em;
396 clear: left;
397 }
398 #identifiers dd {
399 float: left;
400 margin-bottom: 0;
401 }
402 /* Fix PDF info block run off issue */
403 @media print {
404 #identifiers dd {
405 float: none;
406 }
407 }
408 #identifiers .authors .author {
409 display: inline-block;
410 margin-right: 1.5em;
411 }
412 #identifiers .authors .org {
413 font-style: italic;
414 }
415
416 /* The prepared/rendered info at the very bottom of the page */
417 .docInfo {
418 color: #666; /* Arlen: WCAG 2019 */
419 font-size: 0.9em;
420 font-style: italic;
421 margin-top: 2em;
422 }
423 .docInfo .prepared {
424 float: left;
425 }
426 .docInfo .prepared {
427 float: right;
428 }
429
430 /* table of contents */
431 #toc {
432 padding: 0.75em 0 2em 0;
433 margin-bottom: 1em;
434 }
435 nav.toc ul {
436 margin: 0 0.5em 0 0;
437 padding: 0;
438 list-style: none;
439 }
440 nav.toc li {
441 line-height: 1.3em;
442 margin: 0.75em 0;
443 padding-left: 1.2em;
444 text-indent: -1.2em;
445 }
446 /* references */
447 .references dt {
448 text-align: right;
449 font-weight: bold;
450 min-width: 7em;
451 }
452 .references dd {
453 margin-left: 8em;
454 overflow: auto;
455 }
456
457 .refInstance {
458 margin-bottom: 1.25em;
459 }
460
461 .references .ascii {
462 margin-bottom: 0.25em;
463 }
464
465 /* index */
466 .index ul {
467 margin: 0 0 0 1em;
468 padding: 0;
469 list-style: none;
470 }
471 .index ul ul {
472 margin: 0;
473 }
474 .index li {
475 margin: 0;
476 text-indent: -2em;
477 padding-left: 2em;
478 padding-bottom: 5px;
479 }
480 .indexIndex {
481 margin: 0.5em 0 1em;
482 }
483 .index a {
484 font-weight: 700;
485 }
486 /* make the index two-column on all but the smallest screens */
487 @media (min-width: 600px) {
488 .index ul {
489 -moz-column-count: 2;
490 -moz-column-gap: 20px;
491 }
492 .index ul ul {
493 -moz-column-count: 1;
494 -moz-column-gap: 0;
495 }
496 }
497
498 /* authors */
499 address.vcard {
500 font-style: normal;
501 margin: 1em 0;
502 }
503
504 address.vcard .nameRole {
505 font-weight: 700;
506 margin-left: 0;
507 }
508 address.vcard .label {
509 font-family: "Noto Sans",Arial,Helvetica,sans-serif;
510 margin: 0.5em 0;
511 }
512 address.vcard .type {
513 display: none;
514 }
515 .alternative-contact {
516 margin: 1.5em 0 1em;
517 }
518 hr.addr {
519 border-top: 1px dashed;
520 margin: 0;
521 color: #ddd;
522 max-width: calc(100% - 16px);
523 }
524
525 /* temporary notes */
526 .rfcEditorRemove::before {
527 position: absolute;
528 top: 0.2em;
529 right: 0.2em;
530 padding: 0.2em;
531 content: "The RFC Editor will remove this note";
532 color: #9e2a00; /* Arlen: WCAG 2019 */
533 background-color: #ffd; /* Arlen: WCAG 2019 */
534 }
535 .rfcEditorRemove {
536 position: relative;
537 padding-top: 1.8em;
538 background-color: #ffd; /* Arlen: WCAG 2019 */
539 border-radius: 3px;
540 }
541 .cref {
542 background-color: #ffd; /* Arlen: WCAG 2019 */
543 padding: 2px 4px;
544 }
545 .crefSource {
546 font-style: italic;
547 }
548 /* alternative layout for smaller screens */
549 @media screen and (max-width: 1023px) {
550 body {
551 padding-top: 2em;
552 }
553 #title {
554 padding: 1em 0;
555 }
556 h1 {
557 font-size: 24px;
558 }
559 h2 {
560 font-size: 20px;
561 margin-top: -18px; /* provide offset for in-page anchors */
562 padding-top: 38px;
563 }
564 #identifiers dd {
565 max-width: 60%;
566 }
567 #toc {
568 position: fixed;
569 z-index: 2;
570 top: 0;
571 right: 0;
572 padding: 0;
573 margin: 0;
574 background-color: inherit;
575 border-bottom: 1px solid #ccc;
576 }
577 #toc h2 {
578 margin: -1px 0 0 0;
579 padding: 4px 0 4px 6px;
580 padding-right: 1em;
581 min-width: 190px;
582 font-size: 1.1em;
583 text-align: right;
584 background-color: #444;
585 color: white;
586 cursor: pointer;
587 }
588 #toc h2::before { /* css hamburger */
589 float: right;
590 position: relative;
591 width: 1em;
592 height: 1px;
593 left: -164px;
594 margin: 6px 0 0 0;
595 background: white none repeat scroll 0 0;
596 box-shadow: 0 4px 0 0 white, 0 8px 0 0 white;
597 content: "";
598 }
599 #toc nav {
600 display: none;
601 padding: 0.5em 1em 1em;
602 overflow: auto;
603 height: calc(100vh - 48px);
604 border-left: 1px solid #ddd;
605 }
606 }
607
608 /* alternative layout for wide screens */
609 @media screen and (min-width: 1024px) {
610 body {
611 max-width: 724px;
612 margin: 42px auto;
613 padding-left: 1.5em;
614 padding-right: 29em;
615 }
616 #toc {
617 position: fixed;
618 top: 42px;
619 right: 42px;
620 width: 25%;
621 margin: 0;
622 padding: 0 1em;
623 z-index: 1;
624 }
625 #toc h2 {
626 border-top: none;
627 border-bottom: 1px solid #ddd;
628 font-size: 1em;
629 font-weight: normal;
630 margin: 0;
631 padding: 0.25em 1em 1em 0;
632 }
633 #toc nav {
634 display: block;
635 height: calc(90vh - 84px);
636 bottom: 0;
637 padding: 0.5em 0 0;
638 overflow: auto;
639 }
640 img { /* future proofing */
641 max-width: 100%;
642 height: auto;
643 }
644 }
645
646 /* pagination */
647 @media print {
648 body {
649
650 width: 100%;
651 }
652 p {
653 orphans: 3;
654 widows: 3;
655 }
656 #n-copyright-notice {
657 border-bottom: none;
658 }
659 #toc, #n-introduction {
660 page-break-before: always;
661 }
662 #toc {
663 border-top: none;
664 padding-top: 0;
665 }
666 figure, pre {
667 page-break-inside: avoid;
668 }
669 figure {
670 overflow: scroll;
671 }
672 h1, h2, h3, h4, h5, h6 {
673 page-break-after: avoid;
674 }
675 h2+*, h3+*, h4+*, h5+*, h6+* {
676 page-break-before: avoid;
677 }
678 pre {
679 white-space: pre-wrap;
680 word-wrap: break-word;
681 font-size: 10pt;
682 }
683 table {
684 border: 1px solid #ddd;
685 }
686 td {
687 border-top: 1px solid #ddd;
688 }
689 }
690
691 /* This is commented out here, as the string-set: doesn't
692 pass W3C validation currently */
693 /*
694 .ears thead .left {
695 string-set: ears-top-left content();
696 }
697
698 .ears thead .center {
699 string-set: ears-top-center content();
700 }
701
702 .ears thead .right {
703 string-set: ears-top-right content();
704 }
705
706 .ears tfoot .left {
707 string-set: ears-bottom-left content();
708 }
709
710 .ears tfoot .center {
711 string-set: ears-bottom-center content();
712 }
713
714 .ears tfoot .right {
715 string-set: ears-bottom-right content();
716 }
717 */
718
719 @page :first {
720 padding-top: 0;
721 @top-left {
722 content: normal;
723 border: none;
724 }
725 @top-center {
726 content: normal;
727 border: none;
728 }
729 @top-right {
730 content: normal;
731 border: none;
732 }
733 }
734
735 @page {
736 size: A4;
737 margin-bottom: 45mm;
738 padding-top: 20px;
739 /* The follwing is commented out here, but set appropriately by in code, as
740 the content depends on the document */
741 /*
742 @top-left {
743 content: 'Internet-Draft';
744 vertical-align: bottom;
745 border-bottom: solid 1px #ccc;
746 }
747 @top-left {
748 content: string(ears-top-left);
749 vertical-align: bottom;
750 border-bottom: solid 1px #ccc;
751 }
752 @top-center {
753 content: string(ears-top-center);
754 vertical-align: bottom;
755 border-bottom: solid 1px #ccc;
756 }
757 @top-right {
758 content: string(ears-top-right);
759 vertical-align: bottom;
760 border-bottom: solid 1px #ccc;
761 }
762 @bottom-left {
763 content: string(ears-bottom-left);
764 vertical-align: top;
765 border-top: solid 1px #ccc;
766 }
767 @bottom-center {
768 content: string(ears-bottom-center);
769 vertical-align: top;
770 border-top: solid 1px #ccc;
771 }
772 @bottom-right {
773 content: '[Page ' counter(page) ']';
774 vertical-align: top;
775 border-top: solid 1px #ccc;
776 }
777 */
778
779 }
780
781 /* Changes introduced to fix issues found during implementation */
782 /* Make sure links are clickable even if overlapped by following H* */
783 a {
784 z-index: 2;
785 }
786 /* Separate body from document info even without intervening H1 */
787 section {
788 clear: both;
789 }
790
791
792 /* Top align author divs, to avoid names without organization dropping level with org names */
793 .author {
794 vertical-align: top;
795 }
796
797 /* Leave room in document info to show Internet-Draft on one line */
798 #identifiers dt {
799 width: 8em;
800 }
801
802 /* Don't waste quite as much whitespace between label and value in doc info */
803 #identifiers dd {
804 margin-left: 1em;
805 }
806
807 /* Give floating toc a background color (needed when it's a div inside section */
808 #toc {
809 background-color: white;
810 }
811
812 /* Make the collapsed ToC header render white on gray also when it's a link */
813 @media screen and (max-width: 1023px) {
814 #toc h2 a,
815 #toc h2 a:link,
816 #toc h2 a:focus,
817 #toc h2 a:hover,
818 #toc a.toplink,
819 #toc a.toplink:hover {
820 color: white;
821 background-color: #444;
822 text-decoration: none;
823 }
824 }
825
826 /* Give the bottom of the ToC some whitespace */
827 @media screen and (min-width: 1024px) {
828 #toc {
829 padding: 0 0 1em 1em;
830 }
831 }
832
833 /* Style section numbers with more space between number and title */
834 .section-number {
835 padding-right: 0.5em;
836 }
837
838 /* prevent monospace from becoming overly large */
839 tt, code, pre, code {
840 font-size: 95%;
841 }
842
843 /* Fix the height/width aspect for ascii art*/
844 pre.sourcecode,
845 .art-text pre {
846 line-height: 1.12;
847 }
848
849
850 /* Add styling for a link in the ToC that points to the top of the document */
851 a.toplink {
852 float: right;
853 margin-right: 0.5em;
854 }
855
856 /* Fix the dl styling to match the RFC 7992 attributes */
857 dl > dt,
858 dl.dlParallel > dt {
859 float: left;
860 margin-right: 1em;
861 }
862 dl.dlNewline > dt {
863 float: none;
864 }
865
866 /* Provide styling for table cell text alignment */
867 table td.text-left,
868 table th.text-left {
869 text-align: left;
870 }
871 table td.text-center,
872 table th.text-center {
873 text-align: center;
874 }
875 table td.text-right,
876 table th.text-right {
877 text-align: right;
878 }
879
880 /* Make the alternative author contact informatio look less like just another
881 author, and group it closer with the primary author contact information */
882 .alternative-contact {
883 margin: 0.5em 0 0.25em 0;
884 }
885 address .non-ascii {
886 margin: 0 0 0 2em;
887 }
888
889 /* With it being possible to set tables with alignment
890 left, center, and right, { width: 100%; } does not make sense */
891 table {
892 width: auto;
893 }
894
895 /* Avoid reference text that sits in a block with very wide left margin,
896 because of a long floating dt label.*/
897 .references dd {
898 overflow: visible;
899 }
900
901 /* Control caption placement */
902 caption {
903 caption-side: bottom;
904 }
905
906 /* Limit the width of the author address vcard, so names in right-to-left
907 script don't end up on the other side of the page. */
908
909 address.vcard {
910 max-width: 30em;
911 margin-right: auto;
912 }
913
914 /* For address alignment dependent on LTR or RTL scripts */
915 address div.left {
916 text-align: left;
917 }
918 address div.right {
919 text-align: right;
920 }
921
922 /* Provide table alignment support. We can't use the alignX classes above
923 since they do unwanted things with caption and other styling. */
924 table.right {
925 margin-left: auto;
926 margin-right: 0;
927 }
928 table.center {
929 margin-left: auto;
930 margin-right: auto;
931 }
932 table.left {
933 margin-left: 0;
934 margin-right: auto;
935 }
936
937 /* Give the table caption label the same styling as the figcaption */
938 caption a[href] {
939 color: #222;
940 }
941
942 @media print {
943 .toplink {
944 display: none;
945 }
946
947 /* avoid overwriting the top border line with the ToC header */
948 #toc {
949 padding-top: 1px;
950 }
951
952 /* Avoid page breaks inside dl and author address entries */
953 .vcard {
954 page-break-inside: avoid;
955 }
956
957 }
958 /* Tweak the bcp14 keyword presentation */
959 .bcp14 {
960 font-variant: small-caps;
961 font-weight: bold;
962 font-size: 0.9em;
963 }
964 /* Tweak the invisible space above H* in order not to overlay links in text above */
965 h2 {
966 margin-top: -18px; /* provide offset for in-page anchors */
967 padding-top: 31px;
968 }
969 h3 {
970 margin-top: -18px; /* provide offset for in-page anchors */
971 padding-top: 24px;
972 }
973 h4 {
974 margin-top: -18px; /* provide offset for in-page anchors */
975 padding-top: 24px;
976 }
977 /* Float artwork pilcrow to the right */
978 @media screen {
979 .artwork a.pilcrow {
980 display: block;
981 line-height: 0.7;
982 margin-top: 0.15em;
983 }
984 }
985 /* Make pilcrows on dd visible */
986 @media screen {
987 dd:hover > a.pilcrow {
988 visibility: visible;
989 }
990 }
991 /* Make the placement of figcaption match that of a table's caption
992 by removing the figure's added bottom margin */
993 .alignLeft.art-text,
994 .alignCenter.art-text,
995 .alignRight.art-text {
996 margin-bottom: 0;
997 }
998 .alignLeft,
999 .alignCenter,
1000 .alignRight {
1001 margin: 1em 0 0 0;
1002 }
1003 /* In print, the pilcrow won't show on hover, so prevent it from taking up space,
1004 possibly even requiring a new line */
1005 @media print {
1006 a.pilcrow {
1007 display: none;
1008 }
1009 }
1010 /* Styling for the external metadata */
1011 div#external-metadata {
1012 background-color: #eee;
1013 padding: 0.5em;
1014 margin-bottom: 0.5em;
1015 display: none;
1016 }
1017 div#internal-metadata {
1018 padding: 0.5em; /* to match the external-metadata padding */
1019 }
1020 /* Styling for title RFC Number */
1021 h1#rfcnum {
1022 clear: both;
1023 margin: 0 0 -1em;
1024 padding: 1em 0 0 0;
1025 }
1026 /* Make .olPercent look the same as <ol><li> */
1027 dl.olPercent > dd {
1028 margin-bottom: 0.25em;
1029 min-height: initial;
1030 }
1031 /* Give aside some styling to set it apart */
1032 aside {
1033 border-left: 1px solid #ddd;
1034 margin: 1em 0 1em 2em;
1035 padding: 0.2em 2em;
1036 }
1037 aside > dl,
1038 aside > ol,
1039 aside > ul,
1040 aside > table,
1041 aside > p {
1042 margin-bottom: 0.5em;
1043 }
1044 /* Additional page break settings */
1045 @media print {
1046 figcaption, table caption {
1047 page-break-before: avoid;
1048 }
1049 }
1050 /* Font size adjustments for print */
1051 @media print {
1052 body { font-size: 10pt; line-height: normal; max-width: 96%; }
1053 h1 { font-size: 1.72em; padding-top: 1.5em; } /* 1*1.2*1.2*1.2 */
1054 h2 { font-size: 1.44em; padding-top: 1.5em; } /* 1*1.2*1.2 */
1055 h3 { font-size: 1.2em; padding-top: 1.5em; } /* 1*1.2 */
1056 h4 { font-size: 1em; padding-top: 1.5em; }
1057 h5, h6 { font-size: 1em; margin: initial; padding: 0.5em 0 0.3em; }
1058 }
1059 /* Sourcecode margin in print, when there's no pilcrow */
1060 @media print {
1061 .artwork,
1062 .sourcecode {
1063 margin-bottom: 1em;
1064 }
1065 }
1066 /* Avoid narrow tables forcing too narrow table captions, which may render badly */
1067 table {
1068 min-width: 20em;
1069 }
1070 /* ol type a */
1071 ol.type-a { list-style-type: lower-alpha; }
1072 ol.type-A { list-style-type: upper-alpha; }
1073 ol.type-i { list-style-type: lower-roman; }
1074 ol.type-I { list-style-type: lower-roman; }
1075 /* Apply the print table and row borders in general, on request from the RPC,
1076 and increase the contrast between border and odd row background sligthtly */
1077 table {
1078 border: 1px solid #ddd;
1079 }
1080 td {
1081 border-top: 1px solid #ddd;
1082 }
1083 tr:nth-child(2n+1) > td {
1084 background-color: #f8f8f8;
1085 }
1086 /* Use style rules to govern display of the TOC. */
1087 @media screen and (max-width: 1023px) {
1088 #toc nav { display: none; }
1089 #toc.active nav { display: block; }
1090 }
1091 /* Add support for keepWithNext */
1092 .keepWithNext {
1093 break-after: avoid-page;
1094 break-after: avoid-page;
1095 }
1096 /* Add support for keepWithPrevious */
1097 .keepWithPrevious {
1098 break-before: avoid-page;
1099 }
1100 /* Change the approach to avoiding breaks inside artwork etc. */
1101 figure, pre, table, .artwork, .sourcecode {
1102 break-before: auto;
1103 break-after: auto;
1104 }
1105 /* Avoid breaks between <dt> and <dd> */
1106 dl {
1107 break-before: auto;
1108 break-inside: auto;
1109 }
1110 dt {
1111 break-before: auto;
1112 break-after: avoid-page;
1113 }
1114 dd {
1115 break-before: avoid-page;
1116 break-after: auto;
1117 orphans: 3;
1118 widows: 3
1119 }
1120 span.break, dd.break {
1121 margin-bottom: 0;
1122 min-height: 0;
1123 break-before: auto;
1124 break-inside: auto;
1125 break-after: auto;
1126 }
1127 /* Undo break-before ToC */
1128 @media print {
1129 #toc {
1130 break-before: auto;
1131 }
1132 }
1133 /* Text in compact lists should not get extra bottim margin space,
1134 since that would makes the list not compact */
1135 ul.compact p, .ulCompact p,
1136 ol.compact p, .olCompact p {
1137 margin: 0;
1138 }
1139 /* But the list as a whole needs the extra space at the end */
1140 section ul.compact,
1141 section .ulCompact,
1142 section ol.compact,
1143 section .olCompact {
1144 margin-bottom: 1em; /* same as p not within ul.compact etc. */
1145 }
1146 /* The tt and code background above interferes with for instance table cell
1147 backgrounds. Changed to something a bit more selective. */
1148 tt, code {
1149 background-color: transparent;
1150 }
1151 p tt, p code, li tt, li code {
1152 background-color: #f8f8f8;
1153 }
1154 /* Tweak the pre margin -- 0px doesn't come out well */
1155 pre {
1156 margin-top: 0.5px;
1157 }
1158 /* Tweak the comact list text */
1159 ul.compact, .ulCompact,
1160 ol.compact, .olCompact,
1161 dl.compact, .dlCompact {
1162 line-height: normal;
1163 }
1164 /* Don't add top margin for nested lists */
1165 li > ul, li > ol, li > dl,
1166 dd > ul, dd > ol, dd > dl,
1167 dl > dd > dl {
1168 margin-top: initial;
1169 }
1170 /* Elements that should not be rendered on the same line as a <dt> */
1171 /* This should match the element list in writer.text.TextWriter.render_dl() */
1172 dd > div.artwork:first-child,
1173 dd > aside:first-child,
1174 dd > figure:first-child,
1175 dd > ol:first-child,
1176 dd > div:first-child > pre.sourcecode,
1177 dd > table:first-child,
1178 dd > ul:first-child {
1179 clear: left;
1180 }
1181 /* fix for weird browser behaviour when <dd/> is empty */
1182 dt+dd:empty::before{
1183 content: "\00a0";
1184 }
1185 /* Make paragraph spacing inside <li> smaller than in body text, to fit better within the list */
1186 li > p {
1187 margin-bottom: 0.5em
1188 }
1189 /* Don't let p margin spill out from inside list items */
1190 li > p:last-of-type {
1191 margin-bottom: 0;
1192 }
1193 </style>
1194 <link href="rfc-local.css" rel="stylesheet" type="text/css">
1195 <link href="https://dx.doi.org/10.17487/rfc9165" rel="alternate">
1196 <link href="urn:issn:2070-1721" rel="alternate">
1197 <link href="https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl-control-07" rel="prev">
1198 </head>
1199 <body>
1200 <script src="https://www.rfc-editor.org/js/metadata.min.js"></script>
1201 <table class="ears">
1202 <thead><tr>
1203 <td class="left">RFC 9165</td>
1204 <td class="center">CDDL Control Operators</td>
1205 <td class="right">December 2021</td>
1206 </tr></thead>
1207 <tfoot><tr>
1208 <td class="left">Bormann</td>
1209 <td class="center">Standards Track</td>
1210 <td class="right">[Page]</td>
1211 </tr></tfoot>
1212 </table>
1213 <div id="external-metadata" class="document-information"></div>
1214 <div id="internal-metadata" class="document-information">
1215 <dl id="identifiers">
1216 <dt class="label-stream">Stream:</dt>
1217 <dd class="stream">Internet Engineering Task Force (IETF)</dd>
1218 <dt class="label-rfc">RFC:</dt>
1219 <dd class="rfc"><a href="https://www.rfc-editor.org/rfc/rfc9165" class="eref">9165</a></dd>
1220 <dt class="label-category">Category:</dt>
1221 <dd class="category">Standards Track</dd>
1222 <dt class="label-published">Published:</dt>
1223 <dd class="published">
1224 <time datetime="2021-12" class="published">December 2021</time>
1225 </dd>
1226 <dt class="label-issn">ISSN:</dt>
1227 <dd class="issn">2070-1721</dd>
1228 <dt class="label-authors">Author:</dt>
1229 <dd class="authors">
1230 <div class="author">
1231 <div class="author-name">C. Bormann</div>
1232 <div class="org">Universität Bremen TZI</div>
1233 </div>
1234 </dd>
1235 </dl>
1236 </div>
1237 <h1 id="rfcnum">RFC 9165</h1>
1238 <h1 id="title">Additional Control Operators for the Concise Data Definition Language (CDDL)</h1>
1239 <section id="section-abstract">
1240 <h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
1241 <p id="section-abstract-1">The Concise Data Definition Language (CDDL), standardized in RFC 8610,
1242 provides "control operators" as its main language extension point.<a href="#section-abstract-1" class="pilcrow">¶</a></p>
1243 <p id="section-abstract-2">The present document defines a number of control operators that were
1244 not yet ready at the time RFC 8610 was completed:
1245 <code>.plus</code>, <code>.cat</code>, and <code>.det</code> for the construction of constants;
1246 <code>.abnf</code>/<code>.abnfb</code> for including ABNF (RFC 5234 and RFC 7405) in CDDL specifications; and
1247 <code>.feature</code> for indicating the use of a non-basic feature in an instance.<a href="#section-abstract-2" class="pilcrow">¶</a></p>
1248 </section>
1249 <div id="status-of-memo">
1250 <section id="section-boilerplate.1">
1251 <h2 id="name-status-of-this-memo">
1252 <a href="#name-status-of-this-memo" class="section-name selfRef">Status of This Memo</a>
1253 </h2>
1254 <p id="section-boilerplate.1-1">
1255 This is an Internet Standards Track document.<a href="#section-boilerplate.1-1" class="pilcrow">¶</a></p>
1256 <p id="section-boilerplate.1-2">
1257 This document is a product of the Internet Engineering Task Force
1258 (IETF). It represents the consensus of the IETF community. It has
1259 received public review and has been approved for publication by
1260 the Internet Engineering Steering Group (IESG). Further
1261 information on Internet Standards is available in Section 2 of
1262 RFC 7841.<a href="#section-boilerplate.1-2" class="pilcrow">¶</a></p>
1263 <p id="section-boilerplate.1-3">
1264 Information about the current status of this document, any
1265 errata, and how to provide feedback on it may be obtained at
1266 <span><a href="https://www.rfc-editor.org/info/rfc9165">https://www.rfc-editor.org/info/rfc9165</a></span>.<a href="#section-boilerplate.1-3" class="pilcrow">¶</a></p>
1267 </section>
1268 </div>
1269 <div id="copyright">
1270 <section id="section-boilerplate.2">
1271 <h2 id="name-copyright-notice">
1272 <a href="#name-copyright-notice" class="section-name selfRef">Copyright Notice</a>
1273 </h2>
1274 <p id="section-boilerplate.2-1">
1275 Copyright (c) 2021 IETF Trust and the persons identified as the
1276 document authors. All rights reserved.<a href="#section-boilerplate.2-1" class="pilcrow">¶</a></p>
1277 <p id="section-boilerplate.2-2">
1278 This document is subject to BCP 78 and the IETF Trust's Legal
1279 Provisions Relating to IETF Documents
1280 (<span><a href="https://trustee.ietf.org/license-info">https://trustee.ietf.org/license-info</a></span>) in effect on the date of
1281 publication of this document. Please review these documents
1282 carefully, as they describe your rights and restrictions with
1283 respect to this document. Code Components extracted from this
1284 document must include Revised BSD License text as described in
1285 Section 4.e of the Trust Legal Provisions and are provided without
1286 warranty as described in the Revised BSD License.<a href="#section-boilerplate.2-2" class="pilcrow">¶</a></p>
1287 </section>
1288 </div>
1289 <div id="toc">
1290 <section id="section-toc.1">
1291 <a href="#" onclick="scroll(0,0)" class="toplink">▲</a><h2 id="name-table-of-contents">
1292 <a href="#name-table-of-contents" class="section-name selfRef">Table of Contents</a>
1293 </h2>
1294 <nav class="toc"><ul class="compact toc ulBare ulEmpty">
1295 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1">
1296 <p id="section-toc.1-1.1.1" class="keepWithNext"><a href="#section-1" class="xref">1</a>.  <a href="#name-introduction" class="xref">Introduction</a></p>
1297 <ul class="compact toc ulBare ulEmpty">
1298 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.1.2.1">
1299 <p id="section-toc.1-1.1.2.1.1" class="keepWithNext"><a href="#section-1.1" class="xref">1.1</a>.  <a href="#name-terminology" class="xref">Terminology</a></p>
1300 </li>
1301 </ul>
1302 </li>
1303 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2">
1304 <p id="section-toc.1-1.2.1"><a href="#section-2" class="xref">2</a>.  <a href="#name-computed-literals" class="xref">Computed Literals</a></p>
1305 <ul class="compact toc ulBare ulEmpty">
1306 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.1">
1307 <p id="section-toc.1-1.2.2.1.1" class="keepWithNext"><a href="#section-2.1" class="xref">2.1</a>.  <a href="#name-numeric-addition" class="xref">Numeric Addition</a></p>
1308 </li>
1309 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.2">
1310 <p id="section-toc.1-1.2.2.2.1"><a href="#section-2.2" class="xref">2.2</a>.  <a href="#name-string-concatenation" class="xref">String Concatenation</a></p>
1311 </li>
1312 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.2.2.3">
1313 <p id="section-toc.1-1.2.2.3.1"><a href="#section-2.3" class="xref">2.3</a>.  <a href="#name-string-concatenation-with-d" class="xref">String Concatenation with Dedenting</a></p>
1314 </li>
1315 </ul>
1316 </li>
1317 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3">
1318 <p id="section-toc.1-1.3.1"><a href="#section-3" class="xref">3</a>.  <a href="#name-embedded-abnf" class="xref">Embedded ABNF</a></p>
1319 </li>
1320 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.4">
1321 <p id="section-toc.1-1.4.1"><a href="#section-4" class="xref">4</a>.  <a href="#name-features" class="xref">Features</a></p>
1322 </li>
1323 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.5">
1324 <p id="section-toc.1-1.5.1"><a href="#section-5" class="xref">5</a>.  <a href="#name-iana-considerations" class="xref">IANA Considerations</a></p>
1325 </li>
1326 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.6">
1327 <p id="section-toc.1-1.6.1"><a href="#section-6" class="xref">6</a>.  <a href="#name-security-considerations" class="xref">Security Considerations</a></p>
1328 </li>
1329 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7">
1330 <p id="section-toc.1-1.7.1"><a href="#section-7" class="xref">7</a>.  <a href="#name-references" class="xref">References</a></p>
1331 <ul class="compact toc ulBare ulEmpty">
1332 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.1">
1333 <p id="section-toc.1-1.7.2.1.1"><a href="#section-7.1" class="xref">7.1</a>.  <a href="#name-normative-references" class="xref">Normative References</a></p>
1334 </li>
1335 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.7.2.2">
1336 <p id="section-toc.1-1.7.2.2.1"><a href="#section-7.2" class="xref">7.2</a>.  <a href="#name-informative-references" class="xref">Informative References</a></p>
1337 </li>
1338 </ul>
1339 </li>
1340 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.8">
1341 <p id="section-toc.1-1.8.1"><a href="#appendix-A" class="xref"></a><a href="#name-acknowledgements" class="xref">Acknowledgements</a></p>
1342 </li>
1343 <li class="compact toc ulBare ulEmpty" id="section-toc.1-1.9">
1344 <p id="section-toc.1-1.9.1"><a href="#appendix-B" class="xref"></a><a href="#name-authors-address" class="xref">Author's Address</a></p>
1345 </li>
1346 </ul>
1347 </nav>
1348 </section>
1349 </div>
1350 <div id="intro">
1351 <section id="section-1">
1352 <h2 id="name-introduction">
1353 <a href="#section-1" class="section-number selfRef">1. </a><a href="#name-introduction" class="section-name selfRef">Introduction</a>
1354 </h2>
1355 <p id="section-1-1">The Concise Data Definition Language (CDDL), standardized in <span>[<a href="#RFC8610" class="xref">RFC8610</a>]</span>,
1356 provides "control operators" as its main language extension point
1357 (<span><a href="https://www.rfc-editor.org/rfc/rfc8610#section-3.8" class="relref">Section 3.8</a> of [<a href="#RFC8610" class="xref">RFC8610</a>]</span>).<a href="#section-1-1" class="pilcrow">¶</a></p>
1358 <p id="section-1-2">The present document defines a number of control operators that were
1359 not yet ready at the time <span>[<a href="#RFC8610" class="xref">RFC8610</a>]</span> was completed:<a href="#section-1-2" class="pilcrow">¶</a></p>
1360 <span id="name-new-control-operators-in-th"></span><div id="tbl-new">
1361 <table class="center" id="table-1">
1362 <caption>
1363 <a href="#table-1" class="selfRef">Table 1</a>:
1364 <a href="#name-new-control-operators-in-th" class="selfRef">New Control Operators in this Document</a>
1365 </caption>
1366 <thead>
1367 <tr>
1368 <th class="text-left" rowspan="1" colspan="1">Name</th>
1369 <th class="text-left" rowspan="1" colspan="1">Purpose</th>
1370 </tr>
1371 </thead>
1372 <tbody>
1373 <tr>
1374 <td class="text-left" rowspan="1" colspan="1">.plus</td>
1375 <td class="text-left" rowspan="1" colspan="1">Numeric addition</td>
1376 </tr>
1377 <tr>
1378 <td class="text-left" rowspan="1" colspan="1">.cat</td>
1379 <td class="text-left" rowspan="1" colspan="1">String concatenation</td>
1380 </tr>
1381 <tr>
1382 <td class="text-left" rowspan="1" colspan="1">.det</td>
1383 <td class="text-left" rowspan="1" colspan="1">String concatenation, pre-dedenting</td>
1384 </tr>
1385 <tr>
1386 <td class="text-left" rowspan="1" colspan="1">.abnf</td>
1387 <td class="text-left" rowspan="1" colspan="1">ABNF in CDDL (text strings)</td>
1388 </tr>
1389 <tr>
1390 <td class="text-left" rowspan="1" colspan="1">.abnfb</td>
1391 <td class="text-left" rowspan="1" colspan="1">ABNF in CDDL (byte strings)</td>
1392 </tr>
1393 <tr>
1394 <td class="text-left" rowspan="1" colspan="1">.feature</td>
1395 <td class="text-left" rowspan="1" colspan="1">Indicates name of feature used (extension point)</td>
1396 </tr>
1397 </tbody>
1398 </table>
1399 </div>
1400 <div id="terminology">
1401 <section id="section-1.1">
1402 <h3 id="name-terminology">
1403 <a href="#section-1.1" class="section-number selfRef">1.1. </a><a href="#name-terminology" class="section-name selfRef">Terminology</a>
1404 </h3>
1405 <p id="section-1.1-1">
1406 The key words "<span class="bcp14">MUST</span>", "<span class="bcp14">MUST NOT</span>", "<span class="bcp14">REQUIRED</span>", "<span class="bcp14">SHALL</span>", "<span class="bcp14">SHALL NOT</span>", "<span class="bcp14">SHOULD</span>", "<span class="bcp14">SHOULD NOT</span>", "<span class="bcp14">RECOMMENDED</span>", "<span class="bcp14">NOT RECOMMENDED</span>",
1407 "<span class="bcp14">MAY</span>", and "<span class="bcp14">OPTIONAL</span>" in this document are to be interpreted as
1408 described in BCP 14 <span>[<a href="#RFC2119" class="xref">RFC2119</a>]</span> <span>[<a href="#RFC8174" class="xref">RFC8174</a>]</span>
1409 when, and only when, they appear in all capitals, as shown here.<a href="#section-1.1-1" class="pilcrow">¶</a></p>
1410 <p id="section-1.1-2">This specification uses terminology from <span>[<a href="#RFC8610" class="xref">RFC8610</a>]</span>.
1411 In particular, with respect to control operators, "target" refers to
1412 the left-hand side operand and "controller" to the right-hand side operand.
1413 "Tool" refers to tools along the lines of that described in <span><a href="https://www.rfc-editor.org/rfc/rfc8610#appendix-F" class="relref">Appendix F</a> of [<a href="#RFC8610" class="xref">RFC8610</a>]</span>.
1414 Note also that the data model underlying CDDL provides for text
1415 strings as well as byte strings as two separate types, which are
1416 then collectively referred to as "strings".<a href="#section-1.1-2" class="pilcrow">¶</a></p>
1417 <p id="section-1.1-3">The term "ABNF" in this specification stands for the combination of
1418 <span>[<a href="#RFC5234" class="xref">RFC5234</a>]</span> and <span>[<a href="#RFC7405" class="xref">RFC7405</a>]</span>; i.e., the ABNF control operators defined by
1419 this document allow use of the case-sensitive extensions defined in
1420 <span>[<a href="#RFC7405" class="xref">RFC7405</a>]</span>.<a href="#section-1.1-3" class="pilcrow">¶</a></p>
1421 </section>
1422 </div>
1423 </section>
1424 </div>
1425 <div id="computed-literals">
1426 <section id="section-2">
1427 <h2 id="name-computed-literals">
1428 <a href="#section-2" class="section-number selfRef">2. </a><a href="#name-computed-literals" class="section-name selfRef">Computed Literals</a>
1429 </h2>
1430 <p id="section-2-1">CDDL as defined in <span>[<a href="#RFC8610" class="xref">RFC8610</a>]</span> does not have any mechanisms to compute
1431 literals. To cover a large part of the use cases, this specification adds three control
1432 operators: <code>.plus</code> for numeric addition, <code>.cat</code> for string
1433 concatenation, and <code>.det</code> for string concatenation with dedenting of
1434 both sides (target and controller).<a href="#section-2-1" class="pilcrow">¶</a></p>
1435 <p id="section-2-2">For these operators, as with all control operators, targets and
1436 controllers are types. The resulting type is therefore formally a
1437 function of the elements of the cross-product of the two types.
1438 Not all tools may be able to work with non-unique targets or
1439 controllers.<a href="#section-2-2" class="pilcrow">¶</a></p>
1440 <div id="numeric-addition">
1441 <section id="section-2.1">
1442 <h3 id="name-numeric-addition">
1443 <a href="#section-2.1" class="section-number selfRef">2.1. </a><a href="#name-numeric-addition" class="section-name selfRef">Numeric Addition</a>
1444 </h3>
1445 <p id="section-2.1-1">In many cases, numbers are needed relative to a
1446 base number in a specification. The <code>.plus</code> control identifies a number that is
1447 constructed by adding the numeric values of the target and the
1448 controller.<a href="#section-2.1-1" class="pilcrow">¶</a></p>
1449 <p id="section-2.1-2">The target and controller both <span class="bcp14">MUST</span> be numeric.
1450 If the target is a floating point number and the controller an integer
1451 number, or vice versa, the sum is converted into the type of the
1452 target; converting from a floating point number to an integer selects
1453 its floor (the largest integer less than or equal to the floating
1454 point number, i.e., rounding towards negative infinity).<a href="#section-2.1-2" class="pilcrow">¶</a></p>
1455 <span id="name-an-example-of-addition-to-a"></span><div id="exa-plus">
1456 <figure id="figure-1">
1457 <div id="section-2.1-3.1">
1458 <pre class="lang-cddl sourcecode">
1459 interval&lt;BASE&gt; = (
1460 BASE =&gt; int ; lower bound
1461 (BASE .plus 1) =&gt; int ; upper bound
1462 ? (BASE .plus 2) =&gt; int ; tolerance
1463 )
1464
1465 X = 0
1466 Y = 3
1467 rect = {
1468 interval&lt;X&gt;
1469 interval&lt;Y&gt;
1470 }
1471 </pre>
1472 </div>
1473 <figcaption><a href="#figure-1" class="selfRef">Figure 1</a>:
1474 <a href="#name-an-example-of-addition-to-a" class="selfRef">An Example of Addition to a Base Value</a>
1475 </figcaption></figure>
1476 </div>
1477 <p id="section-2.1-4">The example in <a href="#exa-plus" class="xref">Figure 1</a> contains the generic definition of a CDDL
1478 group <code>interval</code> that gives a lower and upper bound and, optionally,
1479 a tolerance.
1480 The parameter BASE allows the non-conflicting use of a multiple of these
1481 interval groups in one map by assigning different labels to the
1482 entries of the interval.
1483 The rule <code>rect</code> combines two of these interval groups into a map, one group for
1484 the X dimension (using 0, 1, and 2 as labels) and one for the Y dimension
1485 (using 3, 4, and 5 as labels).<a href="#section-2.1-4" class="pilcrow">¶</a></p>
1486 </section>
1487 </div>
1488 <div id="string-concatenation">
1489 <section id="section-2.2">
1490 <h3 id="name-string-concatenation">
1491 <a href="#section-2.2" class="section-number selfRef">2.2. </a><a href="#name-string-concatenation" class="section-name selfRef">String Concatenation</a>
1492 </h3>
1493 <p id="section-2.2-1">It is often useful to be able to compose string literals out of
1494 component literals defined in different places in the specification.<a href="#section-2.2-1" class="pilcrow">¶</a></p>
1495 <p id="section-2.2-2">The <code>.cat</code> control identifies a string that is built from a
1496 concatenation of the target and the controller.
1497 The target and controller both <span class="bcp14">MUST</span> be strings.
1498 The result of the operation has the same type as the target.
1499 The concatenation is performed on the bytes in both strings.
1500 If the target is a text string, the result of that concatenation <span class="bcp14">MUST</span>
1501 be valid UTF-8.<a href="#section-2.2-2" class="pilcrow">¶</a></p>
1502 <span id="name-an-example-of-concatenation"></span><div id="exa-cat">
1503 <figure id="figure-2">
1504 <div id="section-2.2-3.1">
1505 <pre class="lang-cddl sourcecode">
1506 c = "foo" .cat '
1507 bar
1508 baz
1509 '
1510 ; on a system where the newline is \n, is the same string as:
1511 b = "foo\n bar\n baz\n"
1512 </pre>
1513 </div>
1514 <figcaption><a href="#figure-2" class="selfRef">Figure 2</a>:
1515 <a href="#name-an-example-of-concatenation" class="selfRef">An Example of Concatenation of Text and Byte Strings</a>
1516 </figcaption></figure>
1517 </div>
1518 <p id="section-2.2-4">The example in <a href="#exa-cat" class="xref">Figure 2</a>
1519 builds a text string named <code>c</code> from concatenating the target text string <code>"foo"</code>
1520 and the controller byte string entered in a text form byte string literal.
1521 (This particular idiom is useful when the text string contains
1522 newlines, which, as shown in the example for <code>b</code>, may be harder to
1523 read when entered in the format that the pure CDDL text string
1524 notation inherits from JSON.)<a href="#section-2.2-4" class="pilcrow">¶</a></p>
1525 </section>
1526 </div>
1527 <div id="string-concatenation-with-dedenting">
1528 <section id="section-2.3">
1529 <h3 id="name-string-concatenation-with-d">
1530 <a href="#section-2.3" class="section-number selfRef">2.3. </a><a href="#name-string-concatenation-with-d" class="section-name selfRef">String Concatenation with Dedenting</a>
1531 </h3>
1532 <p id="section-2.3-1">Multi-line string literals for various applications, including
1533 embedded ABNF (<a href="#embedded-abnf" class="xref">Section 3</a>), need to be set flush left, at least
1534 partially.
1535 Often, having some indentation in the source code for the literal can
1536 promote readability, as in <a href="#exa-det" class="xref">Figure 3</a>.<a href="#section-2.3-1" class="pilcrow">¶</a></p>
1537 <span id="name-an-example-of-dedenting-con"></span><div id="exa-det">
1538 <figure id="figure-3">
1539 <div id="section-2.3-2.1">
1540 <pre class="lang-cddl sourcecode">
1541 oid = bytes .abnfb ("oid" .det cbor-tags-oid)
1542 roid = bytes .abnfb ("roid" .det cbor-tags-oid)
1543
1544 cbor-tags-oid = '
1545 oid = 1*arc
1546 roid = *arc
1547 arc = [nlsb] %x00-7f
1548 nlsb = %x81-ff *%x80-ff
1549 '
1550 </pre>
1551 </div>
1552 <figcaption><a href="#figure-3" class="selfRef">Figure 3</a>:
1553 <a href="#name-an-example-of-dedenting-con" class="selfRef">An Example of Dedenting Concatenation</a>
1554 </figcaption></figure>
1555 </div>
1556 <p id="section-2.3-3">The control operator <code>.det</code> works like <code>.cat</code>, except that both
1557 arguments (target and controller) are independently <em>dedented</em> before
1558 the concatenation takes place.<a href="#section-2.3-3" class="pilcrow">¶</a></p>
1559 <p id="section-2.3-4">For the first rule in <a href="#exa-det" class="xref">Figure 3</a>, the result is
1560 equivalent to <a href="#exa-det-result" class="xref">Figure 4</a>.<a href="#section-2.3-4" class="pilcrow">¶</a></p>
1561 <span id="name-dedenting-example-result-of"></span><div id="exa-det-result">
1562 <figure id="figure-4">
1563 <div id="section-2.3-5.1">
1564 <pre class="lang-cddl sourcecode">
1565 oid = bytes .abnfb 'oid
1566 oid = 1*arc
1567 roid = *arc
1568 arc = [nlsb] %x00-7f
1569 nlsb = %x81-ff *%x80-ff
1570 '
1571 </pre>
1572 </div>
1573 <figcaption><a href="#figure-4" class="selfRef">Figure 4</a>:
1574 <a href="#name-dedenting-example-result-of" class="selfRef">Dedenting Example: Result of First .det</a>
1575 </figcaption></figure>
1576 </div>
1577 <p id="section-2.3-6">For the purposes of this specification, we define "dedenting" as:<a href="#section-2.3-6" class="pilcrow">¶</a></p>
1578 <ol start="1" type="1" class="normal type-1" id="section-2.3-7">
1579 <li id="section-2.3-7.1">determining the smallest amount of leftmost blank space (number of
1580 leading space characters) present in all the non-blank lines, and<a href="#section-2.3-7.1" class="pilcrow">¶</a>
1581 </li>
1582 <li id="section-2.3-7.2">removing exactly that number of leading space characters from each
1583 line. For blank (blank space only or empty) lines, there may be
1584 fewer (or no) leading space characters than this amount, in which
1585 case all leading space is removed.<a href="#section-2.3-7.2" class="pilcrow">¶</a>
1586 </li>
1587 </ol>
1588 <p id="section-2.3-8">(The name <code>.det</code> is a shortcut for "dedenting cat".
1589 The maybe more obvious name <code>.dedcat</code> has not been chosen
1590 as it is longer and may invoke unpleasant images.)<a href="#section-2.3-8" class="pilcrow">¶</a></p>
1591 <p id="section-2.3-9">Occasionally, dedenting of only a single item is needed.
1592 This can be achieved by using this operator with an empty string,
1593 e.g., <code>"" .det rhs</code> or <code>lhs .det ""</code>, which can in turn be combined
1594 with a <code>.cat</code>: in the construct <code>lhs .cat ("" .det rhs)</code>, only <code>rhs</code>
1595 is dedented.<a href="#section-2.3-9" class="pilcrow">¶</a></p>
1596 </section>
1597 </div>
1598 </section>
1599 </div>
1600 <div id="embedded-abnf">
1601 <section id="section-3">
1602 <h2 id="name-embedded-abnf">
1603 <a href="#section-3" class="section-number selfRef">3. </a><a href="#name-embedded-abnf" class="section-name selfRef">Embedded ABNF</a>
1604 </h2>
1605 <p id="section-3-1">Many IETF protocols define allowable values for their text strings in
1606 ABNF <span>[<a href="#RFC5234" class="xref">RFC5234</a>]</span> <span>[<a href="#RFC7405" class="xref">RFC7405</a>]</span>.
1607 It is often desirable to define a text string type in CDDL by
1608 employing existing ABNF embedded into the CDDL specification.
1609 Without specific ABNF support in CDDL, that ABNF would usually need to
1610 be translated into a regular expression (if that is even possible).<a href="#section-3-1" class="pilcrow">¶</a></p>
1611 <p id="section-3-2">ABNF is added to CDDL in the same way that regular
1612 expressions were added: by defining a <code>.abnf</code> control operator.
1613 The target is usually <code>text</code> or some restriction on it, and the controller
1614 is the text of an ABNF specification.<a href="#section-3-2" class="pilcrow">¶</a></p>
1615 <p id="section-3-3">There are several small issues; the solutions are given here:<a href="#section-3-3" class="pilcrow">¶</a></p>
1616 <ul class="normal">
1617 <li class="normal" id="section-3-4.1">ABNF can be used to define byte sequences as well as UTF-8 text
1618 strings interpreted as Unicode scalar sequences. This means this
1619 specification defines two control operators: <code>.abnfb</code> for ABNF
1620 denoting byte sequences and <code>.abnf</code> for denoting sequences of
1621 Unicode scalar values (code points) represented as UTF-8 text strings.
1622
1623 Both control operators can be applied to targets of either string
1624 type; the ABNF is applied to the sequence of bytes in the string
1625 and interprets it as a sequence of bytes (<code>.abnfb</code>) or as a sequence
1626 of code points represented as an UTF-8 text string (<code>.abnf</code>).
1627 The controller string <span class="bcp14">MUST</span> be a string. When a byte string, it <span class="bcp14">MUST</span> be valid UTF-8 and is interpreted as the text string that has the same sequence of bytes.<a href="#section-3-4.1" class="pilcrow">¶</a>
1628 </li>
1629 <li class="normal" id="section-3-4.2">ABNF defines a list of rules, not a single expression (called
1630 "elements" in <span>[<a href="#RFC5234" class="xref">RFC5234</a>]</span>). This is resolved by requiring the
1631 controller string to be one valid "element", followed by zero or
1632 more valid "rules" separated from the element by a newline; thus, the
1633 controller string can be built by preceding a piece
1634 of valid ABNF by an "element" that selects from that ABNF and a newline.<a href="#section-3-4.2" class="pilcrow">¶</a>
1635 </li>
1636 <li class="normal" id="section-3-4.3">For the same reason, ABNF requires newlines; specifying newlines in
1637 CDDL text strings is tedious (and leads to essentially unreadable
1638 ABNF). The workaround employs the <code>.cat</code> operator introduced in
1639 <a href="#string-concatenation" class="xref">Section 2.2</a> and the syntax for text in byte strings.
1640 As is customary for ABNF, the syntax of ABNF itself (<em>not</em> the syntax
1641 expressed in ABNF!) is relaxed to allow a single line feed as a
1642 newline:<a href="#section-3-4.3" class="pilcrow">¶</a>
1643 </li>
1644 </ul>
1645 <div id="section-3-5">
1646 <pre class="lang-abnf sourcecode">
1647 CRLF = %x0A / %x0D.0A
1648 </pre><a href="#section-3-5" class="pilcrow">¶</a>
1649 </div>
1650 <ul class="normal">
1651 <li class="normal" id="section-3-6.1">One set of rules provided in an ABNF specification is often used in
1652 multiple positions, particularly staples such as DIGIT and ALPHA.
1653 (Note that all rules referenced need to be defined in each ABNF
1654 operator controller string --
1655 there is no implicit import of core ABNF rules from <span>[<a href="#RFC5234" class="xref">RFC5234</a>]</span> or other rules.)
1656 The composition this calls for can be provided by the <code>.cat</code>
1657 operator and/or by <code>.det</code> if there is indentation to be disposed of.<a href="#section-3-6.1" class="pilcrow">¶</a>
1658 </li>
1659 </ul>
1660 <p id="section-3-7">These points are combined into an example in <a href="#exa-abnf" class="xref">Figure 5</a>, which uses
1661 ABNF from <span>[<a href="#RFC3339" class="xref">RFC3339</a>]</span> to specify one of each of the Concise Binary Object Representation (CBOR) tags defined in
1662 <span>[<a href="#RFC8943" class="xref">RFC8943</a>]</span> and <span>[<a href="#RFC8949" class="xref">RFC8949</a>]</span>.<a href="#section-3-7" class="pilcrow">¶</a></p>
1663 <span id="name-an-example-of-employing-abn"></span><div id="exa-abnf">
1664 <figure id="figure-5">
1665 <div id="section-3-8.1">
1666 <pre class="lang-cddl sourcecode">
1667 ; for RFC 8943
1668 Tag1004 = #6.1004(text .abnf full-date)
1669 ; for RFC 8949
1670 Tag0 = #6.0(text .abnf date-time)
1671
1672 full-date = "full-date" .cat rfc3339
1673 date-time = "date-time" .cat rfc3339
1674
1675 ; Note the trick of idiomatically starting with a newline, separating
1676 ; off the element in the concatenations above from the rule-list
1677 rfc3339 = '
1678 date-fullyear = 4DIGIT
1679 date-month = 2DIGIT ; 01-12
1680 date-mday = 2DIGIT ; 01-28, 01-29, 01-30, 01-31 based on
1681 ; month/year
1682 time-hour = 2DIGIT ; 00-23
1683 time-minute = 2DIGIT ; 00-59
1684 time-second = 2DIGIT ; 00-58, 00-59, 00-60 based on leap sec
1685 ; rules
1686 time-secfrac = "." 1*DIGIT
1687 time-numoffset = ("+" / "-") time-hour ":" time-minute
1688 time-offset = "Z" / time-numoffset
1689
1690 partial-time = time-hour ":" time-minute ":" time-second
1691 [time-secfrac]
1692 full-date = date-fullyear "-" date-month "-" date-mday
1693 full-time = partial-time time-offset
1694
1695 date-time = full-date "T" full-time
1696 ' .det rfc5234-core
1697
1698 rfc5234-core = '
1699 DIGIT = %x30-39 ; 0-9
1700 ; abbreviated here
1701 '
1702 </pre>
1703 </div>
1704 <figcaption><a href="#figure-5" class="selfRef">Figure 5</a>:
1705 <a href="#name-an-example-of-employing-abn" class="selfRef">An Example of Employing ABNF from RFC 3339 for Defining CBOR Tags</a>
1706 </figcaption></figure>
1707 </div>
1708 </section>
1709 </div>
1710 <div id="features">
1711 <section id="section-4">
1712 <h2 id="name-features">
1713 <a href="#section-4" class="section-number selfRef">4. </a><a href="#name-features" class="section-name selfRef">Features</a>
1714 </h2>
1715 <p id="section-4-1">Commonly, the kind of validation enabled by languages such as
1716 CDDL provides a Boolean result: valid or invalid.<a href="#section-4-1" class="pilcrow">¶</a></p>
1717 <p id="section-4-2">In rapidly evolving environments, this is too simplistic. The data
1718 models described by a CDDL specification may continually be enhanced
1719 by additional features, and it would be useful even for a
1720 specification that does not yet describe a specific future feature to
1721 identify the extension point the feature can use and accept such
1722 extensions while marking them as extensions.<a href="#section-4-2" class="pilcrow">¶</a></p>
1723 <p id="section-4-3">The <code>.feature</code> control annotates the target as making use of the
1724 feature named by the controller. The latter will usually be a string.
1725 A tool that validates an instance against that specification may mark
1726 the instance as using a feature that is annotated by the
1727 specification.<a href="#section-4-3" class="pilcrow">¶</a></p>
1728 <p id="section-4-4">More specifically, the tool's diagnostic output might contain
1729 the controller (right-hand side) as a feature name and the target
1730 (left-hand side) as a feature detail. However, in some cases, the target has
1731 too much detail, and the specification might want to hint to the tool
1732 that more limited detail is appropriate. In this case, the controller
1733 should be an array, with the first element being the feature name
1734 (that would otherwise be the entire controller) and the second
1735 element being the detail (usually another string), as illustrated in
1736 <a href="#exa-feat-array" class="xref">Figure 6</a>.<a href="#section-4-4" class="pilcrow">¶</a></p>
1737 <span id="name-providing-explicit-detail-w"></span><div id="exa-feat-array">
1738 <figure id="figure-6">
1739 <div id="section-4-5.1">
1740 <pre class="lang-cddl sourcecode">
1741 foo = {
1742 kind: bar / baz .feature (["foo-extensions", "bazify"])
1743 }
1744 bar = ...
1745 baz = ... ; complex stuff that doesn't all need to be in the detail
1746 </pre>
1747 </div>
1748 <figcaption><a href="#figure-6" class="selfRef">Figure 6</a>:
1749 <a href="#name-providing-explicit-detail-w" class="selfRef">Providing Explicit Detail with .feature</a>
1750 </figcaption></figure>
1751 </div>
1752 <p id="section-4-6"><a href="#exa-feat-map" class="xref">Figure 7</a> shows what could be the definition of a person, with
1753 potential extensions beyond <code>name</code> and <code>organization</code> being marked
1754 <code>further-person-extension</code>.
1755 Extensions that are known at the time this definition is written can be
1756 collected into <code>$$person-extensions</code>. However, future extensions
1757 would be deemed invalid unless the wildcard at the end of the map is
1758 added.
1759 These extensions could then be specifically examined by a user or a
1760 tool that makes use of the validation result; the label (map key)
1761 actually used makes a fine feature detail for the tool's diagnostic
1762 output.<a href="#section-4-6" class="pilcrow">¶</a></p>
1763 <p id="section-4-7">Leaving out the entire extension point would mean that instances that
1764 make use of an extension would be marked as wholesale invalid, making
1765 the entire validation approach much less useful.
1766 Leaving the extension point in but not marking its use as special
1767 would render mistakes (such as using the label "<code>organisation</code>" instead of
1768 "<code>organization</code>") invisible.<a href="#section-4-7" class="pilcrow">¶</a></p>
1769 <span id="name-map-extensibility-with-feat"></span><div id="exa-feat-map">
1770 <figure id="figure-7">
1771 <div id="section-4-8.1">
1772 <pre class="lang-cddl sourcecode">
1773 person = {
1774 ? name: text
1775 ? organization: text
1776 $$person-extensions
1777 * (text .feature "further-person-extension") =&gt; any
1778 }
1779
1780 $$person-extensions //= (? bloodgroup: text)
1781 </pre>
1782 </div>
1783 <figcaption><a href="#figure-7" class="selfRef">Figure 7</a>:
1784 <a href="#name-map-extensibility-with-feat" class="selfRef">Map Extensibility with .feature</a>
1785 </figcaption></figure>
1786 </div>
1787 <p id="section-4-9"><a href="#exa-feat-type" class="xref">Figure 8</a> shows another example where <code>.feature</code> provides for
1788 type extensibility.<a href="#section-4-9" class="pilcrow">¶</a></p>
1789 <span id="name-type-extensibility-with-fea"></span><div id="exa-feat-type">
1790 <figure id="figure-8">
1791 <div id="section-4-10.1">
1792 <pre class="lang-cddl sourcecode">
1793 allowed-types = number / text / bool / null
1794 / [* number] / [* text] / [* bool]
1795 / (any .feature "allowed-type-extension")
1796 </pre>
1797 </div>
1798 <figcaption><a href="#figure-8" class="selfRef">Figure 8</a>:
1799 <a href="#name-type-extensibility-with-fea" class="selfRef">Type Extensibility with .feature</a>
1800 </figcaption></figure>
1801 </div>
1802 <p id="section-4-11">A CDDL tool may simply report the set of features being used; the
1803 control then only provides information to the process requesting the
1804 validation.
1805 One could also imagine a tool that takes arguments, allowing the tool to accept
1806 certain features and reject others (enable/disable). The latter approach
1807 could, for instance, be used for a JSON/CBOR switch, as illustrated in
1808 <a href="#exa-feat-variants" class="xref">Figure 9</a>, using Sensor Measurement Lists (SenML) <span>[<a href="#RFC8428" class="xref">RFC8428</a>]</span> as the example data model
1809 used with both JSON and CBOR.<a href="#section-4-11" class="pilcrow">¶</a></p>
1810 <span id="name-describing-variants-with-fe"></span><div id="exa-feat-variants">
1811 <figure id="figure-9">
1812 <div id="section-4-12.1">
1813 <pre class="lang-cddl sourcecode">
1814 SenML-Record = {
1815 ; ...
1816 ? v =&gt; number
1817 ; ...
1818 }
1819 v = JC&lt;"v", 2&gt;
1820 JC&lt;J,C&gt; = J .feature "json" / C .feature "cbor"
1821 </pre>
1822 </div>
1823 <figcaption><a href="#figure-9" class="selfRef">Figure 9</a>:
1824 <a href="#name-describing-variants-with-fe" class="selfRef">Describing Variants with .feature</a>
1825 </figcaption></figure>
1826 </div>
1827 <p id="section-4-13">It remains to be seen if the enable/disable approach can lead to new
1828 idioms of using CDDL. The language currently has no way to enforce
1829 mutually exclusive use of features, as would be needed in this example.<a href="#section-4-13" class="pilcrow">¶</a></p>
1830 </section>
1831 </div>
1832 <div id="iana-considerations">
1833 <section id="section-5">
1834 <h2 id="name-iana-considerations">
1835 <a href="#section-5" class="section-number selfRef">5. </a><a href="#name-iana-considerations" class="section-name selfRef">IANA Considerations</a>
1836 </h2>
1837 <p id="section-5-1">IANA has registered the contents of
1838 <a href="#tbl-iana-reqs" class="xref">Table 2</a> into the "CDDL Control Operators" registry of <span>[<a href="#IANA.cddl" class="xref">IANA.cddl</a>]</span>:<a href="#section-5-1" class="pilcrow">¶</a></p>
1839 <span id="name-new-control-operators"></span><div id="tbl-iana-reqs">
1840 <table class="center" id="table-2">
1841 <caption>
1842 <a href="#table-2" class="selfRef">Table 2</a>:
1843 <a href="#name-new-control-operators" class="selfRef">New Control Operators</a>
1844 </caption>
1845 <thead>
1846 <tr>
1847 <th class="text-left" rowspan="1" colspan="1">Name</th>
1848 <th class="text-left" rowspan="1" colspan="1">Reference</th>
1849 </tr>
1850 </thead>
1851 <tbody>
1852 <tr>
1853 <td class="text-left" rowspan="1" colspan="1">.plus</td>
1854 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1855 </tr>
1856 <tr>
1857 <td class="text-left" rowspan="1" colspan="1">.cat</td>
1858 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1859 </tr>
1860 <tr>
1861 <td class="text-left" rowspan="1" colspan="1">.det</td>
1862 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1863 </tr>
1864 <tr>
1865 <td class="text-left" rowspan="1" colspan="1">.abnf</td>
1866 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1867 </tr>
1868 <tr>
1869 <td class="text-left" rowspan="1" colspan="1">.abnfb</td>
1870 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1871 </tr>
1872 <tr>
1873 <td class="text-left" rowspan="1" colspan="1">.feature</td>
1874 <td class="text-left" rowspan="1" colspan="1">RFC 9165</td>
1875 </tr>
1876 </tbody>
1877 </table>
1878 </div>
1879 </section>
1880 </div>
1881 <div id="security-considerations">
1882 <section id="section-6">
1883 <h2 id="name-security-considerations">
1884 <a href="#section-6" class="section-number selfRef">6. </a><a href="#name-security-considerations" class="section-name selfRef">Security Considerations</a>
1885 </h2>
1886 <p id="section-6-1">The security considerations of <span>[<a href="#RFC8610" class="xref">RFC8610</a>]</span> apply.<a href="#section-6-1" class="pilcrow">¶</a></p>
1887 <p id="section-6-2">While both <span>[<a href="#RFC5234" class="xref">RFC5234</a>]</span> and <span>[<a href="#RFC7405" class="xref">RFC7405</a>]</span> state that security is truly
1888 believed to be irrelevant to the respective document, the use of
1889 formal description techniques cannot only simplify but sometimes also
1890 complicate a specification.
1891 This can lead to security problems in implementations and in the
1892 specification itself.
1893 As with CDDL itself, ABNF should be judiciously applied, and overly
1894 complex (or "cute") constructions should be avoided.<a href="#section-6-2" class="pilcrow">¶</a></p>
1895 </section>
1896 </div>
1897 <section id="section-7">
1898 <h2 id="name-references">
1899 <a href="#section-7" class="section-number selfRef">7. </a><a href="#name-references" class="section-name selfRef">References</a>
1900 </h2>
1901 <section id="section-7.1">
1902 <h3 id="name-normative-references">
1903 <a href="#section-7.1" class="section-number selfRef">7.1. </a><a href="#name-normative-references" class="section-name selfRef">Normative References</a>
1904 </h3>
1905 <dl class="references">
1906 <dt id="IANA.cddl">[IANA.cddl]</dt>
1907 <dd>
1908 <span class="refAuthor">IANA</span>, <span class="refTitle">"Concise Data Definition Language (CDDL)"</span>, <span>&lt;<a href="https://www.iana.org/assignments/cddl">https://www.iana.org/assignments/cddl</a>&gt;</span>. </dd>
1909 <dd class="break"></dd>
1910 <dt id="RFC2119">[RFC2119]</dt>
1911 <dd>
1912 <span class="refAuthor">Bradner, S.</span>, <span class="refTitle">"Key words for use in RFCs to Indicate Requirement Levels"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 2119</span>, <span class="seriesInfo">DOI 10.17487/RFC2119</span>, <time datetime="1997-03" class="refDate">March 1997</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc2119">https://www.rfc-editor.org/info/rfc2119</a>&gt;</span>. </dd>
1913 <dd class="break"></dd>
1914 <dt id="RFC5234">[RFC5234]</dt>
1915 <dd>
1916 <span class="refAuthor">Crocker, D., Ed.</span> and <span class="refAuthor">P. Overell</span>, <span class="refTitle">"Augmented BNF for Syntax Specifications: ABNF"</span>, <span class="seriesInfo">STD 68</span>, <span class="seriesInfo">RFC 5234</span>, <span class="seriesInfo">DOI 10.17487/RFC5234</span>, <time datetime="2008-01" class="refDate">January 2008</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc5234">https://www.rfc-editor.org/info/rfc5234</a>&gt;</span>. </dd>
1917 <dd class="break"></dd>
1918 <dt id="RFC7405">[RFC7405]</dt>
1919 <dd>
1920 <span class="refAuthor">Kyzivat, P.</span>, <span class="refTitle">"Case-Sensitive String Support in ABNF"</span>, <span class="seriesInfo">RFC 7405</span>, <span class="seriesInfo">DOI 10.17487/RFC7405</span>, <time datetime="2014-12" class="refDate">December 2014</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc7405">https://www.rfc-editor.org/info/rfc7405</a>&gt;</span>. </dd>
1921 <dd class="break"></dd>
1922 <dt id="RFC8174">[RFC8174]</dt>
1923 <dd>
1924 <span class="refAuthor">Leiba, B.</span>, <span class="refTitle">"Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words"</span>, <span class="seriesInfo">BCP 14</span>, <span class="seriesInfo">RFC 8174</span>, <span class="seriesInfo">DOI 10.17487/RFC8174</span>, <time datetime="2017-05" class="refDate">May 2017</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8174">https://www.rfc-editor.org/info/rfc8174</a>&gt;</span>. </dd>
1925 <dd class="break"></dd>
1926 <dt id="RFC8610">[RFC8610]</dt>
1927 <dd>
1928 <span class="refAuthor">Birkholz, H.</span>, <span class="refAuthor">Vigano, C.</span>, and <span class="refAuthor">C. Bormann</span>, <span class="refTitle">"Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures"</span>, <span class="seriesInfo">RFC 8610</span>, <span class="seriesInfo">DOI 10.17487/RFC8610</span>, <time datetime="2019-06" class="refDate">June 2019</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8610">https://www.rfc-editor.org/info/rfc8610</a>&gt;</span>. </dd>
1929 <dd class="break"></dd>
1930 </dl>
1931 </section>
1932 <section id="section-7.2">
1933 <h3 id="name-informative-references">
1934 <a href="#section-7.2" class="section-number selfRef">7.2. </a><a href="#name-informative-references" class="section-name selfRef">Informative References</a>
1935 </h3>
1936 <dl class="references">
1937 <dt id="RFC3339">[RFC3339]</dt>
1938 <dd>
1939 <span class="refAuthor">Klyne, G.</span> and <span class="refAuthor">C. Newman</span>, <span class="refTitle">"Date and Time on the Internet: Timestamps"</span>, <span class="seriesInfo">RFC 3339</span>, <span class="seriesInfo">DOI 10.17487/RFC3339</span>, <time datetime="2002-07" class="refDate">July 2002</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc3339">https://www.rfc-editor.org/info/rfc3339</a>&gt;</span>. </dd>
1940 <dd class="break"></dd>
1941 <dt id="RFC8428">[RFC8428]</dt>
1942 <dd>
1943 <span class="refAuthor">Jennings, C.</span>, <span class="refAuthor">Shelby, Z.</span>, <span class="refAuthor">Arkko, J.</span>, <span class="refAuthor">Keranen, A.</span>, and <span class="refAuthor">C. Bormann</span>, <span class="refTitle">"Sensor Measurement Lists (SenML)"</span>, <span class="seriesInfo">RFC 8428</span>, <span class="seriesInfo">DOI 10.17487/RFC8428</span>, <time datetime="2018-08" class="refDate">August 2018</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8428">https://www.rfc-editor.org/info/rfc8428</a>&gt;</span>. </dd>
1944 <dd class="break"></dd>
1945 <dt id="RFC8943">[RFC8943]</dt>
1946 <dd>
1947 <span class="refAuthor">Jones, M.</span>, <span class="refAuthor">Nadalin, A.</span>, and <span class="refAuthor">J. Richter</span>, <span class="refTitle">"Concise Binary Object Representation (CBOR) Tags for Date"</span>, <span class="seriesInfo">RFC 8943</span>, <span class="seriesInfo">DOI 10.17487/RFC8943</span>, <time datetime="2020-11" class="refDate">November 2020</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8943">https://www.rfc-editor.org/info/rfc8943</a>&gt;</span>. </dd>
1948 <dd class="break"></dd>
1949 <dt id="RFC8949">[RFC8949]</dt>
1950 <dd>
1951 <span class="refAuthor">Bormann, C.</span> and <span class="refAuthor">P. Hoffman</span>, <span class="refTitle">"Concise Binary Object Representation (CBOR)"</span>, <span class="seriesInfo">STD 94</span>, <span class="seriesInfo">RFC 8949</span>, <span class="seriesInfo">DOI 10.17487/RFC8949</span>, <time datetime="2020-12" class="refDate">December 2020</time>, <span>&lt;<a href="https://www.rfc-editor.org/info/rfc8949">https://www.rfc-editor.org/info/rfc8949</a>&gt;</span>. </dd>
1952 <dd class="break"></dd>
1953 </dl>
1954 </section>
1955 </section>
1956 <div id="acknowledgements">
1957 <section id="appendix-A">
1958 <h2 id="name-acknowledgements">
1959 <a href="#name-acknowledgements" class="section-name selfRef">Acknowledgements</a>
1960 </h2>
1961 <p id="appendix-A-1"><span class="contact-name">Jim Schaad</span> suggested several improvements.
1962 The <code>.feature</code> feature was developed out of a discussion with <span class="contact-name">Henk Birkholz</span>.
1963 <span class="contact-name">Paul Kyzivat</span> helped isolate the need for <code>.det</code>.<a href="#appendix-A-1" class="pilcrow">¶</a></p>
1964 <p id="appendix-A-2">.det is an abbreviation for "dedenting cat", but Det is also the name
1965 of a German TV cartoon character created in the 1960s.<a href="#appendix-A-2" class="pilcrow">¶</a></p>
1966 </section>
1967 </div>
1968 <div id="authors-addresses">
1969 <section id="appendix-B">
1970 <h2 id="name-authors-address">
1971 <a href="#name-authors-address" class="section-name selfRef">Author's Address</a>
1972 </h2>
1973 <address class="vcard">
1974 <div dir="auto" class="left"><span class="fn nameRole">Carsten Bormann</span></div>
1975 <div dir="auto" class="left"><span class="org">Universität Bremen TZI</span></div>
1976 <div dir="auto" class="left"><span class="street-address">Postfach 330440</span></div>
1977 <div dir="auto" class="left">
1978 <span class="postal-code">D-28359</span> <span class="locality">Bremen</span>
1979 </div>
1980 <div dir="auto" class="left"><span class="country-name">Germany</span></div>
1981 <div class="tel">
1982 <span>Phone:</span>
1983 <a href="tel:+49-421-218-63921" class="tel">+49-421-218-63921</a>
1984 </div>
1985 <div class="email">
1986 <span>Email:</span>
1987 <a href="mailto:[email protected]" class="email">[email protected]</a>
1988 </div>
1989 </address>
1990 </section>
1991 </div>
1992 <script>const toc = document.getElementById("toc");
1993 toc.querySelector("h2").addEventListener("click", e => {
1994 toc.classList.toggle("active");
1995 });
1996 toc.querySelector("nav").addEventListener("click", e => {
1997 toc.classList.remove("active");
1998 });
1999 </script>
2000 </body>
2001 </html>