spv: Change comments in grammars from # to //.
[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 => generalProperties footnoteProperties cellFormatProperties borderProperties printingProperties
68
69 generalProperties
70    :hideEmptyRows=bool?
71    :maximumColumnWidth=dimension?
72    :maximumRowWidth=dimension?
73    :minimumColumnWidth=dimension?
74    :minimumRowWidth=dimension?
75    :rowDimensionLabels=(inCorner | nested)?
76 => EMPTY
77
78 footnoteProperties
79    :markerPosition=(superscript | subscript)?
80    :numberFormat=(alphabetic | numeric)?
81 => EMPTY
82
83 cellFormatProperties => cell_style+
84
85 any[cell_style]
86    :alternatingColor=color?
87    :alternatingTextColor=color?
88 => style
89
90 style
91    :color=color?
92    :color2=color?
93    :font-family?
94    :font-size?
95    :font-style=(regular | italic)?
96    :font-weight=(regular | bold)?
97    :labelLocationVertical=(positive | negative | center)?
98    :margin-bottom=dimension?
99    :margin-left=dimension?
100    :margin-right=dimension?
101    :margin-top=dimension?
102    :textAlignment=(left | right | center | decimal | mixed)?
103    :decimal-offset=dimension?
104 => EMPTY
105
106 borderProperties => border_style+
107
108 any[border_style]
109    :borderStyleType=(none | solid | dashed | thick | thin | double)?
110    :color=color?
111 => EMPTY
112
113 printingProperties
114    :printAllLayers=bool?
115    :rescaleLongTableToFitPage=bool?
116    :rescaleWideTableToFitPage=bool?
117    :windowOrphanLines=int?
118    :continuationText?
119    :continuationTextAtBottom=bool?
120    :continuationTextAtTop=bool?
121    :printEachLayerOnSeparatePage=bool?
122 => EMPTY
123
124 tableStructure => path? dataPath
125
126 graph
127    :VDPId?
128    :ViZmlSource?
129    :commandName?
130    :creator-version?
131    :dataMapId?
132    :dataMapURI?
133    :editor?
134    :refMapId?
135    :refMapURI?
136    :csvFileIds?
137    :csvFileNames?
138 => dataPath? path csvPath?
139
140 model
141    :PMMLContainerId?
142    :PMMLId
143    :StatXMLContainerId
144    :VDPId
145    :auxiliaryViewName
146    :commandName
147    :creator-version
148    :mainViewName
149 => ViZml? dataPath? path | pmmlContainerPath statsContainerPath
150
151 tree
152    :commandName
153    :creator-version
154    :name
155    :type
156 => dataPath path
157
158 pmmlContainerPath => TEXT
159
160 statsContainerPath => TEXT
161
162 ViZml :viewName? => TEXT
163
164 dataPath => TEXT
165
166 path => TEXT
167
168 csvPath => TEXT
169
170 pageSetup
171    :initial-page-number=int?
172    :chart-size=(as-is | full-height | half-height | quarter-height | OTHER)?
173    :margin-left=dimension?
174    :margin-right=dimension?
175    :margin-top=dimension?
176    :margin-bottom=dimension?
177    :paper-height=dimension?
178    :paper-width=dimension?
179    :reference-orientation?
180    :space-after=dimension?
181 => pageHeader pageFooter
182
183 pageHeader => pageParagraph?
184
185 pageFooter => pageParagraph?
186
187 pageParagraph => pageParagraph_text
188
189 text[pageParagraph_text] :type=(title | text) => TEXT
190
191 object :type :uri => EMPTY
192
193 image :VDPId :commandName => dataPath