root/trunk/spec/map.dbk

Revision 7, 3.5 KB (checked in by oren, 8 months ago)

April 06, 2008 draft.

Implemented by YamlReference? 0.9.

Contains new productions, new examples, all the changes collected throughout
the last 3 years, and of course JSON compatibility.

Line 
1<?xml version="1.0"?>
2<!DOCTYPE article
3  PUBLIC "-//OASIS//DTD DocBook V4.2//EN"
4         "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
5
6<article>
7  <articleinfo>
8    <title>
9      Unordered Mapping Language-Independent Type for
10      <trademark>YAML</trademark>&nbsp;Version&nbsp;1.1
11    </title>
12
13    <subtitle>
14      Working Draft 2005-01-18
15    </subtitle>
16
17    <authorgroup>
18      <author>
19        <firstname>Oren</firstname>
20        <surname>Ben-Kiki</surname>
21        <email>oren@ben-kiki.org</email>
22      </author>
23
24      <author>
25        <firstname>Clark</firstname>
26        <surname>Evans</surname>
27        <email>cce+yaml@clarkevans.com</email>
28      </author>
29
30      <author>
31        <firstname>Brian</firstname>
32        <surname>Ingerson</surname>
33        <email>ingy@ttul.org</email>
34      </author>
35    </authorgroup>
36
37    <copyright>
38      <year>2001-2005</year>
39      <holder>Oren Ben-Kiki<fo>,&nbsp;</fo></holder>
40      <holder>Clark Evans<fo>,&nbsp;</fo></holder>
41      <holder>Brian Ingerson</holder>
42    </copyright>
43
44    <legalnotice>
45      This document may be freely copied provided it is not modified.
46    </legalnotice>
47
48    <abstract>
49      <title>Status</title>
50
51      <para>
52       This specification is a draft reflecting consensus reached by members of
53       the <ulink
54       url="http://lists.sourceforge.net/lists/listinfo/yaml-core">yaml-core
55       mailing list</ulink>. Any questions regarding this draft should be
56       raised on this list.
57      </para>
58    </abstract>
59  </articleinfo>
60
61  <section>
62    <title><anchor id="type-map" />Mapping</title>
63
64    <variablelist>
65      <varlistentry>
66        <term>
67          <para>
68            URI:
69          </para>
70        </term>
71
72        <listitem>
73          <para>
74            <userinput>tag:yaml.org,2002:map</userinput>
75          </para>
76        </listitem>
77      </varlistentry>
78
79      <varlistentry>
80        <term>
81          <para>
82            Shorthand:
83          </para>
84        </term>
85
86        <listitem>
87          <para>
88            <userinput>!!map</userinput>
89          </para>
90        </listitem>
91      </varlistentry>
92
93      <varlistentry>
94        <term>
95          <para>
96            Kind:
97          </para>
98        </term>
99
100        <listitem>
101          <para>
102            Mapping.
103          </para>
104        </listitem>
105      </varlistentry>
106
107      <varlistentry>
108        <term>
109          <para>
110            Definition:
111          </para>
112        </term>
113
114        <listitem>
115          <para>
116            Associative container, where each key is unique in the association
117            and mapped to exactly one value.  YAML places no restrictions on
118            the type of keys; in particular, they are not restricted to being
119            scalars. Example bindings include Perl&#8217;s hash, Python&#8217;s
120            dictionary, and Java&#8217;s Hashtable.
121          </para>
122        </listitem>
123      </varlistentry>
124
125      <varlistentry>
126        <term>
127          <para>
128            Resolution and Validation:
129          </para>
130        </term>
131
132
133        <listitem>
134          <para>
135            This tag accepts all mapping values. It is is typically used as
136            the fall-back tag for mapping nodes.
137          </para>
138        </listitem>
139      </varlistentry>
140    </variablelist>
141    <example>
142      <title><userinput>!!map</userinput> Examples</title>
143<programlisting>
144# Unordered set of key: value pairs.
145Block style: !!map
146  Clark : Evans
147  Brian : Ingerson
148  Oren  : Ben-Kiki
149Flow style: !!map { Clark: Evans, Brian: Ingerson, Oren: Ben-Kiki }
150</programlisting>
151    </example>
152  </section>
153</article>
Note: See TracBrowser for help on using the browser.