<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.6 (Ruby 3.2.2) -->
<?rfc compact="yes"?>
<?rfc comments="yes"?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-ietf-cbor-cddl-more-control-02" category="std" consensus="true" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.20.0 -->
  <front>
    <title abbrev="CDDL control operators">More Control Operators for CDDL</title>
    <seriesInfo name="Internet-Draft" value="draft-ietf-cbor-cddl-more-control-02"/>
    <author initials="C." surname="Bormann" fullname="Carsten Bormann">
      <organization>Universität Bremen TZI</organization>
      <address>
        <postal>
          <street>Postfach 330440</street>
          <city>Bremen</city>
          <code>D-28359</code>
          <country>Germany</country>
        </postal>
        <phone>+49-421-218-63921</phone>
        <email>cabo@tzi.org</email>
      </address>
    </author>
    <date year="2024" month="February" day="22"/>
    <keyword>Concise Data Definition Language</keyword>
    <keyword>Control Operator</keyword>
    <abstract>
      <?line 64?>

<t>The Concise Data Definition Language (CDDL), standardized in RFC 8610,
provides "control operators" as its main language extension point.
RFCs have added to this extension point both in an
application-specific and a more general way.</t>
      <t>The present document defines a number of additional generally
applicable control operators for text conversion (Bytes, Integers,
JSON, Printf-style formatting), operations on text, and deterministic encoding.</t>
      <!--
[^status]

[^status]:  Revision –00 of this WG draft ...
 -->



    </abstract>
    <note removeInRFC="true">
      <name>About This Document</name>
      <t>
        The latest revision of this draft can be found at <eref target="https://cbor-wg.github.io/cddl-more-control/"/>.
        Status information for this document may be found at <eref target="https://datatracker.ietf.org/doc/draft-ietf-cbor-cddl-more-control/"/>.
      </t>
      <t>
        Discussion of this document takes place on the
        Concise Binary Object Representation (CBOR) Maintenance and Extensions Working Group mailing list (<eref target="mailto:cbor@ietf.org"/>),
        which is archived at <eref target="https://mailarchive.ietf.org/arch/browse/cbor/"/>.
        Subscribe at <eref target="https://www.ietf.org/mailman/listinfo/cbor/"/>.
      </t>
      <t>Source for this draft and an issue tracker can be found at
        <eref target="https://github.com/cbor-wg/cddl-more-control"/>.</t>
    </note>
  </front>
  <middle>
    <?line 81?>

<section anchor="intro">
      <name>Introduction</name>
      <t>The Concise Data Definition Language (CDDL), standardized in <xref target="RFC8610"/>,
provides "control operators" as its main language extension point
(<xref section="3.8" sectionFormat="of" target="RFC8610"/>).
RFCs have added to this extension point both in an
application-specific <xref target="RFC9090"/> and a more general <xref target="RFC9165"/> way.</t>
      <t>The present document defines a number of additional generally
applicable control operators:</t>
      <table anchor="tbl-new">
        <name>New control operators in this document</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Purpose</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.b64u</tt>, <tt>.b64c</tt></td>
            <td align="left">Base64 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64u-sloppy</tt>, <tt>.b64c-sloppy</tt></td>
            <td align="left">(sloppy-tolerant variants of the above)</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hex</tt>, <tt>.hexlc</tt>, <tt>.hexuc</tt></td>
            <td align="left">Base16 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b32</tt>, <tt>.h32</tt></td>
            <td align="left">Base32 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b45</tt></td>
            <td align="left">Base45 representation of byte strings</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.decimal</tt></td>
            <td align="left">Text representation of integer numbers</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.printf</tt></td>
            <td align="left">Printf-formatted text representation of data items</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.json</tt></td>
            <td align="left">Text representation of JSON values</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.join</tt></td>
            <td align="left">Building text from array of components</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cbordet</tt>, <tt>.cborseqdet</tt></td>
            <td align="left">deterministically encoded CBOR data items, CBOR sequences</td>
          </tr>
        </tbody>
      </table>
      <section anchor="terminology">
        <name>Terminology</name>
        <t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>
        <?line -18?>

<t>Regular expressions mentioned in the text are as defined in <xref target="RFC9485"/>.</t>
        <t>This specification uses terminology from <xref target="RFC8610"/>.
In particular, with respect to control operators, "target" refers to
the left-hand side operand, and "controller" to the right-hand side operand.
"Tool" refers to tools along the lines of that described in <xref section="F" sectionFormat="of" target="RFC8610"/>.
Note also that the data model underlying CDDL provides for text
strings as well as byte strings as two separate types, which are
then collectively referred to as "strings".</t>
      </section>
    </section>
    <section anchor="text-conversion">
      <name>Text Conversion</name>
      <section anchor="byte-strings-base16-hex-base32-base45-base64">
        <name>Byte Strings: Base16 (Hex), Base32, Base45, Base64</name>
        <t>A CDDL model often defines data that are byte strings in essence but
need to be transported in various encoded forms, such as base64 or
hex.
This section defines a number of control operators to model these
conversions.</t>
        <t>The control operators generally are of a form that could be used like
this:</t>
        <sourcecode type="cddl" name="example1.cddl"><![CDATA[
signature-for-json = text .b64u signature
signature = bytes .cbor COSE_Sign1
]]></sourcecode>
        <t>The specification of these control operators is complicated by the
large number of transformations in use.  Inspired by Section <xref target="RFC8949" section="8" sectionFormat="bare"/> of RFC 8949 <xref target="STD94"/>, we use representations defined in <xref target="RFC4648"/> with the following
names:</t>
        <table>
          <name>Control Operators for Text Conversion of byte strings</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.b64u</tt></td>
              <td align="left">Base64URL, no padding</td>
              <td align="left">
                <xref section="5" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64u-sloppy</tt></td>
              <td align="left">Base64URL, no padding, sloppy</td>
              <td align="left">
                <xref section="5" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64c</tt></td>
              <td align="left">Base64 classic, padding</td>
              <td align="left">
                <xref section="4" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b64c-sloppy</tt></td>
              <td align="left">Base64 classic, padding, sloppy</td>
              <td align="left">
                <xref section="4" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b32</tt></td>
              <td align="left">Base32, no padding</td>
              <td align="left">
                <xref section="6" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.h32</tt></td>
              <td align="left">Base32/hex alphabet, no padding</td>
              <td align="left">
                <xref section="7" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hex</tt></td>
              <td align="left">Base16 (hex), either case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hexlc</tt></td>
              <td align="left">Base16 (hex), lower case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.hexuc</tt></td>
              <td align="left">Base16 (hex), upper case</td>
              <td align="left">
                <xref section="8" sectionFormat="of" target="RFC4648"/></td>
            </tr>
            <tr>
              <td align="left">
                <tt>.b45</tt></td>
              <td align="left">Base45</td>
              <td align="left">
                <xref target="RFC9285"/></td>
            </tr>
          </tbody>
        </table>
        <t>Note that this specification is somewhat opinionated here: It does not
provide base64url, base32 or base32hex encoding with padding, or
base64 classic without padding.  Experience indicates that these
combinations only ever occur in error, so the usability of CDDL is
increased by not providing them in the first place.  Also, adding "c"
makes sure that any decision for classic base64 is actively taken.</t>
        <t>The additional designation "sloppy" indicates that the text string is
not validated for any additional bits being zero, in variance to what
is specified in the paragraph behind table 1 in <xref section="4" sectionFormat="of" target="RFC4648"/>.
Note that the present specification is opinionated again in not
specifying a sloppy variant of base32 or base32/hex, as no legacy use
of sloppy base32(/hex) was known at the time of writing.
Base45 is known to be suboptimal for use in environments with limited
data transparency (such as URLs), but is included because of its close
relationship to QR codes and its wide use in health informatics (note
that base45 is at least strongly specified not to allow sloppy forms
of encoding).</t>
      </section>
      <section anchor="numbers">
        <name>Numbers</name>
        <table>
          <name>Control Operator for Text Conversion of Integers</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.decimal</tt></td>
              <td align="left">Decimal Integer</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>The control operator <tt>.decimal</tt> allows the modeling of text strings that carry numeric
information in decimal form, such as in the uint64/int64 formats of
YANG-JSON <xref target="RFC7951"/>.</t>
        <sourcecode type="cddl" name="example2.cddl"><![CDATA[
yang-json-sid = text .decimal (0..9223372036854775807)
]]></sourcecode>
        <t>Again, the specification is opinionated by only providing integer numbers
without leading zeros, i.e., the decimal numbers match the regular
expression <tt>0|-?[1-9][0-9]*</tt> (of course, further restricted by the
control type).
See the next section for more flexibility, and for octal, hexadecimal,
or binary conversions.</t>
      </section>
      <section anchor="printf-style-formatting">
        <name>Printf-style Formatting</name>
        <table>
          <name>Control Operator for Printf-formatting of data item(s)</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.printf</tt></td>
              <td align="left">Printf-formatting of data item(s)</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>The control operator <tt>.printf</tt> allows the modeling of text strings that carry various formatted
information, as long as the format can be represented in Printf-style
formatting strings as they are used in the C language (see Section
7.21.6.1 of <xref target="C"/>).</t>
        <t>The controller (right-hand side) of the <tt>.printf</tt> control is an array
of one Printf-style format string and zero or more data items that fit
the individual conversion specifications in the format string.
The construct matches a text string representing the textual output of
an equivalent C-language <tt>printf</tt> function call that is given the
format string and the data items following it in the array.</t>
        <t>From the printf specification in the C language, length modifiers (paragraph 7)
are not used and <bcp14>MUST NOT</bcp14> be included in the format string.
The 's' conversion specifier (paragraph 8) is used to
interpolate a text string in UTF-8 form.
The 'c' conversion specifier (paragraph 8) represents a single Unicode
scalar value as a UTF-8 character.
The 'p' and 'n' conversion specifiers (paragraph 8) are not used and
<bcp14>MUST NOT</bcp14> be included in the format string.</t>
        <t>In the following example, <tt>my_alg_19</tt> matches the text string <tt>"0x0013"</tt>:</t>
        <sourcecode type="cddl" name="example-printf.cddl"><![CDATA[
my_alg_19 = hexlabel<19>
hexlabel<K> = text .printf (["0x%04x", K])
]]></sourcecode>
        <t>The data items in the controller array do not need to be literals,
as for example in:</t>
        <sourcecode type="cddl" name="example-printf-uint.cddl"><![CDATA[
any_alg = hexlabel<1..20>
hexlabel<K> = text .printf (["0x%04x", K])
]]></sourcecode>
        <t>Here, <tt>any_alg</tt> matches the text strings <tt>"0x0013"</tt> or <tt>"0x0001"</tt> but
not <tt>"0x1234"</tt>.</t>
      </section>
      <section anchor="json-values">
        <name>JSON Values</name>
        <t>Some applications store complete JSON texts into text strings, the
JSON value for which can easily be defined in CDDL.
This is supported by a control operator similar to <tt>.cbor</tt> in <xref section="3.8.4" sectionFormat="of" target="RFC8610"/>.</t>
        <table>
          <name>Control Operator for Text Conversion of JSON values</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.json</tt></td>
              <td align="left">JSON</td>
              <td align="left">
                <xref target="STD90"/></td>
            </tr>
          </tbody>
        </table>
        <sourcecode type="cddl" name="example3.cddl"><![CDATA[
embedded-claims = text .json claims
claims = {iss: issuer, exp: expiry}
]]></sourcecode>
        <t>Note that a <tt>.jsonseq</tt> is not provided, as no use case is known yet.
There is no way to constrain the use of blank space in data items to
be validated; variants (e.g, not providing for any blank space) could
be defined.</t>
      </section>
    </section>
    <section anchor="text-processing">
      <name>Text Processing</name>
      <section anchor="join">
        <name>Join</name>
        <t>Often, text strings need to be constructed out of parts that can best
be modeled as an array.</t>
        <table>
          <name>Control Operator for Text Generation from Arrays</name>
          <thead>
            <tr>
              <th align="left">name</th>
              <th align="left">meaning</th>
              <th align="left">reference</th>
            </tr>
          </thead>
          <tbody>
            <tr>
              <td align="left">
                <tt>.join</tt></td>
              <td align="left">concatenate elements of an array</td>
              <td align="left">---</td>
            </tr>
          </tbody>
        </table>
        <t>In general, this control operator is hard to validate as it would
require full parser functionality.
It is therefore recommended to only use it in simple cases, and leave
full parsing to ABNF (see <xref section="3" sectionFormat="of" target="RFC9165"/>) or similar.</t>
        <sourcecode type="cddl" name="example4.cddl"><![CDATA[
legacy-ip-address = text .join [digits<1>, ".", digits<2>,
                           ".", digits<3>, ".", digits<4>]
digits<N> = text .decimal byte<n>
]]></sourcecode>
      </section>
    </section>
    <section anchor="deterministic-encoding">
      <name>Deterministic Encoding</name>
      <t><xref target="RFC8610"/> and <xref target="RFC8742"/> specify the control operators <tt>.cbor</tt> and
<tt>.cborseq</tt> to indicate that the value of a byte string should be an
encoded CBOR data item or a CBOR sequence.</t>
      <t>This specification provides complementary control operators <tt>.cbordet</tt>
and <tt>.cborseqdet</tt> that indicate that these data items/sequences need
to be encoded in accordance to Sections <xref target="RFC8949" section="4.2.1" sectionFormat="bare"/> and <xref target="RFC8949" section="4.2.2" sectionFormat="bare"/> of RFC 8949 <xref target="STD94"/>.</t>
      <table>
        <name>Control Operator for Deterministically Encoded Data Items and Sequences</name>
        <thead>
          <tr>
            <th align="left">name</th>
            <th align="left">meaning</th>
            <th align="left">reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.cbordet</tt></td>
            <td align="left">deterministically encoded CBOR data item</td>
            <td align="left">
              <xref target="RFC8610"/></td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cborseqdet</tt></td>
            <td align="left">CBOR sequence made from deterministically encoded CBOR data items</td>
            <td align="left">
              <xref target="RFC8742"/></td>
          </tr>
        </tbody>
      </table>
      <t>Note that considerations of deterministic representation at the
application level can often be expressed in the CDDL definition of the
right-hand side and then do not need additional control operators.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t><cref anchor="to-be-removed">RFC Editor: please replace RFC-XXXX with the RFC
number of this RFC and remove this note.</cref></t>
      <t>This document requests IANA to register the contents of
<xref target="tbl-iana-reqs"/> into the registry
"<xref section="CDDL Control Operators" relative="#cddl-control-operators" sectionFormat="bare" target="IANA.cddl"/>" of <xref target="IANA.cddl"/>:</t>
      <table anchor="tbl-iana-reqs">
        <name>New control operators to be registered</name>
        <thead>
          <tr>
            <th align="left">Name</th>
            <th align="left">Reference</th>
          </tr>
        </thead>
        <tbody>
          <tr>
            <td align="left">
              <tt>.b64u</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64u-sloppy</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64c</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b64c-sloppy</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b45</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.b32</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.h32</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hex</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hexlc</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.hexuc</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.decimal</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.printf</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.json</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.join</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cbordet</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
          <tr>
            <td align="left">
              <tt>.cborseqdet</tt></td>
            <td align="left">[RFC-XXXX]</td>
          </tr>
        </tbody>
      </table>
    </section>
    <section removeInRFC="true" anchor="implementation-status">
      <name>Implementation Status</name>
      <!-- RFC7942 -->

<t>In the CDDL tool described in <xref section="F" sectionFormat="of" target="RFC8610"/>,
the control operators defined in the present revision of this
specification are implemented as of version 0.10.4.</t>
    </section>
    <section anchor="security-considerations">
      <name>Security considerations</name>
      <t>The security considerations of <xref target="RFC8610"/> apply.</t>
    </section>
  </middle>
  <back>
    <references>
      <name>References</name>
      <references anchor="sec-normative-references">
        <name>Normative References</name>
        <referencegroup anchor="STD90" target="https://www.rfc-editor.org/info/std90">
          <reference anchor="RFC8259" target="https://www.rfc-editor.org/info/rfc8259">
            <front>
              <title>The JavaScript Object Notation (JSON) Data Interchange Format</title>
              <author fullname="T. Bray" initials="T." role="editor" surname="Bray"/>
              <date month="December" year="2017"/>
              <abstract>
                <t>JavaScript Object Notation (JSON) is a lightweight, text-based, language-independent data interchange format. It was derived from the ECMAScript Programming Language Standard. JSON defines a small set of formatting rules for the portable representation of structured data.</t>
                <t>This document removes inconsistencies with other specifications of JSON, repairs specification errors, and offers experience-based interoperability guidance.</t>
              </abstract>
            </front>
            <seriesInfo name="STD" value="90"/>
            <seriesInfo name="RFC" value="8259"/>
            <seriesInfo name="DOI" value="10.17487/RFC8259"/>
          </reference>
        </referencegroup>
        <referencegroup anchor="STD94" target="https://www.rfc-editor.org/info/std94">
          <reference anchor="RFC8949" target="https://www.rfc-editor.org/info/rfc8949">
            <front>
              <title>Concise Binary Object Representation (CBOR)</title>
              <author fullname="C. Bormann" initials="C." surname="Bormann"/>
              <author fullname="P. Hoffman" initials="P." surname="Hoffman"/>
              <date month="December" year="2020"/>
              <abstract>
                <t>The Concise Binary Object Representation (CBOR) is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation. These design goals make it different from earlier binary serializations such as ASN.1 and MessagePack.</t>
                <t>This document obsoletes RFC 7049, providing editorial improvements, new details, and errata fixes while keeping full compatibility with the interchange format of RFC 7049. It does not create a new version of the format.</t>
              </abstract>
            </front>
            <seriesInfo name="STD" value="94"/>
            <seriesInfo name="RFC" value="8949"/>
            <seriesInfo name="DOI" value="10.17487/RFC8949"/>
          </reference>
        </referencegroup>
        <reference anchor="RFC8610">
          <front>
            <title>Concise Data Definition Language (CDDL): A Notational Convention to Express Concise Binary Object Representation (CBOR) and JSON Data Structures</title>
            <author fullname="H. Birkholz" initials="H." surname="Birkholz"/>
            <author fullname="C. Vigano" initials="C." surname="Vigano"/>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="June" year="2019"/>
            <abstract>
              <t>This document proposes a notational convention to express Concise Binary Object Representation (CBOR) data structures (RFC 7049). Its main goal is to provide an easy and unambiguous way to express structures for protocol messages and data formats that use CBOR or JSON.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8610"/>
          <seriesInfo name="DOI" value="10.17487/RFC8610"/>
        </reference>
        <reference anchor="IANA.cddl" target="https://www.iana.org/assignments/cddl">
          <front>
            <title>Concise Data Definition Language (CDDL)</title>
            <author>
              <organization>IANA</organization>
            </author>
          </front>
        </reference>
        <reference anchor="RFC9165">
          <front>
            <title>Additional Control Operators for the Concise Data Definition Language (CDDL)</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="December" year="2021"/>
            <abstract>
              <t>The Concise Data Definition Language (CDDL), standardized in RFC 8610, provides "control operators" as its main language extension point.</t>
              <t>The present document defines a number of control operators that were not yet ready at the time RFC 8610 was completed:,, and for the construction of constants; / for including ABNF (RFC 5234 and RFC 7405) in CDDL specifications; and for indicating the use of a non-basic feature in an instance.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9165"/>
          <seriesInfo name="DOI" value="10.17487/RFC9165"/>
        </reference>
        <reference anchor="RFC4648">
          <front>
            <title>The Base16, Base32, and Base64 Data Encodings</title>
            <author fullname="S. Josefsson" initials="S." surname="Josefsson"/>
            <date month="October" year="2006"/>
            <abstract>
              <t>This document describes the commonly used base 64, base 32, and base 16 encoding schemes. It also discusses the use of line-feeds in encoded data, use of padding in encoded data, use of non-alphabet characters in encoded data, use of different encoding alphabets, and canonical encodings. [STANDARDS-TRACK]</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="4648"/>
          <seriesInfo name="DOI" value="10.17487/RFC4648"/>
        </reference>
        <reference anchor="RFC9285">
          <front>
            <title>The Base45 Data Encoding</title>
            <author fullname="P. Fältström" initials="P." surname="Fältström"/>
            <author fullname="F. Ljunggren" initials="F." surname="Ljunggren"/>
            <author fullname="D.W. van Gulik" initials="D.W." surname="van Gulik"/>
            <date month="August" year="2022"/>
            <abstract>
              <t>This document describes the Base45 encoding scheme, which is built upon the Base64, Base32, and Base16 encoding schemes.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9285"/>
          <seriesInfo name="DOI" value="10.17487/RFC9285"/>
        </reference>
        <reference anchor="RFC9485">
          <front>
            <title>I-Regexp: An Interoperable Regular Expression Format</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <author fullname="T. Bray" initials="T." surname="Bray"/>
            <date month="October" year="2023"/>
            <abstract>
              <t>This document specifies I-Regexp, a flavor of regular expression that is limited in scope with the goal of interoperation across many different regular expression libraries.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9485"/>
          <seriesInfo name="DOI" value="10.17487/RFC9485"/>
        </reference>
        <reference anchor="RFC8742">
          <front>
            <title>Concise Binary Object Representation (CBOR) Sequences</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="February" year="2020"/>
            <abstract>
              <t>This document describes the Concise Binary Object Representation (CBOR) Sequence format and associated media type "application/cbor-seq". A CBOR Sequence consists of any number of encoded CBOR data items, simply concatenated in sequence.</t>
              <t>Structured syntax suffixes for media types allow other media types to build on them and make it explicit that they are built on an existing media type as their foundation. This specification defines and registers "+cbor-seq" as a structured syntax suffix for CBOR Sequences.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="8742"/>
          <seriesInfo name="DOI" value="10.17487/RFC8742"/>
        </reference>
        <reference anchor="C" target="https://www.iso.org/standard/74528.html">
          <front>
            <title>Information technology — Programming languages — C</title>
            <author>
              <organization>International Organization for Standardization</organization>
            </author>
            <date year="2018" month="June"/>
          </front>
          <seriesInfo name="ISO/IEC" value="9899:2018"/>
          <annotation>Technically equivalent specification text is available at <eref target="https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf">https://web.archive.org/web/20181230041359if_/http://www.open-std.org/jtc1/sc22/wg14/www/abq/c17_updated_proposed_fdis.pdf</eref></annotation>
          <refcontent>Fourth Edition</refcontent>
        </reference>
        <reference anchor="RFC2119">
          <front>
            <title>Key words for use in RFCs to Indicate Requirement Levels</title>
            <author fullname="S. Bradner" initials="S." surname="Bradner"/>
            <date month="March" year="1997"/>
            <abstract>
              <t>In many standards track documents several words are used to signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="2119"/>
          <seriesInfo name="DOI" value="10.17487/RFC2119"/>
        </reference>
        <reference anchor="RFC8174">
          <front>
            <title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</title>
            <author fullname="B. Leiba" initials="B." surname="Leiba"/>
            <date month="May" year="2017"/>
            <abstract>
              <t>RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.</t>
            </abstract>
          </front>
          <seriesInfo name="BCP" value="14"/>
          <seriesInfo name="RFC" value="8174"/>
          <seriesInfo name="DOI" value="10.17487/RFC8174"/>
        </reference>
      </references>
      <references anchor="sec-informative-references">
        <name>Informative References</name>
        <reference anchor="RFC9090">
          <front>
            <title>Concise Binary Object Representation (CBOR) Tags for Object Identifiers</title>
            <author fullname="C. Bormann" initials="C." surname="Bormann"/>
            <date month="July" year="2021"/>
            <abstract>
              <t>The Concise Binary Object Representation (CBOR), defined in RFC 8949, is a data format whose design goals include the possibility of extremely small code size, fairly small message size, and extensibility without the need for version negotiation.</t>
              <t>This document defines CBOR tags for object identifiers (OIDs) and is the reference document for the IANA registration of the CBOR tags so defined.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="9090"/>
          <seriesInfo name="DOI" value="10.17487/RFC9090"/>
        </reference>
        <reference anchor="RFC7951">
          <front>
            <title>JSON Encoding of Data Modeled with YANG</title>
            <author fullname="L. Lhotka" initials="L." surname="Lhotka"/>
            <date month="August" year="2016"/>
            <abstract>
              <t>This document defines encoding rules for representing configuration data, state data, parameters of Remote Procedure Call (RPC) operations or actions, and notifications defined using YANG as JavaScript Object Notation (JSON) text.</t>
            </abstract>
          </front>
          <seriesInfo name="RFC" value="7951"/>
          <seriesInfo name="DOI" value="10.17487/RFC7951"/>
        </reference>
      </references>
    </references>
    <?line 387?>

<section numbered="false" anchor="acknowledgements">
      <name>Acknowledgements</name>
      <t>Henk Birkholz suggested the need for many of the control operators
defined here.</t>
      <!--  LocalWords:  dedenting dedented
 -->

</section>
  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA7Vb7XYbN5L9j6fAMGdPpBk2RVLUF9dxIktyohlb8lj2zma9
XgvsBsmOm91Mf0hiJOXMO+w+wP7YJ9l9k3mSvVUAmt1synKSGZ3E6g90AShU
3bpVgDzPE1dDuS1EHuaRHsqnQsqXSarlURLnaRLJ87lOVZ6kmRwnqTw6Pn4h
1GiUanxFN9K37RLXTgSJH6sZZAWpGudeqPOx54+S1PODIPJmEO7Zj7xI5TrL
xRcywMVQ9rv9gdfte/2+8FU+lFkeCDTNdJwV2VDmaaFFlqdazYby9OTNcyE+
6sV1kgZDIT0asR9mWh6rXMljPQ7jMA+TWL5Q8aRQE23b1GYlrnRcaHwuJ2lS
zIey5aQ8C2OVLuT56Aft5/K1nqca48gVi9w4enb+elO+VGGc61jFvpYqDuTJ
De4yNMhakDhTYQSBNPVvSAmdJJ3Q80mYT4uRfeNdT7YaeqFWRjVoNc3zeTbc
2rKtO+bzTpg0v9tqCTEPh/JdnvhtmSUpdDXOcLWYmQs/mc2Vn/PFDLPJ3guh
inyapKQCD/9LGcZQ9VFHPkvSmYpjfmbW80ilGSZYe4M5DeXbOLzSaRbm//c/
uXyWaoiWb/7tlBvQemnM41WS5WPlT+X2dncw6PI7P8wXQ/uBeZAE6OfY6+9v
7xzYJwWmhlbfaup0wQ/n0yRGuz8MDrxBv+f1e/ve7vZBv8cvtdG7r0bJN/lP
IWldCBHTmHMMkyZ68eb4oDvk1t5Q/pAlMUwQP18N5evnR/t97ps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