09288e8c7ee3aaa1abcf6c6c330f50a719e1b68d
[pspp] / src / output / spv / structure-xml.grammar
1 # PSPP - a program for statistical analysis.
2 # Copyright (C) 2017, 2018, 2019 Free Software Foundation, Inc.
3 #
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 heading[root_heading]
18    :creator-version?
19    :creator?
20    :creation-date-time?
21    :lockReader=bool?
22    :schemaLocation?
23 => label pageSetup? (container | heading)*
24
25 heading
26    :creator-version?
27    :commandName?
28    :visibility[heading_visibility]=(collapsed)?
29    :locale?
30    :olang?
31 => label (container | heading)*
32
33 label => TEXT
34
35 container
36    :visibility=(visible | hidden)
37    :page-break-before=(always)?
38    :text-align=(left | center)?
39    :width=dimension
40 => label (table | container_text | graph | model | object | image | tree)
41
42 text[container_text]
43   :type[text_type]=(title | log | text | page-title)
44   :commandName?
45   :creator-version?
46 => html
47
48 html :lang=(en) => TEXT
49
50 table
51    :VDPId?
52    :ViZmlSource?
53    :activePageId=int?
54    :commandName
55    :creator-version?
56    :displayFiltering=bool?
57    :maxNumCells=int?
58    :orphanTolerance=int?
59    :rowBreakNumber=int?
60    :subType
61    :tableId
62    :tableLookId?
63    :type[table_type]=(table | note | warning)
64 => tableProperties? tableStructure
65
66 tableProperties
67    :schemaLocation?             # Just for standalone .stt files.
68    :name?                       # Just for standalone .stt files.
69 => generalProperties footnoteProperties cellFormatProperties borderProperties printingProperties
70
71 generalProperties
72    :hideEmptyRows=bool?
73    :maximumColumnWidth=dimension?
74    :maximumRowWidth=dimension?
75    :minimumColumnWidth=dimension?
76    :minimumRowWidth=dimension?
77    :rowDimensionLabels=(inCorner | nested)?
78 => EMPTY
79
80 footnoteProperties
81    :markerPosition=(superscript | subscript)?
82    :numberFormat=(alphabetic | numeric)?
83 => EMPTY
84
85 cellFormatProperties => cell_style+
86
87 any[cell_style]
88    :alternatingColor=color?
89    :alternatingTextColor=color?
90 => style
91
92 style
93    :color=color?
94    :color2=color?
95    :font-family?
96    :font-size?
97    :font-style=(regular | italic)?
98    :font-weight=(regular | bold)?
99    :font-underline=(none | underline)?
100    :labelLocationVertical=(positive | negative | center)?
101    :margin-bottom=dimension?
102    :margin-left=dimension?
103    :margin-right=dimension?
104    :margin-top=dimension?
105    :textAlignment=(left | right | center | decimal | mixed)?
106    :decimal-offset=dimension?
107 => EMPTY
108
109 borderProperties => border_style+
110
111 any[border_style]
112    :borderStyleType=(none | solid | dashed | thick | thin | double)?
113    :color=color?
114 => EMPTY
115
116 printingProperties
117    :printAllLayers=bool?
118    :rescaleLongTableToFitPage=bool?
119    :rescaleWideTableToFitPage=bool?
120    :windowOrphanLines=int?
121    :continuationText?
122    :continuationTextAtBottom=bool?
123    :continuationTextAtTop=bool?
124    :printEachLayerOnSeparatePage=bool?
125 => EMPTY
126
127 tableStructure => path? dataPath
128
129 graph
130    :VDPId?
131    :ViZmlSource?
132    :commandName?
133    :creator-version?
134    :dataMapId?
135    :dataMapURI?
136    :editor?
137    :refMapId?
138    :refMapURI?
139    :csvFileIds?
140    :csvFileNames?
141 => dataPath? path csvPath?
142
143 model
144    :PMMLContainerId?
145    :PMMLId
146    :StatXMLContainerId
147    :VDPId
148    :auxiliaryViewName
149    :commandName
150    :creator-version
151    :mainViewName
152 => ViZml? dataPath? path | pmmlContainerPath statsContainerPath
153
154 tree
155    :commandName
156    :creator-version
157    :name
158    :type
159 => dataPath path
160
161 pmmlContainerPath => TEXT
162
163 statsContainerPath => TEXT
164
165 ViZml :viewName? => TEXT
166
167 dataPath => TEXT
168
169 path => TEXT
170
171 csvPath => TEXT
172
173 pageSetup
174    :initial-page-number=int?
175    :chart-size=(as-is | full-height | half-height | quarter-height | OTHER)?
176    :margin-left=dimension?
177    :margin-right=dimension?
178    :margin-top=dimension?
179    :margin-bottom=dimension?
180    :paper-height=dimension?
181    :paper-width=dimension?
182    :reference-orientation?
183    :space-after=dimension?
184 => pageHeader pageFooter
185
186 pageHeader => pageParagraph?
187
188 pageFooter => pageParagraph?
189
190 pageParagraph => pageParagraph_text
191
192 text[pageParagraph_text] :type=(title | text) => TEXT
193
194 object :type :uri => EMPTY
195
196 image :VDPId :commandName => dataPath