Skip to content

Commit 1c22bfc

Browse files
author
Z
committed
Add clarification to MSON element attributes
Clarify types in `content` and of `sample` and `default` attributes. Add explanation of `typeAttributes` as well as `variable` attribute.
1 parent 9a1a927 commit 1c22bfc

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

namespaces/mson-namespace.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Note: Not every MSON _Base Type_ is presented in Refract primitive types and vic
7272

7373
# MSON DOM Elements
7474

75-
## MSON Element (Element)
75+
## MSON Element (Element[*T*])
7676

7777
Base element for every MSON element.
7878

@@ -85,22 +85,28 @@ Note: In MSON DOM _Nested Member Types_ _Type Section_ is the `content` of the e
8585
- `attributes`
8686
- `typeAttributes` (array) - _Type Definition_ attributes list, see _Type Attribute_
8787
- (enum[string])
88-
- required
89-
- optional
90-
- fixed
91-
- sample
92-
- default
93-
- `variable` (boolean) - Element content is _Variable Value_
94-
- `sample` - Alternative sample value for _Member Types_
88+
- required - This element is required in parent's content
89+
- optional - This element is optional in parent's content
90+
- fixed - The `content` value is immutable.
91+
- sample - The `content` value is a sample value.
92+
- default - The `content` value is a default value.
9593

96-
The type of of `sample` attribute MUST match the type of element's `content`.
94+
- `variable` (boolean) - The `content` value is a _Variable Value_
9795

98-
- `default` - Default value for _Member Types_
96+
The `content` value is either a _Variable Type Name_, _Variable Value_ or _Variable Property Name_.
9997

100-
The type of of `default` attribute MUST match the type of element's `content`.
98+
- `sample` (array[T]) - Alternative sample value for _Member Types_
99+
100+
The type of items in `sample` array attribute MUST match the type of element's `content`.
101+
102+
- `default` (T) - Default value for _Member Types_
103+
104+
The type of of `default` attribute MUST match the type of element's `content`.
101105

102106
- `validation` - Not used, reserved for a future use
103107

108+
- `content` (T)
109+
104110
## Boolean Type (Boolean Element)
105111

106112
- Include [MSON Element][]

0 commit comments

Comments
 (0)