| 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 | Sequence Language-Independent Type for |
|---|
| 10 | <trademark>YAML</trademark> Version 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>, </fo></holder> |
|---|
| 40 | <holder>Clark Evans<fo>, </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-seq" />Sequence</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:seq</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>!!seq</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 | Sequence. |
|---|
| 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 | Collections indexed by sequential integers starting with zero. |
|---|
| 117 | Example bindings include the Perl array, Python’s list or |
|---|
| 118 | tuple, and Java’s array or vector. |
|---|
| 119 | </para> |
|---|
| 120 | </listitem> |
|---|
| 121 | </varlistentry> |
|---|
| 122 | |
|---|
| 123 | <varlistentry> |
|---|
| 124 | <term> |
|---|
| 125 | <para> |
|---|
| 126 | Resolution and Validation: |
|---|
| 127 | </para> |
|---|
| 128 | </term> |
|---|
| 129 | |
|---|
| 130 | |
|---|
| 131 | <listitem> |
|---|
| 132 | <para> |
|---|
| 133 | This tag accepts all sequence values. It is is typically used as |
|---|
| 134 | the fall-back tag for sequence nodes. |
|---|
| 135 | </para> |
|---|
| 136 | </listitem> |
|---|
| 137 | </varlistentry> |
|---|
| 138 | </variablelist> |
|---|
| 139 | |
|---|
| 140 | <example> |
|---|
| 141 | <title><userinput>!!seq</userinput> Examples</title> |
|---|
| 142 | <programlisting> |
|---|
| 143 | # Ordered sequence of nodes |
|---|
| 144 | Block style: !!seq |
|---|
| 145 | - Mercury # Rotates - no light/dark sides. |
|---|
| 146 | - Venus # Deadliest. Aptly named. |
|---|
| 147 | - Earth # Mostly dirt. |
|---|
| 148 | - Mars # Seems empty. |
|---|
| 149 | - Jupiter # The king. |
|---|
| 150 | - Saturn # Pretty. |
|---|
| 151 | - Uranus # Where the sun hardly shines. |
|---|
| 152 | - Neptune # Boring. No rings. |
|---|
| 153 | - Pluto # You call this a planet? |
|---|
| 154 | Flow style: !!seq [ Mercury, Venus, Earth, Mars, # Rocks |
|---|
| 155 | Jupiter, Saturn, Uranus, Neptune, # Gas |
|---|
| 156 | Pluto ] # Overrated |
|---|
| 157 | </programlisting> |
|---|
| 158 | </example> |
|---|
| 159 | </section> |
|---|
| 160 | </article> |
|---|