Changeset 8

Show
Ignore:
Timestamp:
05/11/08 17:47:56 (2 months ago)
Author:
oren
Message:

Language fixes;
Ensuring JSON compatibility (removing Unicode line breaks);
Adding recommended schemas section.

Location:
trunk/spec
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/spec/preprocess_fo.pl

    r7 r8  
    55 
    66my $text = ""; 
     7my $in_final_tables = 0; 
    78while (my $line = <>) { 
    89    # Get rid of the URLs of external links 
     
    2526    $line =~ s/<fo:table-row/<fo:table-row keep-together="always"/g; 
    2627    # Add margin and p[adding to preview examples. 
    27     $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ 
    28                               if ($line =~ /fo:block><fo:block wrap-option/); 
     28    $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ if ($line =~ /fo:block><fo:block wrap-option/); 
    2929    # Add margin and padding to syntax examples. 
    30     $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ 
    31                               if ($line =~ /^<fo:block wrap-option/); 
     30    $line =~ s/border-style/margin="2pt" padding="2pt" border-style/ if ($line =~ /^<fo:block wrap-option/); 
    3231    # Fix the disappearing trademark problem. 
    3332    $line =~ s/\(YAML\)/(YAML&#8482;)/g; 
     
    4039        $line =~ s/key="((?:[^" ]+ )+)[ ]+/key="$1/; 
    4140    } 
     41    # Get rid of the non-ASCII characters. 
     42    $line =~ s/\302?\240/&#160;/g; # nbsp 
     43    $line =~ s/\302?\251/&#169;/g; # copyright 
     44    $line =~ s/\302?\260/&#176;/g; # deg 
     45    $line =~ s/\302?\267/&#183;/g; # middot 
     46    $line =~ s/\303?\327/&#215;/g; # times 
     47    $line =~ s/d[^ ]*t Net/d&#246;t Net/g; # ouml 
     48 
     49    $in_final_tables++ if $line =~ /10.2.2.&#160;Resolution</; 
     50    $line =~ s/column-number="1"\//column-number="1" column-width="60%"\// if $in_final_tables > 1; 
     51    $line =~ s/column-number="2"\//column-number="2" column-width="40%"\// if $in_final_tables > 1; 
    4252 
    4353    print $line; 
  • trunk/spec/preprocess_html.pl

    r7 r8  
    1616  $line =~ s/width="30%"/class="productioncomment"/g; 
    1717  $line =~ s/Symbols/Indicators/g; 
     18  $line =~ s/<table border="1">/<table border="0" style="width: 0%">/g; 
     19  $line =~ s/em>/b>/g if $line =~ /<em>(Byte|Encoding)/; 
    1820 
    1921  $table_depth++ if $line =~ /<table/; 
  • trunk/spec/spec.dbk

    r7 r8  
    88    <title> 
    99YAML&nbsp;Ain<q/>t&nbsp;Markup&nbsp;Language&nbsp;(<trademark>YAML</trademark>) 
    10       Version&nbsp;1.1 
     10      Version&nbsp;1.2 
    1111    </title> 
    1212 
    1313    <subtitle> 
    14       Working&nbsp;Draft&nbsp;2008-04-06 
     14      Working&nbsp;Draft&nbsp;2008-05-11 
    1515    </subtitle> 
    1616 
     
    5252      <ulink url="http://yaml.org/spec/cvs/current.ps">ps</ulink>, 
    5353      <ulink url="http://yaml.org/spec/cvs/current.pdf">pdf</ulink>.<sbr/> 
    54 <!-- Only for posted revisions: 
    55       <ulink 
    56     url="http://yaml.org/spec/history/????-??-??/????-??-??.html">html</ulink>, 
    57       <ulink 
    58         url="http://yaml.org/spec/history/????-??-??/????-??-??.ps">ps</ulink>, 
    59       <ulink 
    60 url="http://yaml.org/spec/history/????-??-??/????-??-??.pdf">pdf</ulink>.<sbr/> 
    61 --> 
    62 <!-- Only for CVS revisions: 
    63       <ulink url="http://yaml.org/spec/cvs/current.html">html</ulink>, 
    64       <ulink url="http://yaml.org/spec/cvs/current.ps">ps</ulink>, 
    65       <ulink url="http://yaml.org/spec/cvs/current.pdf">pdf</ulink>.<sbr/> 
    66  
    67       <emphasis>Latest version:</emphasis> 
    68       <ulink url="http://yaml.org/spec/current.html">html</ulink>, 
    69       <ulink url="http://yaml.org/spec/current.ps">ps</ulink>, 
    70       <ulink url="http://yaml.org/spec/current.pdf">pdf</ulink>. 
    71 --> 
    7254    </releaseinfo> 
    7355 
     
    10486        url="http://www.unicode.org/">Unicode standard for characters</ulink>, 
    10587        this specification provides all the information necessary to understand 
    106         YAML Version 1.1 and to create programs that process YAML information. 
     88        YAML Version 1.2 and to create programs that process YAML information. 
    10789      </para> 
    10890    </abstract> 
     
    244226        (RFC2045), YAML<q/>s top-level production is a <refterm 
    245227        primary="stream">stream</refterm> of independent <refterm 
    246         primary="document">documents</refterm>; ideal for message-based 
     228        primary="document">documents</refterm>, ideal for message-based 
    247229        distributed processing systems. 
    248230      </para> 
     
    330312        YAML was designed to support incremental interfaces that include both 
    331313        input (<uquote>getNextEvent()</uquote>) and output 
    332         <uquote>sendNextEvent()</uquote>) one-pass interfaces. Together, these 
     314        (<uquote>sendNextEvent()</uquote>) one-pass interfaces. Together, these 
    333315        enable YAML to support the processing of large <refterm 
    334316        primary="document">documents</refterm> (e.g. transaction logs) or 
     
    392374        is also the case in practice; every JSON file is also a valid YAML 
    393375        file. This makes it easy to migrate from JSON to YAML if/when the 
    394         additional features are requitred. 
     376        additional features are required. 
    395377      </para> 
    396378 
     
    431413              The word <emphasis>may</emphasis>, or the adjective 
    432414              <emphasis>optional</emphasis>, mean that conforming YAML <refterm 
    433               primary="processor">processors</refterm> are permitted, but 
     415              primary="processor">processors</refterm> are permitted to, but 
    434416              <defterm primary="need not">need not</defterm> behave as 
    435417              described. 
     
    472454      model and the YAML text format. The bulk of the document, chapters <link 
    473455      linkend="Syntax">4</link> through <link linkend="YAML">9</link>, formally 
    474       define this text format. 
     456      define this text format. Finally, chapter <link 
     457      linkend="Syntax">10</link> recommends basic YAML schemas. 
    475458    </para> 
    476459  </chapter> 
     
    619602      <keep-together> 
    620603        <para> 
    621           YAML uses three dashes&nbsp;(<refterm primary="document boundary 
    622           marker"><uquote>---</uquote></refterm>) to separate <refterm 
    623           primary="document">documents</refterm> within a <refterm 
    624           primary="stream">stream</refterm>. Three dots&nbsp;( <refterm 
    625           primary="document boundary marker"><uquote>...</uquote></refterm>) 
    626           indicate the end of a document without starting a new one, for use in 
    627           communication channels. <refterm primary="comment">Comments</refterm> 
    628           begin with an octothorpe (also called a <quote>hash</quote>, 
    629           <quote>sharp</quote>, <quote>pound</quote>, or <quote>number 
    630           sign</quote> - <refterm primary="# comment"> 
    631           <uquote>#</uquote></refterm>). 
     604          YAML uses three dashes&nbsp;(<refterm primary="document" 
     605          secondary="boundary marker"><uquote>---</uquote></refterm>) to 
     606          separate <refterm primary="document">documents</refterm> within a 
     607          <refterm primary="stream">stream</refterm>. Three dots&nbsp;( 
     608          <refterm primary="document" secondary="boundary 
     609          marker"><uquote>...</uquote></refterm>) indicate the end of a 
     610          document without starting a new one, for use in communication 
     611          channels. <refterm primary="comment">Comments</refterm> begin with an 
     612          octothorpe (also called a <quote>hash</quote>, <quote>sharp</quote>, 
     613          <quote>pound</quote>, or <quote>number sign</quote> - <refterm 
     614          primary="# comment"> <uquote>#</uquote></refterm>). 
    632615        </para> 
    633616 
     
    677660      <keep-together> 
    678661        <para> 
    679           Repeated <refterm primary="node">nodes</refterm> are first <refterm 
    680           primary="alias" secondary="identified">identified</refterm> by an 
    681           <refterm primary="anchor">anchor</refterm> (marked with the 
     662          Repeated <refterm primary="node">nodes</refterm> (objects) are first 
     663          <refterm primary="alias" secondary="identified">identified</refterm> 
     664          by an <refterm primary="anchor">anchor</refterm> (marked with the 
    682665          ampersand&nbsp;-&nbsp;<refterm primary="&amp; 
    683666          anchor"><uquote>&amp;</uquote></refterm>), and are then <refterm 
     
    816799            <example> 
    817800              <title> 
    818                 In the plain scalar,<sbr/> 
     801                In the folded scalars,<sbr/> 
    819802                newlines become spaces 
    820803              </title> 
    821 <programlisting>---<sbr/> 
     804<programlisting>--- &gt;<sbr/> 
    822805  Mark McGwire's 
    823806  year was crippled 
     
    890873<programlisting>unicode: "Sosa did fine.\u263A"<sbr/> 
    891874control: "\b1998\t1999\t2000\n" 
    892 hexesc: "\x0d\x0a is \r\n" 
     875hex esc: "\x0d\x0a is \r\n" 
    893876 
    894877single: '"Howdy!" he cried.' 
     
    937920          and <ulink 
    938921          url="http://yaml.org/type/null.html"><uquote>null</uquote></ulink> 
    939           types. The repository includes additional types such as <ulink 
    940           url="http://yaml.org/type/binary.html" 
     922          types. The <refterm primary="tag" 
     923          secondary="repository">repository</refterm> includes additional types 
     924          such as <ulink url="http://yaml.org/type/binary.html" 
    941925          ><uquote>binary</uquote></ulink>, <ulink 
    942926          url="http://yaml.org/type/bool.html"><uquote>bool</uquote></ulink>, 
     
    12421226 
    12431227      <para> 
    1244         This section details the processes shown in the diagram above. Note a 
    1245         YAML <refterm primary="processor">processor</refterm> need not provide 
    1246         all these processes. For example, a YAML library may provide only YAML 
    1247         input ability, for loading configuration files, or only output ability, 
    1248         for sending data to other <refterm 
     1228        This section details the processes shown in the diagram above. Note 
     1229        that a YAML <refterm primary="processor">processor</refterm> need not 
     1230        provide all these processes. For example, a YAML library may provide 
     1231        only YAML input ability, for loading configuration files, or only 
     1232        output ability, for sending data to other <refterm 
    12491233        primary="application">applications</refterm>. 
    12501234      </para> 
     
    14171401      </sect2> 
    14181402    </sect1> 
     1403 
     1404    <pagebreak/> 
    14191405 
    14201406    <sect1> 
     
    14701456      </figure> 
    14711457 
     1458      <pagebreak/> 
     1459 
    14721460      <sect2> 
    14731461        <title>Representation Graph</title> 
     
    15781566            a unified collections view for sequences and mappings is helpful 
    15791567            both for theoretical analysis and for creating practical YAML tools 
    1580             and APIs. This strategy is also used by the JavaScript programming 
     1568            and APIs. This strategy is also used by the Javascript programming 
    15811569            language. 
    15821570          </para> 
    15831571        </sect3> 
    1584  
    1585         <pagebreak/> 
    15861572 
    15871573        <sect3> 
     
    16331619            primary="sequence">sequence</refterm>, or <refterm 
    16341620            primary="mapping">mapping</refterm>). <refterm 
    1635             primary="scalar">Scalar</refterm> tags must also provide mechanism 
    1636             for converting <refterm primary="scalar" secondary="content 
    1637             format">formatted scontent</refterm> to a <refterm primary="scalar" 
    1638             secondary="canonical form">canonical form</refterm> for supporting 
    1639             <refterm primary="equality">equality</refterm> testing. 
    1640             Furthermore, a tag may provide additional information such as the 
    1641             set of allowed <refterm primary="content">content</refterm> values 
    1642             for validation, a mechanism for <refterm primary="tag" 
    1643             secondary="resolution">tag resolution</refterm>, or any other data 
    1644             that is applicable to all of the tag<q/>s <refterm 
    1645             primary="node">nodes</refterm>. 
     1621            primary="scalar">Scalar</refterm> tags must also provide a 
     1622            mechanism for converting <refterm primary="scalar" 
     1623            secondary="content format">formatted content</refterm> to a 
     1624            <refterm primary="scalar" secondary="canonical form">canonical 
     1625            form</refterm> for supporting <refterm 
     1626            primary="equality">equality</refterm> testing. Furthermore, a tag 
     1627            may provide additional information such as the set of allowed 
     1628            <refterm primary="content">content</refterm> values for validation, 
     1629            a mechanism for <refterm primary="tag" secondary="resolution">tag 
     1630            resolution</refterm>, or any other data that is applicable to all 
     1631            of the tag<q/>s <refterm primary="node">nodes</refterm>. 
    16461632          </para> 
    16471633        </sect3> 
     
    17511737          To express a YAML <refterm 
    17521738          primary="representation">representation</refterm> using a serial API, 
    1753           it necessary to impose an <refterm primary="key" 
     1739          it is necessary to impose an <refterm primary="key" 
    17541740          secondary="order">order</refterm> on <refterm primary="key" >mapping 
    17551741          keys</refterm> and employ <refterm primary="alias">alias 
     
    18611847          contained in the same YAML character stream, as a series of <refterm 
    18621848          primary="document">documents</refterm> separated by <refterm 
    1863           primary="document boundary marker">document boundary 
     1849          primary="document" secondary="boundary marker">document boundary 
    18641850          markers</refterm>. Documents appearing in the same stream are 
    18651851          independent; that is, a <refterm primary="node">node</refterm> must 
     
    18771863          </mediaobject> 
    18781864        </figure> 
     1865 
     1866        <pagebreak/> 
    18791867 
    18801868        <sect3> 
     
    21302118 
    21312119        <para> 
    2132           Note resolution must not consider <refterm primary="presentation" 
    2133           secondary="detail">presentation details</refterm> such as <refterm 
     2120          Note that resolution must not consider <refterm 
     2121          primary="presentation" secondary="detail">presentation 
     2122          details</refterm> such as <refterm 
    21342123          primary="comment">comments</refterm>, <refterm primary="space" 
    21352124          secondary="indentation">indentation</refterm> and <refterm 
     
    22152204          representation</refterm> graph. In such a case, the YAML <refterm 
    22162205          primary="processor">processor</refterm> may <refterm 
    2217           primary="compose">compose</refterm> an <refterm 
     2206          primary="compose">compose</refterm> a <refterm 
    22182207          primary="representation" secondary="partial">partial 
    22192208          representation</refterm>, based on each <refterm 
     
    22502239          of the <refterm primary="collection">collection<q/>s</refterm> data 
    22512240          type. However, such a <refterm primary="representation" 
    2252           secondary="complete">complete representation</refterm> can not be 
     2241          secondary="complete">complete representation</refterm> cannot be 
    22532242          used to <refterm primary="construct">construct</refterm> a <refterm 
    22542243          primary="native data structure">native data structure</refterm>. 
     
    22832272    <para> 
    22842273      The following chapters formally define the syntax of YAML character 
    2285       <refterm primary="stream">streams</refterm>, using (parameterized) BNF 
     2274      <refterm primary="stream">streams</refterm>, using (parametrized) BNF 
    22862275      productions. Each BNF production is both named and numbered for easy 
    22872276      reference. Whenever possible, basic structures are specified before the 
     
    24142403        YAML<q/>s syntax is designed for maximal human readability. This 
    24152404        requires parsing to depend on the surrounding text. For notational 
    2416         compactness, this dependency is expressed using parameterized BNF 
     2405        compactness, this dependency is expressed using parametrized BNF 
    24172406        productions. 
    24182407      </para> 
     
    25812570        </productionset> 
    25822571      </keep-together> 
     2572 
     2573      <keep-together> 
     2574        <para> 
     2575          To ensure <refterm primary="JSON compatibility">JSON 
     2576          compatibility</refterm>, YAML <refterm 
     2577          primary="processor">processors</refterm> must allow all non-control 
     2578          characters inside <refterm primary="style" secondary="flow" 
     2579          tertiary="double-quoted">quoted</refterm> <refterm primary="style" 
     2580          secondary="flow" tertiary="single-quoted">scalars</refterm>. On 
     2581          output, such characters should be <refterm primary="escaping" 
     2582          secondary="in double-quoted scalars">escaped</refterm> to ensure 
     2583          readability. 
     2584        </para> 
     2585 
     2586        <productionset> 
     2587          <production id="c-json"> 
     2588            <lhs>c-json</lhs> 
     2589            <rhs> 
     2590              #x9 | #xA | #xD | [#x20-#x10FFFF] 
     2591            </rhs> 
     2592          </production> 
     2593        </productionset> 
     2594      </keep-together> 
    25832595    </sect1> 
    25842596 
     
    25862598      <title>Character Encodings</title> 
    25872599 
     2600      <para> 
     2601        All characters mentioned in this specification are Unicode code points. 
     2602        Each such code point is written as one or more bytes depending on the 
     2603        <defterm primary="character encoding">character encoding</defterm> 
     2604        used. Note that in UTF-16, characters above 
     2605        <userinput>#xFFFF</userinput> are written as four bytes, using a 
     2606        surrogate pair. 
     2607      </para> 
     2608 
     2609      <para> 
     2610        The character encoding is a <refterm primary="presentation" 
     2611        secondary="detail">presentation detail</refterm> and must not be used 
     2612        to convey <refterm primary="content">content</refterm> information. 
     2613      </para> 
     2614 
     2615      <para> 
     2616        On input, a YAML <refterm primary="processor">processor</refterm> must 
     2617        support the UTF-8 and UTF-16 character encodings. For <refterm 
     2618        primary="JSON compatibility">JSON compatibility</refterm>, the UTF-32 
     2619        encodings must also be supported. 
     2620      </para> 
     2621 
     2622      <para> 
     2623        If a character <refterm primary="stream">stream</refterm> begins with a 
     2624        <defterm primary="byte order mark">byte order mark</defterm>, the 
     2625        character encoding will be taken to be as as indicated by the byte 
     2626        order mark. Otherwise, the <refterm primary="stream">stream</refterm> 
     2627        must begin with an ASCII character. This allows the encoding to be 
     2628        deduced by the pattern of null (<userinput>#x00</userinput>) 
     2629        characters. 
     2630      </para> 
     2631 
    25882632      <keep-together> 
    25892633        <para> 
    2590           All characters mentioned in this specification are Unicode code 
    2591           points. Each such code point is written as one or more bytes 
    2592           depending on the <defterm primary="character encoding">character 
    2593           encoding</defterm> used. Note that in UTF-16, characters above 
    2594           <userinput>#xFFFF</userinput> are written as four bytes, using a 
    2595           surrogate pair. 
     2634          The encoding can therefore be deduced by matching the first few bytes 
     2635          of the <refterm primary="stream">stream</refterm> with the following 
     2636          table rows (in order): 
    25962637        </para> 
    25972638 
     2639        <informaltable> 
     2640          <tgroup cols="6"> 
     2641            <tbody> 
     2642              <row> 
     2643                <entry>&nbsp;<emphasis>Byte0&nbsp;</emphasis></entry> 
     2644                <entry>&nbsp;<emphasis>Byte1&nbsp;</emphasis></entry> 
     2645                <entry>&nbsp;<emphasis>Byte2&nbsp;</emphasis></entry> 
     2646                <entry>&nbsp;<emphasis>Byte3&nbsp;</emphasis></entry> 
     2647                <entry>&nbsp;<emphasis>Encoding</emphasis></entry> 
     2648                <entry></entry> 
     2649              </row> 
     2650 
     2651              <row> 
     2652                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2653                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2654                <entry>&nbsp;<userinput>#xFE</userinput></entry> 
     2655                <entry>&nbsp;<userinput>#xFF</userinput></entry> 
     2656                <entry>&nbsp;UTF-32BE</entry> 
     2657                <entry>&nbsp;<emphasis>&nbsp;Explicit&nbsp;BOM</emphasis></entry> 
     2658              </row> 
     2659 
     2660              <row> 
     2661                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2662                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2663                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2664                <entry>&nbsp;<emphasis>any</emphasis></entry> 
     2665                <entry>&nbsp;UTF-32BE</entry> 
     2666                <entry>&nbsp;<emphasis>&nbsp;ASCII&nbsp;first&nbsp;character</emphasis></entry> 
     2667              </row> 
     2668 
     2669              <row> 
     2670                <entry>&nbsp;<userinput>#xFF</userinput></entry> 
     2671                <entry>&nbsp;<userinput>#xFE</userinput></entry> 
     2672                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2673                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2674                <entry>&nbsp;UTF-32LE</entry> 
     2675                <entry>&nbsp;<emphasis>&nbsp;Explicit&nbsp;BOM</emphasis></entry> 
     2676              </row> 
     2677 
     2678              <row> 
     2679                <entry>&nbsp;<emphasis>any</emphasis></entry> 
     2680                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2681                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2682                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2683                <entry>&nbsp;UTF-32LE</entry> 
     2684                <entry>&nbsp;<emphasis>&nbsp;ASCII&nbsp;first&nbsp;character</emphasis></entry> 
     2685              </row> 
     2686 
     2687              <row> 
     2688                <entry>&nbsp;<userinput>#xFE</userinput></entry> 
     2689                <entry>&nbsp;<userinput>#xFF</userinput></entry> 
     2690                <entry></entry> 
     2691                <entry></entry> 
     2692                <entry>&nbsp;UTF-16BE</entry> 
     2693                <entry>&nbsp;<emphasis>&nbsp;Explicit&nbsp;BOM</emphasis></entry> 
     2694              </row> 
     2695 
     2696              <row> 
     2697                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2698                <entry>&nbsp;<emphasis>any</emphasis></entry> 
     2699                <entry></entry> 
     2700                <entry></entry> 
     2701                <entry>&nbsp;UTF-16BE</entry> 
     2702                <entry>&nbsp;<emphasis>&nbsp;ASCII&nbsp;first&nbsp;character</emphasis></entry> 
     2703              </row> 
     2704 
     2705              <row> 
     2706                <entry>&nbsp;<userinput>#xFF</userinput></entry> 
     2707                <entry>&nbsp;<userinput>#xFE</userinput></entry> 
     2708                <entry></entry> 
     2709                <entry></entry> 
     2710                <entry>&nbsp;UTF-16LE</entry> 
     2711                <entry>&nbsp;<emphasis>&nbsp;Explicit&nbsp;BOM</emphasis></entry> 
     2712              </row> 
     2713 
     2714              <row> 
     2715                <entry>&nbsp;<emphasis>any</emphasis></entry> 
     2716                <entry>&nbsp;<userinput>#x00</userinput></entry> 
     2717                <entry></entry> 
     2718                <entry></entry> 
     2719                <entry>&nbsp;UTF-16LE</entry> 
     2720                <entry>&nbsp;<emphasis>&nbsp;ASCII&nbsp;first&nbsp;character</emphasis></entry> 
     2721              </row> 
     2722 
     2723              <row> 
     2724                <entry>&nbsp;<userinput>#xEF</userinput></entry> 
     2725                <entry>&nbsp;<userinput>#xBB</userinput></entry> 
     2726                <entry>&nbsp;<userinput>#xBF</userinput></entry> 
     2727                <entry></entry> 
     2728                <entry>&nbsp;UTF-8</entry> 
     2729                <entry>&nbsp;<emphasis>&nbsp;Explicit&nbsp;BOM</emphasis></entry> 
     2730              </row> 
     2731 
     2732              <row> 
     2733                <entry></entry> 
     2734                <entry></entry> 
     2735                <entry></entry> 
     2736                <entry></entry> 
     2737                <entry>&nbsp;UTF-8</entry> 
     2738                <entry>&nbsp;<emphasis>&nbsp;Default</emphasis></entry> 
     2739              </row> 
     2740            </tbody> 
     2741          </tgroup> 
     2742        </informaltable> 
     2743      </keep-together> 
     2744 
    25982745        <para> 
    2599           On input, a YAML <refterm primary="processor">processor</refterm> 
    2600           must support the UTF-8 and UTF-16 character encodings. If a character 
    2601           <refterm primary="stream">stream</refterm> does not begin with a 
    2602           <defterm primary="byte order mark">byte order mark</defterm> 
    2603           (<userinput>#FEFF</userinput>), the character encoding will be taken 
    2604           to be UTF-8. Otherwise it shall be either UTF-8, UTF-16 LE, or UTF-16 
    2605           BE as indicated by the byte order mark. 
     2746          The recommended output encoding is UTF-8. If another encoding is 
     2747          used, it is recommended that an explicit byte order mark be used, 
     2748          even if the first <refterm primary="stream">stream</refterm> 
     2749          character is ASCII. 
    26062750        </para> 
    26072751 
     2752      <keep-together> 
    26082753        <para> 
    2609           On output, it is recommended that a byte order mark should only be 
    2610           emitted for UTF-16 character encodings. 
    2611         </para> 
    2612  
    2613         <para> 
    2614           Note that the UTF-32 encoding is explicitly not supported. For more 
    2615           information about the byte order mark and the Unicode character 
    2616           encoding schemes see the <ulink 
     2754          For more information about the byte order mark and the Unicode 
     2755          character encoding schemes see the <ulink 
    26172756          url="http://www.unicode.org/unicode/faq/utf_bom.html">Unicode 
    26182757          FAQ</ulink>. 
    2619         </para> 
    2620  
    2621         <para> 
    2622           The character encoding is a <refterm primary="presentation" 
    2623           secondary="detail">presentation detail</refterm> and must not be used 
    2624           to convey <refterm primary="content">content</refterm> information. 
    26252758        </para> 
    26262759 
     
    27652898            </member> 
    27662899            <member> 
    2767 <programlisting>%YAML 1.1<sbr/> 
     2900<programlisting>%YAML 1.2<sbr/> 
    27682901--- 
    27692902!!map { 
     
    28963029            </member> 
    28973030            <member> 
    2898 <programlisting>%YAML 1.1<sbr/> 
     3031<programlisting>%YAML 1.2<sbr/> 
    28993032--- 
    29003033!!map { 
     
    29503083      </example> 
    29513084 
     3085      <pagebreak/> 
     3086 
    29523087      <simplelist type="horiz" columns="2"> 
    29533088        <member> 
     
    30103145          primary="tag" secondary="local">local tags</refterm>; and as the 
    30113146          <refterm primary="tag" secondary="non-specific">non-specific 
    3012           tag</refterm> for <refterm primary="collection">collections</refterm> 
    3013           and non-<refterm primary="style" secondary="flow" 
     3147          tag</refterm> for non-<refterm primary="style" secondary="flow" 
    30143148          tertiary="plain">plain</refterm> scalars. 
    30153149        </member> 
     
    30293163