Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ A reference to a _term_ looks like this.
Updates to this specification will not change
the syntactical meaning, the runtime output, or other behaviour
of valid messages written for earlier versions of this specification
that only use functions and expression attributes defined in this specification.
that only use functions defined in this specification.
Updates to this specification will not remove any syntax provided in this version.
Future versions MAY add additional structure or meaning to existing syntax.

Expand Down
12 changes: 0 additions & 12 deletions spec/data-model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,33 +136,24 @@ interface LiteralExpression {
type: "expression";
arg: Literal;
annotation?: FunctionAnnotation | UnsupportedAnnotation;
attributes?: Attribute[];
}

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

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

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

interface Attribute {
name: string;
value?: Literal | VariableRef;
}
```

Expand Down Expand Up @@ -251,22 +242,19 @@ interface MarkupOpen {
kind: "open";
name: string;
options?: Option[];
attributes?: Attribute[];
}

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

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

Expand Down
9 changes: 3 additions & 6 deletions spec/data-model/message.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<!ELEMENT pattern (#PCDATA | expression | markup)*>

<!ELEMENT expression (
((literal | variable), (functionAnnotation | unsupportedAnnotation)?, attribute*) |
((functionAnnotation | unsupportedAnnotation), attribute*)
((literal | variable), (functionAnnotation | unsupportedAnnotation)?) |
functionAnnotation | unsupportedAnnotation
)>

<!ELEMENT literal (#PCDATA)>
Expand All @@ -43,11 +43,8 @@
<!ELEMENT unsupportedAnnotation (#PCDATA)>
<!ATTLIST unsupportedAnnotation sigil CDATA #REQUIRED>

<!ELEMENT attribute (literal | variable)?>
<!ATTLIST attribute name NMTOKEN #REQUIRED>

<!-- A <markup kind="close"> MUST NOT contain any <option> elements -->
<!ELEMENT markup (option*, attribute*)>
<!ELEMENT markup (option)*>
<!ATTLIST markup
kind (open | standalone | close) #REQUIRED
name NMTOKEN #REQUIRED
Expand Down
37 changes: 7 additions & 30 deletions spec/data-model/message.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,6 @@
"required": ["name", "value"]
}
},
"attributes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": { "type": "string" },
"value": {
"oneOf": [
{ "$ref": "#/$defs/literal" },
{ "$ref": "#/$defs/variable" }
]
}
},
"required": ["name"]
}
},

"function-annotation": {
"type": "object",
Expand Down Expand Up @@ -87,8 +71,7 @@
"properties": {
"type": { "const": "expression" },
"arg": { "$ref": "#/$defs/literal" },
"annotation": { "$ref": "#/$defs/annotation" },
"attributes": { "$ref": "#/$defs/attributes" }
"annotation": { "$ref": "#/$defs/annotation" }
},
"required": ["type", "arg"]
},
Expand All @@ -97,26 +80,23 @@
"properties": {
"type": { "const": "expression" },
"arg": { "$ref": "#/$defs/variable" },
"annotation": { "$ref": "#/$defs/annotation" },
"attributes": { "$ref": "#/$defs/attributes" }
"annotation": { "$ref": "#/$defs/annotation" }
},
"required": ["type", "arg"]
},
"function-expression": {
"type": "object",
"properties": {
"type": { "const": "expression" },
"annotation": { "$ref": "#/$defs/function-annotation" },
"attributes": { "$ref": "#/$defs/attributes" }
"annotation": { "$ref": "#/$defs/function-annotation" }
},
"required": ["type", "annotation"]
},
"unsupported-expression": {
"type": "object",
"properties": {
"type": { "const": "expression" },
"annotation": { "$ref": "#/$defs/unsupported-annotation" },
"attributes": { "$ref": "#/$defs/attributes" }
"annotation": { "$ref": "#/$defs/unsupported-annotation" }
},
"required": ["type", "annotation"]
},
Expand All @@ -135,8 +115,7 @@
"type": { "const": "markup" },
"kind": { "const": "open" },
"name": { "type": "string" },
"options": { "$ref": "#/$defs/options" },
"attributes": { "$ref": "#/$defs/attributes" }
"options": { "$ref": "#/$defs/options" }
},
"required": ["type", "kind", "name"]
},
Expand All @@ -146,8 +125,7 @@
"type": { "const": "markup" },
"kind": { "const": "standalone" },
"name": { "type": "string" },
"options": { "$ref": "#/$defs/options" },
"attributes": { "$ref": "#/$defs/attributes" }
"options": { "$ref": "#/$defs/options" }
},
"required": ["type", "kind", "name"]
},
Expand All @@ -156,8 +134,7 @@
"properties": {
"type": { "const": "markup" },
"kind": { "const": "close" },
"name": { "type": "string" },
"attributes": { "$ref": "#/$defs/attributes" }
"name": { "type": "string" }
},
"required": ["type", "kind", "name"]
},
Expand Down