# Whitespace-Separated Values

Key: `container.array.whitespace_separated`

List separated by spaces or tabs: value1 value2 value3. Example: "one two three" or "1 2 3 4 5".

Page: <https://meridian.online/docs/projects/finetype/types/container/array/whitespace_separated>

Samples: `apple banana cherry`, `1 2 3 4 5`, `red	green	blue`

## Background

### Origin

FineType defines container.array.whitespace\_separated itself, as a list separated by spaces or tabs, such as one two three or 1 2 3 4 5.[[1]](https://raw.githubusercontent.com/meridian-online/finetype/main/labels/definitions_container.yaml) FineType's label definition notes that the whitespace separator is common in plain-text logs and Unix tools.[[1]](https://raw.githubusercontent.com/meridian-online/finetype/main/labels/definitions_container.yaml)

POSIX awk gives the FS variable a default value of a single space.[[2]](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html) When FS is a single space, POSIX awk skips leading and trailing blank and newline characters and delimits fields by sets of one or more blank or newline characters.[[2]](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html)

XML Schema Part 2: Datatypes Second Edition was published as a W3C Recommendation on 28 October 2004.[[3]](https://www.w3.org/TR/xmlschema-2/) XML Schema Part 2 defines the lexical space of a list datatype as a space-separated sequence of literals of the item type.[[3]](https://www.w3.org/TR/xmlschema-2/) The HTML Standard defines a set of space-separated tokens as a string of zero or more tokens separated by one or more ASCII whitespace.[[4]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) The HTML Standard allows a string holding a set of space-separated tokens to have leading or trailing ASCII whitespace.[[4]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) The WHATWG Infra Standard defines ASCII whitespace as U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE.[[5]](https://infra.spec.whatwg.org/) The HTML Standard requires the class attribute, when specified, to have a value that is a set of space-separated tokens.[[6]](https://html.spec.whatwg.org/multipage/dom.html)

### Use

The HTML Standard distinguishes an unordered set of unique space-separated tokens from an ordered set of unique space-separated tokens, in which the order of the tokens is meaningful.[[4]](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) XML Schema Part 2 gives the example of a list of strings whose three lines of text form a list of length 18, not 3, because list items are separated at space boundaries.[[3]](https://www.w3.org/TR/xmlschema-2/)

Python's str.split, called with no separator, treats runs of consecutive whitespace as a single separator and returns no empty strings at the start or end for leading or trailing whitespace.[[7]](https://docs.python.org/3/library/stdtypes.html) Python's documentation shows '   1   2   3   '.split() returning \['1', '2', '3'\].[[7]](https://docs.python.org/3/library/stdtypes.html)

## Sources

1. [definitions\_container.yaml](https://raw.githubusercontent.com/meridian-online/finetype/main/labels/definitions_container.yaml) — FineType
2. [awk](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/awk.html) — standard
3. [XML Schema Part 2: Datatypes Second Edition](https://www.w3.org/TR/xmlschema-2/) — standard
4. [HTML Standard](https://html.spec.whatwg.org/multipage/common-microsyntaxes.html) — standard
5. [Infra Standard](https://infra.spec.whatwg.org/) — standard
6. [HTML Standard](https://html.spec.whatwg.org/multipage/dom.html) — standard
7. [Built-in Types — Python 3.15.0 documentation](https://docs.python.org/3/library/stdtypes.html) — documentation
