8000 Remove expression attributes from the data model · unicode-org/message-format-wg@26aac07 · GitHub
[go: up one dir, main page]

Skip to content

Commit 26aac07

Browse files
committed
Remove expression attributes from the data model
1 parent 551b5f7 commit 26aac07

File tree

4 files changed

+11
-49
lines changed

4 files changed

+11
-49
lines changed

spec/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ A reference to a _term_ looks like this.
8484
Updates to this specification will not change
8585
the syntactical meaning, the runtime output, or other behaviour
8686
of valid messages written for earlier versions of this specification
87-
that only use functions and expression attributes defined in this specification.
87+
that only use functions defined in this specification.
8888
Updates to this specification will not remove any syntax provided in this version.
8989
Future versions MAY add additional structure or meaning to existing syntax.
9090

spec/data-model/README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,33 +136,24 @@ interface LiteralExpression {
136136
type: "expression";
137137
arg: Literal;
138138
annotation?: FunctionAnnotation | UnsupportedAnnotation;
139-
attributes?: Attribute[];
140139
}
141140

142141
interface VariableExpression {
143142
type: "expression";
144143
arg: VariableRef;
145144
annotation?: FunctionAnnotation | UnsupportedAnnotation;
146-
attributes?: Attribute[];
147145
}
148146

149147
interface FunctionExpression {
150148
type: "expression";
151149
arg?: never;
152150
annotation: FunctionAnnotation;
153-
attributes?: Attribute[];
154151
}
155152

156153
interface UnsupportedExpression {
157154
type: "expression";
158155
arg?: never;
159156
annotation: UnsupportedAnnotation;
160-
attributes?: Attribute[];
161-
}
162-
163-
interface Attribute {
164-
name: string;
165-
value?: Literal | VariableRef;
166157
}
167158
```
168159

@@ -251,22 +242,19 @@ interface MarkupOpen {
251242
kind: "open";
252243
name: string;
253244
options?: Option[];
254-
attributes?: Attribute[];
255245
}
256246

257247
interface MarkupStandalone {
258248
type: "markup";
259249
kind: "standalone";
260250
name: string;
261251
options?: Option[];
262-
attributes?: Attribute[];
263252
}
264253

265254
interface MarkupClose {
266255
type: "markup";
267256
kind: "close";
268257
name: string;
269-
attributes?: Attribute[];
270258
}
271259
```
272260

spec/data-model/message.dtd

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<!ELEMENT pattern (#PCDATA | expression | markup)*>
2525

2626
<!ELEMENT expression (
27-
((literal | variable), (functionAnnotation | unsupportedAnnotation)?, attribute*) |
28-
((functionAnnotation | unsupportedAnnotation), attribute*)
27+
((literal | variable), (functionAnnotation | unsupportedAnnotation)?) |
28+
functionAnnotation | unsupportedAnnotation
2929
)>
3030

3131
<!ELEMENT literal (#PCDATA)>
@@ -43,11 +43,8 @@
4343
<!ELEMENT unsupportedAnnotation (#PCDATA)>
4444
<!ATTLIST unsupportedAnnotation sigil CDATA #REQUIRED>
4545

46-
<!ELEMENT attribute (literal | variable)?>
47-
<!ATTLIST attribute name NMTOKEN #REQUIRED>
48-
4946
<!-- A <markup kind="close"> MUST NOT contain any <option> elements -->
50-
<!ELEMENT markup (option*, attribute*)>
47+
<!ELEMENT markup (option)*>
5148
<!ATTLIST markup
5249
kind (open | standalone | close) #REQUIRED
5350
name NMTOKEN #REQUIRED

spec/data-model/message.json

Lines changed: 7 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,6 @@
3838
"required": ["name", "value"]
3939
}
4040
},
41-
"attributes": {
42-
"type": "array",
43-
"items": {
44-
"type": "object",
45-
"properties": {
46-
"name": { "type": "string" },
47-
"value": {
48-
"oneOf": [
49-
{ "$ref": "#/$defs/literal" },
50-
{ "$ref": "#/$defs/variable" }
51-
]
52-
}
53-
},
54-
"required": ["name"]
55-
}
56-
},
5741

5842
"function-annotation": {
5943
"type": "object",
@@ -87,8 +71,7 @@
8771
"properties": {
8872
"type": { "const": "expression" },
8973
"arg": { "$ref": "#/$defs/literal" },
90-
"annotation": { "$ref": "#/$defs/annotation" },
91-
"attributes": { "$ref": "#/$defs/attributes" }
74+
"annotation": { "$ref": "#/$defs/annotation" }
9275
},
9376
"required": ["type", "arg"]
9477
},
@@ -97,26 +80,23 @@
9780
"properties": {
9881
"type": { "const": "expression" },
9982
"arg": { "$ref": "#/$defs/variable" },
100-
"annotation": { "$ref": "#/$defs/annotation" },
101-
"attributes": { "$ref": "#/$defs/attributes" }
83+
"annotation": { "$ref": "#/$defs/annotation" }
10284
},
10385
"required": ["type", "arg"]
10486
},
10587
"function-expression": {
10688
"type": "object",
10789
"properties": {
10890
"type": { "const": "expression" },
109-
"annotation": { "$ref": "#/$defs/function-annotation" },
110-
"attributes": { "$ref": "#/$defs/attributes" }
91+
"annotation": { "$ref": "#/$defs/function-annotation" }
11192
},
11293
"required": ["type", "annotation"]
11394
},
11495
"unsupported-expression": {
11596
"type": "object",
11697
"properties": {
11798
"type": { "const": "expression" },
118-
"annotation": { "$ref": "#/$defs/unsupported-annotation" },
119-
"attributes": { "$ref": "#/$defs/attributes" }
99+
"annotation": { "$ref": "#/$defs/unsupported-annotation" }
120100
},
121101
"required": ["type", "annotation"]
122102
},
@@ -135,8 +115,7 @@
135115
"type": { "const": "markup" },
136116
"kind": { "const": "open" },
137117
"name": { "type": "string" },
138-
"options": { "$ref": "#/$defs/options" },
139-
"attributes": { "$ref": "#/$defs/attributes" }
118+
"options": { "$ref": "#/$defs/options" }
140119
},
141120
"required": ["type", "kind", "name"]
142121
},
@@ -146,8 +125,7 @@
146125
"type": { "const": "markup" },
147126
"kind": { "const": "standalone" },
148127
"name": { "type": "string" },
149-
"options": { "$ref": "#/$defs/options" },
150-
"attributes": { "$ref": "#/$defs/attributes" }
128+
"options": { "$ref": "#/$defs/options" }
151129
},
152130
"required": ["type", "kind", "name"]
153131
},
@@ -156,8 +134,7 @@
156134
"properties": {
157135
"type": { "const": "markup" },
158136
"kind": { "const": "close" },
159-
"name": { "type": "string" },
160-
"attributes": { "$ref": "#/$defs/attributes" }
137+
"name": { "type": "string" }
161138
},
162139
"required": ["type", "kind", "name"]
163140
},

0 commit comments

Comments
 (0)
0