<?xml version="1.0" encoding="utf-8"?>
<!-- 
     draft-rfcxml-general-template-standard-00
  
     This template includes examples of the most commonly used features of RFCXML with comments 
     explaining how to customise them. This template can be quickly turned into an I-D by editing 
     the examples provided. Look for [REPLACE], [REPLACE/DELETE], [CHECK] and edit accordingly.
     Note - 'DELETE' means delete the element or attribute, not just the contents.
     
     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="std"
  docName="draft-codere-ldapsyntax-05"
  ipr="trust200902"
  obsoletes=""
  updates=""
  xml:lang="en"
  version="3">
<!-- [REPLACE] 
       * docName with name of your draft
     [CHECK] 
       * category should be one of std, bcp, info, exp, historic
       * ipr should be one of trust200902, noModificationTrust200902, noDerivativesTrust200902, pre5378Trust200902
       * updates can be an RFC number as NNNN
       * obsoletes can be an RFC number as NNNN 
-->

  <front>
    <title abbrev="LDAP Additional syntaxes">Lightweight Directory Access Protocol (LDAP):
                      Additional Syntaxes</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-codere-ldapsyntax-05"/>
   
    <author fullname="Carl Eric Codere" initials="C. E" role="editor" surname="Codère">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>Optima SC Inc.</organization>
      <address>
        <postal>
          <country>CA</country>
          <!-- Uses two letter country code -->
        </postal>        
        <email>carl.codere@optimasc.com</email>  
        <!-- Can have more than one <email> element -->
        <uri>http://www.optimasc.com</uri>
      </address>
    </author>
   
    <date year="2025"/>
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>General</area>
    <workgroup>Internet Engineering Task Force</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is 
          not present, the default is "Network Working Group", which is used by the RFC Editor as 
          a nod to the history of the RFC Series. -->

    <keyword>datatype</keyword>
    <keyword>object identifier</keyword>
    <keyword>LDAP</keyword>
    <keyword>Syntax definitions</keyword>
    
    <abstract>
      <t>This document registers additional syntax definitions for 
        use in Lightweight Directory Access Protocol (LDAP) directory and Directoy services series X.500. This
        includes widely used datatypes and syntaxes. </t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>The Lightweight Directory Access Protocol (LDAP) directory defines several data types which specify the 
	  syntax definitions of attributes. These are identified by ASN.1 OBJECT IDENTIFIERS. Furthermore, these syntax
	  definitions could be used to uniquely identify data types as character representations in other applications. 
	  Some widely used syntax specifications are missing from the initial LDAP specification. This document provides
	  additional syntax definitions that have been registered and may be used by application providers.</t>
      
      <section>
        <name>Conventions</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" 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>
		  
		<t>Syntax definitions are written according to the regular expressions
		  defined in <xref target="RFC9485"/>.</t>
      </section>

    </section>
    <section>
      <name>Syntaxes</name>
      <t>The following additional syntaxes and their associated descriptions and OBJECT IDENTIFIER are defined.</t>
	  
	  <section>
	    <name>ASN.1 Syntax Definitions</name>
		
	    <t>The following additional syntaxes are defined and are based on <xref target="ASN.1"/>.</t>
	    
	    <section>
	      <name>Date</name>
	      
	      <t>The Date type represents a date in the Gregorian calender. It is defined as a useful TIME type 
	        in <xref target="ASN.1"/> and conforms to the extended format syntax of a calendar date as defined 
	        in <xref target="ISO.8601.2004"/>.</t> 
	        
	        
	        <t>A Date value <bcp14>SHALL</bcp14> be written using the following syntax: YYYY-MM-DD where YYYY represents a 
	          year between 1582 and 9999, MM the month value from 01 to 12 and DD a day in the month from 01 to 31. </t>
	      
	      <t>Examples</t>
	      
	      <ul>
	        <li>9999-02-25</li>
	        <li>1583-01-31</li>
	      </ul>
	      
	      <t>The LDAP definition for the Date syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.31 DESC 'Date' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to the DATE ASN.1 type from <xref target="ASN.1"/>.</t>
	    </section>
	    
	    
	    
	    <section>
	      <name>Date-Time</name>
	      
	      <t>The Date-time type represents a date and local time using a 24 hour clock. It is defined as a useful TIME type 
	        in <xref target="ASN.1"/> and conforms to the extended format syntax of a date and time without
	        any timezone specifier as defined in <xref target="ISO.8601.2004"/>.</t>
	      
	      <t>A Date-Time value <bcp14>SHALL</bcp14> be written using the following syntax: YYYY-MM-DDThh:mm:ss where YYYY represents a 
	        year between 1582 and 9999, MM the month value from 01 to 12, DD a day in the month from 01 to 31, hh  
	        the hour from 00 to 24, mm the minute from 00 to 59, and ss the seconds with allowed
	        values of 00 to 60 where 60 represents a leap second </t>
	      
	      
	      <t>Examples</t>
	      
	      <ul>
	        <li>1583-01-01T00:59:59</li>
	        <li>1975-01-19T23:45:34</li>
	      </ul>
	      
	      <t>The LDAP definition for the Date-Time syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.33 DESC 'Date-Time' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to the DATE-TIME ASN.1 type from <xref target="ASN.1"/>.</t>
	    </section>
	    
	    
	    <section>
	      <name>Duration</name>
	      
	      <t>The Duration type represents an elapsed time with a resolution of up to a fractions of seconds. It is defined as a useful TIME type 
	        in <xref target="ASN.1"/> and conforms to the extended format syntax of a time interval by duration as 
	        defined in <xref target="ISO.8601.2004"/>.</t>     
	      
	      <t>A duration syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
	      
	      <sourcecode>P([0-9]+Y)?([0-9]+M)?([0-9]+D)?(T([0-9]+H)?([0-9]+M)?([0-9]+(\.[0-9]+)?S)?)?</sourcecode>
	      
	      <t>Examples</t>
	      
	      <ul>
	        <li>P29M0D   -- 29 months </li>
	        <li>P29MT0S  -- 29 months</li>
	        <li>PT3445.5S  -- 3445.55 seconds</li>
	      </ul>
	      
	      <t>The LDAP definition for the Duration syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.34 DESC 'Duration' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to a very strict subset of DURATION ASN.1 type from <xref target="ASN.1"/>, in that
	       the order of parameters need to be respected.</t>
	    </section>
	    
	    <section anchor="real">
	      <name>Real</name>
	      
	      <t>The Real type represents the computational approximations to the mathematical "real number". The
	        format for the Real is as defined in Section 21 of <xref target="ASN.1"/>.</t> 
	      
	      <t>A Real syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
	      
	      <sourcecode>([-]?[0-9]+\.?[0-9]+([E][-]?[0-9]+)?)|PLUS-INFINITY|MINUS-INFINITY|NOT-A-NUMBER</sourcecode>
	      
	      
	      <t>Examples</t>
	      
	      <ul>
	        <li>3.14159</li>
	        <li>MINUS-INFINITY</li>
	        <li>-5.3E4 -- Equal to -53000</li>
	      </ul>
	      
	      <t>The LDAP definition for the Real syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.9 DESC 'Real' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to a subset of the REAL ASN.1 type from <xref target="ASN.1"/> where the sequence syntax is not allowed, the
	        values are limited to base ten, where a digit before the decimal point is required, where only the character 'E' is allowed to specify
	        the exponent and that the preceding optional "+" sign is prohibited in the exponent.
	      </t>
	    </section>
	    
	    <section>
	      <name>Time Of Day</name>
	      
	      <t>The Time Of Day type represents a local time using a 24 hour clock. It is defined as a useful TIME type 
	        in <xref target="ASN.1"/> and conforms to the extended format syntax of a local time as defined 
	        in <xref target="ISO.8601.2004"/>. </t>
	      
	      <t>A Time Of Day value <bcp14>SHALL</bcp14> be written using the following syntax: hh:mm:ss where hh represents 
	        the hour from 00 to 24, mm represents the minute from 00 to 59, and ss represents the seconds with allowed
	        values of 00 to 60 where 60 represents a leap second.</t>
	      
	      <t>Examples for Time Of Day:</t>
	      
	      <ul>
	        <li>00:59:59</li>
	        <li>01:45:54</li>
	      </ul>
	      
	      <t>The LDAP definition for the Time Of Day syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.32 DESC 'Time Of Day' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to the TIME-OF-DAY ASN.1 type from <xref target="ASN.1"/>.</t>
	    </section>
	    
	    
	    <section>
	      <name>Visible String</name>
	      
	      <t>The Visible string type represents a character repertoire that the contains printable ASCII character set (in the range 0020-007E hexadecimal). It is defined in 
	        <xref target="ASN.1"/>.</t>
	      
	      <t>This syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
	      
	      <sourcecode>[0-9A-Za-z !&quot;#$%&amp;&apos;()*+,-./:;&lt;=&gt;?@[\]^_`{|}~]</sourcecode>
	      
	      
	      <t>Examples</t>
	      
	      <ul>
	        <li>hello world</li>
	        <li>(x+y)=z</li>
	      </ul>
	      
	      <t>The LDAP definition for the Visible String syntax is:</t>
	      
	      <ul>
	        <li>( 1.3.6.1.4.1.61799.5.40.26 DESC 'Visible String' )</li>
	      </ul>
	      
	      <t>This syntax corresponds to the VisibleString ASN.1 type from <xref target="ASN.1"/>.</t>
	    </section>
	    

	  </section>
      
      <section>
	      <name>Constrained ASN.1 Syntax Definitions</name>
	      
	      <t>The following additional syntaxes are defined as constraints of basic ASN.1 types that may be used to be more precise in encoding and input validation. </t>
	       
        <section>
          <name>Short String</name>
          
          <t>The Short String type represents a string that is limited to 31 characters when encoded.</t>
          
          <t>The length was chosen so that when using DER encoding, using the worst-case scenario of 4 octets per character in UTF-8, 
            the string can be encoded using one length octet. It is also sufficient for labels and short titles.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>Hello world</li>
            <li>Short</li>
          </ul>
          
          <t>The LDAP definition for the Short String type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.12.1 DESC 'Short String' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ITU.X520.2019"/>:</t>
          
          <sourcecode>Shortstring ::= DirectoryString{31}</sourcecode>
          
        </section>
        
        
        <section>
          <name>Long String</name>
          
          <t>The Long String type represents a string that is limited to 250 characters when encoded.</t>
          
          <t>The length was chosen so that when using CER encoding, using the worst-case scenario of 4 octets per character, 
            the string can still be encoded using a primitive construct. This length seems sufficient for descriptive text.</t>
          
          
          <t>Examples</t>
          
          <ul>
            <li>This is a bigger sentence</li>
            <li>Ceci est une phrase qui est plus longue que la précèdente</li>
          </ul>
          
          <t>The LDAP definition for the Long String type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.12.2 DESC 'Long String' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ITU.X520.2019"/>:</t>
          
          <sourcecode>Longstring ::= DirectoryString{250}</sourcecode>
        </section>
        
        <section>
          <name>Text</name>
          
          <t>The text type represents a string that is limited to 16383 characters when encoded. .</t>
          
          <t>The length was mainly defined based on historical system constraints of 65535 octets using the worst case scenario of 4
            octets per character.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>Hello world</li>
            <li>Ceci est une phrase qui est encore plus longue que la précèdente</li>
          </ul>
          
          <t>The LDAP definition for the Text type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.12.3 DESC 'Text' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ITU.X520.2019"/>:</t>
          
          <sourcecode>Text ::= DirectoryString{16383}</sourcecode>
        </section>
        
        
        <section>
          <name>Float32</name>
          
          <t>The Float32 type represents a real number which fits in the range of a <xref target="IEEE_754_2019"/> single precision floating
            point value.</t>
          
          <t>The Float32 syntax follows the syntax of the real type (See <xref target="real"/>) with a constrained range.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>3.14159</li>
            <li>MINUS-INFINITY</li>
            <li>-5.3E4 -- Equal to -53000</li>
          </ul>
          
          <t>The LDAP definition for the Float32 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.9.4 DESC 'Float32' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          <sourcecode>
            Float32 ::= REAL (WITH COMPONENTS {
            mantissa (-16777215..16777215),
            base (2),
            exponent (-149..104) })
          </sourcecode>
        </section>
        
        <section>
          <name>Float64</name>
          
          <t>The Float64 type represents a real number which fits in the range of a <xref target="IEEE_754_2019"/> double precision floating
            point value.</t>
          
          <t>The Float64 syntax follows the syntax of the real type (See <xref target="real"/>) with a constrained range.</t>
          
          
          <t>Examples</t>
          
          <ul>
            <li>3.1415926535897932</li>
            <li>NOT-A-NUMBER</li>
            <li>-5.3E4 -- Equal to -53000</li>
          </ul>
          
          <t>The LDAP definition for the Float64 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.9.8 DESC 'Float64' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          <sourcecode>
            Float64 ::= REAL (WITH COMPONENTS {
            mantissa (-9007199254740991..9007199254740991),
            base (2),
            exponent (-1074..971) })
          </sourcecode>
        </section>
        
        
        <section>
          <name>UInt8</name>
          
          <t>The UInt8 type represents an unsigned integer value within the range 0 to 255 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>34</li>
          </ul>
          
          <t>The LDAP definition for the UInt8 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.21 DESC 'UInt8' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>UInt8 ::= INTEGER(0..255)</sourcecode>
          
        </section>
        
        <section>
          <name>UInt16</name>
          
          <t>The UInt16 type represents an unsigned integer value within the range 0 to 65535 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>64991</li>
          </ul>
          
          <t>The LDAP definition for the UInt16 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.22 DESC 'UInt16' )</li>
          </ul>
          
          <t>This syntax syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>UInt16 ::= INTEGER(0..65535)</sourcecode>
          
        </section>
        
        <section>
          <name>UInt32</name>
          
          <t>The UInt32 type represents an unsigned integer value within the range 0 to 4294967295 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>40000000</li>
          </ul>
          
          <t>The LDAP definition for the UInt32 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.24 DESC 'UInt32' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>UInt32 ::= INTEGER(0..4294967295)</sourcecode>
          
        </section>
        
        <section>
          <name>UInt64</name>
          
          <t>The UInt64 type represents an unsigned integer value within the range 0 to 18446744073709551615 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>844674407370955</li>
          </ul>
          
          <t>The LDAP definition for the UInt64 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.28 DESC 'UInt64' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>UInt64 ::= INTEGER(0..18446744073709551615)</sourcecode>
          
        </section>
        
        
        
        <section>
          <name>Int8</name>
          
          <t>The Int8 type represents a signed integer value within the range -128 to 127 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>-123</li>
          </ul>
          
          <t>The LDAP definition for the Int8 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.1 DESC 'Int8' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Int8 ::= INTEGER(-128..127)</sourcecode>
          
        </section>
        
        <section>
          <name>Int16</name>
          
          <t>The Int16 type represents a signed integer value within the range -32768 to 32767 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>15667</li>
            <li>-32000</li>
          </ul>
          
          <t>The LDAP definition for the Int16 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.2 DESC 'Int16' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Int16 ::= INTEGER(-32768 .. 32767)</sourcecode>
          
        </section>
        
        
        <section>
          <name>Int32</name>
          
          <t>The Int32 type represents a signed integer value within the range -2147483648 to 2147483647 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>15667</li>
            <li>-3200000</li>
          </ul>
          
          <t>The LDAP definition for the Int32 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.4 DESC 'Int32' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Int32 ::= INTEGER(-2147483648..2147483647)</sourcecode>
          
        </section>
        
        <section>
          <name>Int64</name>
          
          <t>The Int64 type represents a signed integer value within the range -9223372036854775808 to 9223372036854775807 inclusive. </t>
          
          <t>Examples</t>
          
          <ul>
            <li>-2337203685477580</li>
            <li>3372036854775807</li>
          </ul>
          
          <t>The LDAP definition for the Int64 type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.8 DESC 'Int64' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Int64 ::= INTEGER(-9223372036854775808..9223372036854775807)</sourcecode>
          
        </section>
        
        <section>
          <name>Percentage</name>
          
          <t>The Percentage type represents a percentage value, that is an unsigned integer in the range 0 to 100 inclusive.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>0</li>
            <li>99</li>
          </ul>
          
          <t>The LDAP definition for the Percentage type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.2.20 DESC 'Percentage' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Percentage ::= INTEGER(0..100)</sourcecode>
        </section>
        
	  
    </section>   
      
      <section>
	      <name>Other Syntax Definitions</name>
	      
	      <t>The following additional syntaxes are defined and are based on IETF RFC's, or other international standards.</t>
        
        
        <section>
          <name>DCMIType</name>
          
          <t>DCMIType is a controlled vocabulary to describe the type of a resource. It is specified 
          in <xref target="DCMIType"/></t>    
          
          
          <t>Examples</t>
          
          <ul>
            <li>Text</li>
            <li>Moving Image</li>
          </ul>
          
          
          <t>The LDAP definition for the DCMIType syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.19.2 DESC 'DCMIType' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>DCMIType ::= VisibleString ("Collection" | "Dataset" | 
             "Event" | "Image" | "Interactive Resource" | 
             "Moving Image" | 
             "Physical Object" | 
             "Service" | "Software" | 
             "Sound" | 
             "Still Image" | 
             "Text")</sourcecode>          
        </section>
        
        
        <section>
          <name>Language</name>
          
          <t>A language provides a representation of a spoken or written language as well as an optional locale specifier.  The
            exact syntax allowed is defined in Section 2 of <xref target="RFC5646"/>.</t>    
          
          <t>A Language syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
          
          <sourcecode>[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*</sourcecode>
          
          <t>Examples</t>
          
          <ul>
            <li>en</li>
            <li>fr-CA</li>
          </ul>
          
          
          <t>The LDAP definition for the Language syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.19.1 DESC 'Language' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>Language ::= VisibleString (PATTERN "[a-zA-Z]#(1,8)(-[a-zA-Z0-9]#(1,8))*") -- ISO 639 code minimally</sourcecode>          
          
        </section>

        <section>
          <name>Media type</name>
          
          <t>The Media Type syntax type should be used to identify values that represent a Media type. The
            format for the MIME Media type is defined in Section 5.1 of <xref target="RFC6838"/>.</t> 
          
          <t>This syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
          
          <sourcecode>[A-Za-z0-9]([A-Za-z0-9!#$&amp;^_.+-]){0,126}/[A-Za-z0-9]([A-Za-z0-9!#$&amp;^_.+-]){0,126}</sourcecode>
          
          <t>Examples</t>
          
          <ul>
            <li>text/xhtml</li>
            <li>application/alto-costmap+json</li>
          </ul>
          
          <t>The LDAP definition for the MIME Media type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.26.5 DESC 'Media Type' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>MediaType ::= VisibleString (SIZE(3..255)) -- IANA Registered Media type</sourcecode>
          
        </section>
        
        
	  <section>
	   <name>OpenDate</name>
	   
	   <t>An OpenDate represents either part of a Date or a Date and Time in extended format as specified in ISO 8601. The
	     exact syntax allowed is defined by W3C Date and Time formats <xref target="W3C.NOTE-datetime-19980827"/> with
	     a 3 digit fraction. The time component, when present, always contains timezone information.</t>     
	    
      <t>Examples for OpenDate:</t>

        <ul>
         <li>2034</li>
         <li>1975-01</li>
         <li>1975-01-19</li>
         <li>1975-01-19T19:20+01:00</li>
         <li>1975-01-19T19:20:30+01:00</li>
         <li>1975-01-19T19:20:30.451+01:00</li>
         <li>1975-01-19T18:20Z</li>
         <li>1975-01-19T18:20:30Z</li>
         <li>1975-01-19T18:20:30.451Z</li>
	   </ul>
		
   
      <t>The LDAP definition for the OpenDate syntax is:</t>

      <ul>
        <li>( 1.3.6.1.4.1.61799.5.40.14.1 DESC 'OpenDate' )</li>
      </ul>
	    
	    
	    <t>This syntax corresponds to a subset of the TIME ASN.1 type from <xref target="ASN.1"/> with the specified
	      configuration:</t>
	    
	    <sourcecode>OpenDate ::=  TIME((SETTINGS "Basic=Date Date=Y Year=Basic")|
        (SETTINGS "Basic=Date Date=YM Year=Basic")|
        (SETTINGS "Basic=Date Date=YMD Year=Basic")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HM Local-or-UTC=LD")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMS Local-or-UTC=LD")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMSF3 Local-or-UTC=LD")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HM Local-or-UTC=Z")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMS Local-or-UTC=Z")|
        (SETTINGS "Basic=Date-Time Date=YMD Year=Basic Time=HMSF3 Local-or-UTC=Z"))
	    </sourcecode>
	    
	  </section>

        <section>
          <name>URI</name>
          
          <t>The URI syntax type should be used to identify values that are referenced by a Uniform Resource Identifier (URI). The
            format and encoding for the URI is as defined in <xref target="RFC3986"/>. Even if relative URI's are allowed, it is 
            recommended they not be used unless the context of use is known.</t>     
          
          <t>Examples</t>
          
          <ul>
            <li>http://www.example.com/my/picture.jpg</li>
            <li>ldap://ldap.example.com/cn=babs%20jensen</li>
          </ul>
          
          <t>The LDAP definition for the URI syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.26.4 DESC 'URI' )</li>
          </ul>
          
          <t>This  syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/>:</t>
          
          <sourcecode>URI ::= VisibleString (SIZE(1..ub-uri-length))</sourcecode>
          
          <t>The value of ub-uri-length (an integer) is implementation
            defined but must be at least 2000 octets.</t>        
          
        </section>
        
        
        <section>
          <name>NCName</name>
          
          <t>The NCName syntax type should be used to identify values that represent identifiers and
            local attribute names. A name is a subset of the NCName definition in <xref target="W3C.xmlschema11-2"/>.</t>
          
          <t>This syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
          
          <sourcecode>[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}.-_]*</sourcecode>
          
          <t>Examples</t>
          
          <ul>
            <li>MyID</li>
            <li>attribte.0.subdivision</li>
          </ul>
          
          <t>The LDAP definition for the NCName type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.26.6 DESC 'NCName' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ITU.X520.2019"/>:</t>
          
          <sourcecode>NCName ::= UnboundedDirectoryString</sourcecode>
          
        </section>
        
        <section>
          <name>Normalized String</name>
          
          <t>The Normalized String syntax type represents white space normalized strings.  
            A  Normalized String is a string that does not contain any control characters including 
            the carriage return (%xD), line feed (%xA) or tab (%x9) character.
            This is similar to the NormaliedString datatype in <xref target="W3C.xmlschema11-2"/> based on the
            Char type defined in <xref target="W3C.xml"/>.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>MyID</li>
            <li>attribte.0.subdivision</li>
          </ul>
          
          <t>The LDAP definition for the Normalized String type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.12.4 DESC 'Normalized String' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/> :</t>
          
          <sourcecode>
            NormalizedString ::= CHOICE {
            printableString  PrintableString,
            bmpString        BMPString
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253})),
            universalString  UniversalString
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253} |
            {0, 1, 0, 0} .. {0, 16, 255, 253})),
            uTF8String       UTF8String
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253} |
            {0, 1, 0, 0} .. {0, 16, 255, 253}))
            }
          </sourcecode>
        </section>
        
        
        
        <section>
          <name>QualifiedName</name>
          
          <t>The QualifiedName syntax type may be used to identify values that represent identifiers and
            attribute names using namespaces. This is a subset of the QName definition in <xref target="W3C.xmlschema11-2"/>.</t>
          
          <t>This syntax value <bcp14>SHALL</bcp14> conform to the following regular expression</t>
          
          <sourcecode>[\p{L}\p{Nl}_][\p{L}\p{Nl}\p{Nd}.-_]*(:)?[\p{L}\p{Nl}\p{Nd}.-_]+</sourcecode>

          
          <t>Examples</t>
          
          <ul>
            <li>MyID</li>
            <li>attribte.0:subdivision</li>
          </ul>
          
          <t>The LDAP definition for the QualifiedName type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.26.6 DESC 'QualifiedName' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ITU.X520.2019"/>:</t>
          
          <sourcecode>QualifiedName ::= UnboundedDirectoryString</sourcecode>
          
        </section>
        
        <section>
          <name>Time Of Day with Timezone</name>
          
          <t>The Time Of Day type with Timezone represents a time with explicit timezone information using a 24 hour clock. 
            It is defined as a TIME type in <xref target="ASN.1"/> and conforms to the extended format syntax of a time either
            represented as a Local time and the difference from UTC or UTC of day as defined in <xref target="ISO.8601.2004"/>. </t>
          
          <t>A Time Of Day with Timezone value <bcp14>SHALL</bcp14> be written using the following syntax: hh:mm:ss where hh represents 
            the hour from 00 to 24, mm represents the minute from 00 to 59, and ss represents the seconds with allowed
            values of 00 to 60 where 60 represents a leap second followed by a timezone indicator.</t>
          
          <t>The timezone indicator is in the form +hh:mm where hh represents the number of hours and mm the number of minutes 
             if the local time is ahead of or equal to UTC time. The timezone indicator is -hh:mm if the local time is behind UTC time. 
             If the time represents an UTC time, the time shall be followed without space, by the timezone UTC designator [Z].
             This standard supports time differences in the range –15 hours to +15 hours to align with <xref target="ASN.1"/>.</t>
          
          <t>Examples for Time Of Day with Timezone:</t>
          
          <ul>
            <li>00:59:59Z</li>
            <li>01:45:54-01:00</li>
          </ul>
          
          <t>The LDAP definition for the Time Of Day with Timezone syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.35 DESC 'Time Of Day with Timzone' )</li>
          </ul>
          
          <t>This syntax corresponds to a subset of the TIME ASN.1 type from <xref target="ASN.1"/> with the specified
            configuration:</t>
          
          <sourcecode>Time-with-timezone ::=  TIME((SETTINGS "Basic=Time Time=HMS Local-or-UTC=LD")|
            (SETTINGS "Basic=Time Time=HMS Local-or-UTC=Z"))
          </sourcecode>
        </section>
        
        <section>
          <name>Token</name>
          
          <t>The Token syntax type represents white space normalized strings.  
            A  Normalized String is a string that does not contain any control characters including 
            the carriage return (%xD), line feed (%xA) or tab (%x9) character, that have no leading or trailing 
            spaces (%x20) and that have no internal sequences of two or more spaces 
            This is similar to the Token datatype in <xref target="W3C.xmlschema11-2"/> based on the
            Char type defined in <xref target="W3C.xml"/>.</t>
          
          <t>Examples</t>
          
          <ul>
            <li>MyID</li>
            <li>attribte.0.subdivision</li>
          </ul>
          
          <t>The LDAP definition for the Normalized String type syntax is:</t>
          
          <ul>
            <li>( 1.3.6.1.4.1.61799.5.40.12.5 DESC 'Token' )</li>
          </ul>
          
          <t>This syntax corresponds to the following ASN.1 type from <xref target="ASN.1"/> :</t>
          
          <sourcecode>
            Token ::= CHOICE {
            printableString  PrintableString(PATTERN "[^ ]+( [^ ]+)*"),
            bmpString        BMPString
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253})) (PATTERN "[^ ]+( [^ ]+)*"),
            universalString  UniversalString
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253} |
            {0, 1, 0, 0} .. {0, 16, 255, 253})) (PATTERN "[^ ]+( [^ ]+)*"),
            uTF8String       UTF8String
            (FROM(
            {0, 0, 0, 32} .. {0, 0, 215, 255} |
            {0, 0, 224, 0} .. {0, 0, 255, 253} |
            {0, 1, 0, 0} .. {0, 16, 255, 253})) (PATTERN "[^ ]+( [^ ]+)*")
            }
          </sourcecode>
        </section>
        
	  
    </section>   
    </section>
    
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      
      <t>The IANA has registered the LDAP values <xref target="RFC4520"/> specified in this
      document.</t>
      
      <section>
        <name>Syntax registration</name>
        
        <dl>
          <dt>Subject:</dt>
          <dd>Request for LDAP Syntax Registration</dd>
          <dt>Object Identifier:</dt>
          <dd>See table below</dd>
          <dt>Description:</dt>
          <dd>List of additional useful LDAP syntaxes</dd>
          <dt>Person &amp; email address to contact for further information:</dt>
          <dd>carl.codere@optimasc.com</dd>
          <dt>Specification/Reference: []</dt>
          <dd></dd>
          <dt>Author/Change Controller/Owner:</dt>
          <dd>IESG</dd>
          <dt>Comments: </dt>
          <dd>See table for list of additional syntaxes</dd>
        </dl>
        
        <table>
          <name>List of additional LDAP syntaxes</name>
          <thead><tr><th>Object Identifier</th><th>Syntax</th></tr></thead>
          <tbody>
            <tr><td>1.3.6.1.4.1.61799.5.40.31</td><td>Date</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.33</td><td>Date-Time</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.19.2</td><td>DCMIType</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.34</td><td>Duration</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.9.4</td><td>Float32</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.9.8</td><td>Float64</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.1</td><td>Int8</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.2</td><td>Int16</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.4</td><td>Int32</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.8</td><td>Int64</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.19.1</td><td>Language</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.26.6</td><td>NCName</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.12.4</td><td>Normalized String</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.12.1</td><td>Short String</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.12.2</td><td>Long String</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.26.5</td><td>Media Type</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.14.1</td><td>OpenDate</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.20</td><td>Percentage</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.26.7</td><td>QualifiedName</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.9</td><td>Real</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.12.3</td><td>Text</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.12.5</td><td>Token</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.32</td><td>Time Of Day</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.35</td><td>Time Of Day with Timezone</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.21</td><td>UInt8</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.22</td><td>UInt16</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.24</td><td>UInt32</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.2.28</td><td>UInt64</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.26.4</td><td>URI</td></tr>
            <tr><td>1.3.6.1.4.1.61799.5.40.26</td><td>Visible String</td></tr>
          </tbody>
        </table>
      </section>
      
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>This document should not affect the security of the Internet. </t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.9485.xml"/>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.6838.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.5646.xml"/>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.3986.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml6/reference.R.IEEE.754-2019.xml"/>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4520.xml"/>
        
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml4/reference.W3C.NOTE-datetime-19980827.xml"/>

        <xi:include href="https://bib.ietf.org/public/rfc/bibxml4/reference.W3C.xml.xml"/>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml4/reference.W3C.xmlschema11-2.xml"/>
        
         
        <!-- The recommended and simplest way to include a well known reference -->
        
        <reference anchor="DCMIType" target="https://www.dublincore.org/specifications/dublin-core/dcmi-terms/2020-01-20/">
          <front>
            <title>DCMI Metadata Terms: DCMI Type Vocabulary</title>
            <author>
              <organization>Dublincore</organization>
            </author>
            <date month="January" year="2020"/>
          </front>
        </reference>
        
        
      </references>
 
      <references>
        <name>Informative References</name>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.4517.xml"/>
        
        <!-- [REPLACE/DELETE] Example minimum reference -->
          <reference anchor="ASN.1">
            <front>
              <title>Abstract Syntax Notation One (ASN.1): Specification of basic notation</title>
              <author>
                <organization>International Telephone and Telegraph Consultative Committee</organization>
              </author>
              <date month="February" year="2021"/>
            </front>
            <seriesInfo name="CCITT" value="Recommendation X.680"/>
          </reference>
        <reference anchor="ISO.8601.2004">
          <front>
            <title>Data elements and interchange formats - Information interchange - Representation of dates and times</title>
            <author>
              <organization>International Organization for Standardization</organization>
            </author>
            <date month="December" year="2004"/>
          </front>
          <seriesInfo name="ISO" value="Standard 8601"/>
        </reference>      
        <reference anchor="ITU.X500.2019">
          <front>
            <title>Information Technology - Open Systems Interconnection - The Directory: Overview of Concepts, Models and Services</title>
            <author>
              <organization>International Telecommunications Union</organization>
            </author>
            <date month="October" year="2019"/>
          </front>
          <seriesInfo name="ITU-T" value="Recommendation X.500"/>
          <seriesInfo name="ISO" value="Standard 9594-1"/>
        </reference>        
        <reference anchor="ITU.X520.2019">
          <front>
            <title>Information Technology - Open Systems Interconnection - The Directory: Selected attribute types</title>
            <author>
              <organization>International Telecommunications Union</organization>
            </author>
            <date month="October" year="2019"/>
          </front>
          <seriesInfo name="ITU-T" value="Recommendation X.520"/>
          <seriesInfo name="ISO" value="Standard 9594-7"/>
        </reference>        
        
      </references>
    </references>
    
    <section anchor="Acknowledgements" numbered="false">
      <!-- [REPLACE/DELETE] an Acknowledgements section is optional -->
      <name>Acknowledgements</name>
      <t>This template uses extracts from templates written by Pekka Savola, Elwyn Davies and 
        Henrik Levkowetz. </t>
    </section>
    
    <section anchor="Contributors" numbered="false">
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
      <name>Contributors</name>
      <t>This document was reviewed and improved with the help of Howard Chu. </t>
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
    </section>
    
 </back>
</rfc>
