Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions spec/data-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ Two equivalent definitions of the data model are also provided:
- [`message.dtd`](./message.dtd) is a document type definition (DTD),
for use with message data encoded as XML.

Note that while the data model description below is the canonical one,
the JSON and DTD definitions are intended for interchange between systems and processors.
To that end, they include some relaxations such as the declarations, options, and attributes
being optional rather than required properties.

## Messages

A `SelectMessage` corresponds to a syntax message that includes _selectors_.
Expand Down Expand Up @@ -136,28 +141,28 @@ interface LiteralExpression {
type: "expression";
arg: Literal;
annotation?: FunctionAnnotation | UnsupportedAnnotation;
attributes?: Attribute[];
attributes: Attribute[];
}

interface VariableExpression {
type: "expression";
arg: VariableRef;
annotation?: FunctionAnnotation | UnsupportedAnnotation;
attributes?: Attribute[];
attributes: Attribute[];
}

interface FunctionExpression {
type: "expression";
arg?: never;
annotation: FunctionAnnotation;
attributes?: Attribute[];
attributes: Attribute[];
}

interface UnsupportedExpression {
type: "expression";
arg?: never;
annotation: UnsupportedAnnotation;
attributes?: Attribute[];
attributes: Attribute[];
}

interface Attribute {
Expand Down Expand Up @@ -199,7 +204,7 @@ Each _option_ is represented by an `Option`.
interface FunctionAnnotation {
type: "function";
name: string;
options?: Option[];
options: Option[];
}

interface Option {
Expand Down Expand Up @@ -250,23 +255,23 @@ interface MarkupOpen {
type: "markup";
kind: "open";
name: string;
options?: Option[];
attributes?: Attribute[];
options: Option[];
attributes: Attribute[];
}

interface MarkupStandalone {
type: "markup";
kind: "standalone";
name: string;
options?: Option[];
attributes?: Attribute[];
options: Option[];
attributes: Attribute[];
}

interface MarkupClose {
type: "markup";
kind: "close";
name: string;
attributes?: Attribute[];
attributes: Attribute[];
}
```

Expand Down