67e83a1be1230ef272cd35de06a58cfc0e9b3453
[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    :labelLocationVertical=(positive | negative | center)?
100    :margin-bottom=dimension?
101    :margin-left=dimension?
102    :margin-right=dimension?
103    :margin-top=dimension?
104    :textAlignment=(left | right | center | decimal | mixed)?
105    :decimal-offset=dimension?
106 => EMPTY
107
108 borderProperties => border_style+
109
110 any[border_style]
111    :borderStyleType=(none | solid | dashed | thick | thin | double)?
112    :color=color?
113 => EMPTY
114
115 printingProperties
116    :printAllLayers=bool?
117    :rescaleLongTableToFitPage=bool?
118    :rescaleWideTableToFitPage=bool?
119    :windowOrphanLines=int?
120    :continuationText?
121    :continuationTextAtBottom=bool?
122    :continuationTextAtTop=bool?
123    :printEachLayerOnSeparatePage=bool?
124 => EMPTY
125
126 tableStructure => path? dataPath
127
128 graph
129    :VDPId?
130    :ViZmlSource?
131    :commandName?
132    :creator-version?
133    :dataMapId?
134    :dataMapURI?
135    :editor?
136    :refMapId?
137    :refMapURI?
138    :csvFileIds?
139    :csvFileNames?
140 => dataPath? path csvPath?
141
142 model
143    :PMMLContainerId?
144    :PMMLId
145    :StatXMLContainerId
146    :VDPId
147    :auxiliaryViewName
148    :commandName
149    :creator-version
150    :mainViewName
151 => ViZml? dataPath? path | pmmlContainerPath statsContainerPath
152
153 tree
154    :commandName
155    :creator-version
156    :name
157    :type
158 => dataPath path
159
160 pmmlContainerPath => TEXT
161
162 statsContainerPath => TEXT
163
164 ViZml :viewName? => TEXT
165
166 dataPath => TEXT
167
168 path => TEXT
169
170 csvPath => TEXT
171
172 pageSetup
173    :initial-page-number=int?
174    :chart-size=(as-is | full-height | half-height | quarter-height | OTHER)?
175    :margin-left=dimension?
176    :margin-right=dimension?
177    :margin-top=dimension?
178    :margin-bottom=dimension?
179    :paper-height=dimension?
180    :paper-width=dimension?
181    :reference-orientation?
182    :space-after=dimension?
183 => pageHeader pageFooter
184
185 pageHeader => pageParagraph?
186
187 pageFooter => pageParagraph?
188
189 pageParagraph => pageParagraph_text
190
191 text[pageParagraph_text] :type=(title | text) => TEXT
192
193 object :type :uri => EMPTY
194
195 image :VDPId :commandName => dataPath