On Mon, Nov 19, 2001 at 03:06:00AM -0500, Clark C . Evans wrote:
| A node is the base construct of the YAML information
| model. For the definition below, both a value and a
| type family are an ordered set of unicode characters.
| A node has:
| - a type family
| - a value
| A node pair consists of
| - a node called "key"
| - a node called "value"
| A collection is a node that additionally has:
| - an unordered (possibly empty) set of
| node paris such that the value of
| the key for each pair is unique
| within the set.
Let me explain a bit more. I was leaving "value"
as a property of every node so that I could
allow a collection to participate as a key
in another collection. If you don't mandate
that every collection has a value, you have
to distinguish between those collections which
are hashable or not.
I was thinking (perhaps niavely?) that the
value of each collection could (as a default
perhaps) be the canonical YAML of it's membership.
However, this may not work since some collections
contain themselves... if we define the canonical
form to start with an anchor, this shouldn't
be a problem. Thoughts?
Of course, I was thinking that what ever the
"default" may be (canonical form), it could
be overriden by providing an "=" key.