Add support for reading and writing SPV files.
[pspp] / src / output / spv / detail-xml.grammar
1 visualization
2    :creator
3    :date
4    :lang
5    :name
6    :style[style_ref]=ref style
7    :type
8    :version
9    :schemaLocation?
10 => visualization_extension?
11    userSource
12    (sourceVariable | derivedVariable)+
13    categoricalDomain?
14    graph
15    labelFrame[lf1]*
16    container?
17    labelFrame[lf2]*
18    style+
19    layerController?
20
21 extension[visualization_extension]
22    :numRows=int?
23    :showGridline=bool?
24    :minWidthSet=(true)?
25    :maxWidthSet=(true)?
26 => EMPTY
27
28 userSource :missing=(listwise | pairwise)? => EMPTY   # Related to omit_empty?
29
30 categoricalDomain => variableReference simpleSort
31
32 simpleSort :method[sort_method]=(custom) => categoryOrder
33
34 sourceVariable
35    :id
36    :categorical=(true)
37    :source
38    :domain=ref categoricalDomain?
39    :sourceName
40    :dependsOn=ref sourceVariable?
41    :label?
42    :labelVariable=ref sourceVariable?
43 => variable_extension* (format | stringFormat)?
44
45 derivedVariable
46    :id
47    :categorical=(true)
48    :value
49    :dependsOn=ref sourceVariable?
50 => variable_extension* (format | stringFormat)? valueMapEntry*
51
52 extension[variable_extension] :from :helpId => EMPTY
53
54 valueMapEntry :from :to => EMPTY
55
56 categoryOrder => TEXT
57
58 graph
59    :cellStyle=ref style
60    :style=ref style
61 => location+ coordinates faceting facetLayout interval
62
63 location
64    :part=(height | width | top | bottom | left | right)
65    :method=(sizeToContent | attach | fixed | same)
66    :min=dimension?
67    :max=dimension?
68    :target=ref (labelFrame | graph | container)?
69    :value?
70 => EMPTY
71
72 coordinates => EMPTY
73
74 faceting => layer[layers1]* cross layer[layers2]*
75
76 cross => (unity | nest) (unity | nest)
77
78 nest => variableReference[vars]+
79
80 unity => EMPTY
81
82 variableReference :ref=ref (sourceVariable | derivedVariable) => EMPTY
83
84 layer
85    :variable=ref (sourceVariable | derivedVariable)
86    :value
87    :visible=bool?
88    :method[layer_method]=(nest)?
89    :titleVisible=bool?
90 => EMPTY
91
92 facetLayout => tableLayout setCellProperties[scp1]*
93                facetLevel+ setCellProperties[scp2]*
94
95 tableLayout
96    :verticalTitlesInCorner=bool
97    :style=ref style?
98    :fitCells=(ticks both)?
99 => EMPTY
100
101 facetLevel :level=int :gap=dimension? => axis
102
103 axis :style=ref style => label? majorTicks
104
105 label
106    :style=ref style
107    :textFrameStyle=ref style?
108    :purpose=(title | subTitle | subSubTitle | layer | footnote)?
109 => text+ | descriptionGroup
110
111 descriptionGroup
112    :target=ref faceting
113    :separator?
114 => (description | text)+
115
116 description :name=(variable | value) => EMPTY
117
118 majorTicks
119    :labelAngle=int
120    :length=dimension
121    :style=ref style
122    :tickFrameStyle=ref style
123    :labelFrequency=int?
124    :stagger=bool?
125 => gridline?
126
127 gridline
128    :style=ref style
129    :zOrder=int
130 => EMPTY
131
132 setCellProperties
133    :applyToConverse=bool?
134 => (setStyle | setFrameStyle | setFormat | setMetaData)* union[union_]?
135
136 setStyle
137    :target=ref (labeling | graph | interval | majorTicks)
138    :style=ref style
139 => EMPTY
140
141 setMetaData
142    :target=ref graph
143    :key
144    :value
145 => EMPTY
146
147 setFormat
148    :target=ref (majorTicks | labeling)
149    :reset=bool?
150 => format | numberFormat | stringFormat+ | dateTimeFormat | elapsedTimeFormat
151
152 setFrameStyle
153    :style=ref style
154    :target=ref majorTicks
155 => EMPTY
156
157 format
158    :baseFormat[f_base_format]=(date | time | dateTime | elapsedTime)?
159    :errorCharacter?
160    :separatorChars?
161    :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
162    :showYear=bool?
163    :showQuarter=bool?
164    :quarterPrefix?
165    :quarterSuffix?
166    :yearAbbreviation=bool?
167    :showMonth=bool?
168    :monthFormat=(long | short | number | paddedNumber)?
169    :dayPadding=bool?
170    :dayOfMonthPadding=bool?
171    :showWeek=bool?
172    :weekPadding=bool?
173    :weekSuffix?
174    :showDayOfWeek=bool?
175    :dayOfWeekAbbreviation=bool?
176    :hourPadding=bool?
177    :minutePadding=bool?
178    :secondPadding=bool?
179    :showDay=bool?
180    :showHour=bool?
181    :showMinute=bool?
182    :showSecond=bool?
183    :showMillis=bool?
184    :dayType=(month | year)?
185    :hourFormat=(AMPM | AS_24 | AS_12)?
186    :minimumIntegerDigits=int?
187    :maximumFractionDigits=int?
188    :minimumFractionDigits=int?
189    :useGrouping=bool?
190    :scientific=(onlyForSmall | whenNeeded | true | false)?
191    :small=real?
192    :prefix?
193    :suffix?
194    :tryStringsAsNumbers=bool?
195    :negativesOutside=bool?
196 => relabel* affix*
197
198 numberFormat
199    :minimumIntegerDigits=int?
200    :maximumFractionDigits=int?
201    :minimumFractionDigits=int?
202    :useGrouping=bool?
203    :scientific=(onlyForSmall | whenNeeded | true | false)?
204    :small=real?
205    :prefix?
206    :suffix?
207 => affix*
208
209 stringFormat => relabel* affix*
210
211 dateTimeFormat
212    :baseFormat[dt_base_format]=(date | time | dateTime)
213    :separatorChars?
214    :mdyOrder=(dayMonthYear | monthDayYear | yearMonthDay)?
215    :showYear=bool?
216    :yearAbbreviation=bool?
217    :showQuarter=bool?
218    :quarterPrefix?
219    :quarterSuffix?
220    :showMonth=bool?
221    :monthFormat=(long | short | number | paddedNumber)?
222    :showWeek=bool?
223    :weekPadding=bool?
224    :weekSuffix?
225    :showDayOfWeek=bool?
226    :dayOfWeekAbbreviation=bool?
227    :dayPadding=bool?
228    :dayOfMonthPadding=bool?
229    :hourPadding=bool?
230    :minutePadding=bool?
231    :secondPadding=bool?
232    :showDay=bool?
233    :showHour=bool?
234    :showMinute=bool?
235    :showSecond=bool?
236    :showMillis=bool?
237    :dayType=(month | year)?
238    :hourFormat=(AMPM | AS_24 | AS_12)?
239 => affix*
240
241 elapsedTimeFormat
242    :baseFormat[dt_base_format]=(date | time | dateTime)
243    :dayPadding=bool?
244    :hourPadding=bool?
245    :minutePadding=bool?
246    :secondPadding=bool?
247    :showYear=bool?
248    :showDay=bool?
249    :showHour=bool?
250    :showMinute=bool?
251    :showSecond=bool?
252    :showMillis=bool?
253 => affix*
254
255 affix
256    :definesReference=int
257    :position=(subscript | superscript)
258    :suffix=bool
259    :value
260 => EMPTY
261
262 relabel :from=real :to => EMPTY
263
264 union => intersect+
265
266 intersect => where+ | intersectWhere | alternating | EMPTY
267
268 where
269    :variable=ref (sourceVariable | derivedVariable)
270    :include
271 => EMPTY
272
273 intersectWhere
274    :variable=ref (sourceVariable | derivedVariable)
275    :variable2=ref (sourceVariable | derivedVariable)
276 => EMPTY
277
278 alternating => EMPTY
279
280 text
281    :usesReference=int?
282    :definesReference=int?
283    :position=(subscript | superscript)?
284    :style=ref style
285 => TEXT
286
287 interval :style=ref style => labeling footnotes?
288
289 labeling
290    :style=ref style?
291    :variable=ref (sourceVariable | derivedVariable)
292 => (formatting | format | footnotes)*
293
294 formatting :variable=ref (sourceVariable | derivedVariable) => formatMapping*
295
296 formatMapping :from=int => format?
297
298 footnotes
299    :superscript=bool?
300    :variable=ref (sourceVariable | derivedVariable)
301 => footnoteMapping*
302
303 footnoteMapping :definesReference=int :from=int :to => EMPTY
304
305 style
306    :color=color?
307    :color2=color?
308    :labelAngle=real?
309    :border-bottom=(solid | thick | thin | double | none)?
310    :border-top=(solid | thick | thin | double | none)?
311    :border-left=(solid | thick | thin | double | none)?
312    :border-right=(solid | thick | thin | double | none)?
313    :border-bottom-color?
314    :border-top-color?
315    :border-left-color?
316    :border-right-color?
317    :font-family?
318    :font-size?
319    :font-weight=(regular | bold)?
320    :font-style=(regular | italic)?
321    :font-underline=(none | underline)?
322    :margin-bottom=dimension?
323    :margin-left=dimension?
324    :margin-right=dimension?
325    :margin-top=dimension?
326    :textAlignment=(left | right | center | decimal | mixed)?
327    :labelLocationHorizontal=(positive | negative | center)?
328    :labelLocationVertical=(positive | negative | center)?
329    :decimal-offset=dimension?
330    :size?
331    :width?
332    :visible=bool?
333 => EMPTY
334
335 layerController
336    :source=(tableData)
337    :target=ref label?
338 => EMPTY
339
340 container :style=ref style => container_extension? location+ labelFrame*
341
342 extension[container_extension] :combinedFootnotes=(true) => EMPTY
343
344 labelFrame :style=ref style => location+ label? paragraph?
345
346 paragraph :hangingIndent=dimension? => EMPTY