From: Clark C . E. <cc...@cl...> - 2001-05-19 06:00:40
|
Earlier I had thought that RFC822 forced condensation of consecutive white spaces into a single space like HTML. Since I was only 1/2 right (true for structured headers) and since the 1/2 that I was right about matters little to us, this requires some re-thinking. Furthermore, I've been unhappy about the "quoted string" thingy. Yucko. Therefore, below is the new scalar value proposal. ... There are three syntax forms for scalar values, "block", "stream", and "mime" which are used to accomidate differing needs for expressing content. The block form specializes in pre-formatted or raw text, the stream form works well for unformatted content, the mime form is ideal for binary values or very large chunks of formatted text. In the block form: a) trailing whitespace is significant b) end of line marker is also significant c) there is not a quoting or escaping mechanism d) each line must begin with the block symbol, which is currently "|" e) a slash character can be used in place of the block symbol for the very last line to indicate that the block does not terminate with an end-of-line marker. In the stream form: a) leading/trailing whitespace is not significant b) the end of line marker is also not significant c) consecutive whitespaces bounded by printable characters are significant d) standard slash style \n, \t, \\ style escaping is provided e) a trailing slash is used to indicate that the last character of a line and the first character of the next line are ajacent without an intermediate space In the mime form: a) the entire content is included as a seperate MIME section and may be transfer-encoded using base64 or quoted-printable b) the content is assigned an identifier c) this identifier can be used to provide a reference to the content within the YAML proper Examples of the block form include: a: | This line does not need \ escaping. b: |This is a block form |with two end of line markers. c: | | X | X X | X X X | | This one has a leading | carriage return and | does not have a trailing \ end of line marker. Examples of stream form include: a: This is a simple one liner b: This has intermediate spaces. c: This is a multi line value that wraps\taround and\n uses an end of line marker. d: \n X \n X X \n X X X \n \n This one is just like "c" above. \n Except that \\ escaping is required. An example of the mime form is... Date: Sun, 13 May 2001 23:48:04 -0400 MIME-Version: 1.0 Content-Type: multipart/related; boundary="================================" X-YAML-Version: 1.0 --================================ Content-Type: text/plain; id="0001" XX XXX XXXXX XX XX XXX XX X XX X XX XX XXXXXX XX X XX XX X XX XXXXXXX XXXX XXXXX X XX XX --================================ Content-Type: text/x-yaml raw: *(0001) --================================-- |