This file is indexed.

/usr/share/polymake/xml/common_grammar.rng is in polymake-common 3.2r2-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
<?xml version="1.0" encoding="utf-8" ?>

<!--
  Copyright (c) 1997-2018
  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
  http://www.polymake.org

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2, or (at your option) any
  later version: http://www.gnu.org/licenses/gpl.txt.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
===============================================================================

  Common building blocks for Relax-NG Schemas for polymake v3
-->

<grammar xmlns="http://relaxng.org/ns/structure/1.0"
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
         xmlns:note="http://www.math.tu-berlin.de/polymake/note"
         ns="http://www.math.tu-berlin.de/polymake/#3">

  <define name="SubObject">
    <element name="object">
      <optional>
        <note:a> The type defaults to the declared property type </note:a>
        <attribute name="type" />
      </optional>
      <ref name="ObjectContent" />
    </element>
  </define>

  <define name="SimpleName">
    <attribute name="name">
      <data type="string">
        <param name="pattern">[a-zA-Z][a-zA-Z_0-9]*</param>
      </data>
    </attribute>
  </define>

  <define name="PropertyName">
    <attribute name="name">
      <note:a>
        Must be prefixed by the name of the application where this property is introduced
        if that is different from the application where the owning object is defined
        (aka property injection).
      </note:a>
      <data type="string">
        <param name="pattern">([a-zA-Z][a-zA-Z_0-9]*::)?[a-zA-Z][a-zA-Z_0-9]*</param>
      </data>
    </attribute>
  </define>

  <define name="Extensions">
    <optional>
      <attribute name="ext">
        <note:a>
          The first reference to any extension in the document order must consist
          of the ordinal number and the URI; all subsequent references are solely numbers.
        </note:a>
        <data type="string">
          <param name="pattern">( *\d+(=[^\s#]+(#\d+)?)?)+ *</param>
        </data>
      </attribute>
    </optional>
  </define>

  <define name="ObjectTextDescriptions">
    <optional>
      <attribute name="name" />
    </optional>
    <optional>
      <element name="description">
        <text/>
      </element>
    </optional>
    <zeroOrMore>
      <element name="credit">
        <attribute name="product" />
        <text/>
      </element>
    </zeroOrMore>
  </define>

  <define name="ObjectContent">
    <ref name="Extensions" />
    <ref name="ObjectTextDescriptions" />
    <interleave>
      <zeroOrMore>
        <ref name="Property" />
      </zeroOrMore>
      <zeroOrMore>
        <ref name="Attachment" />
      </zeroOrMore>
    </interleave>
  </define>

  <define name="Property">
    <element name="property">
      <ref name="PropertyName" />
      <ref name="Extensions" />
      <choice>
        <group>
          <note:a>
            undefined value is signaled by the special attribute
          </note:a>
          <attribute name="undef"><value>true</value></attribute>
          <empty/>
        </group>

        <group>
 	  <note:a>
            type defaults to the declared property type
          </note:a>
          <optional>
            <attribute name="type" />
          </optional>
          <ref name="PropertyData" />
        </group>

        <ref name="Text" />

        <oneOrMore>
	  <ref name="SubObject" />
        </oneOrMore>
      </choice>
    </element>
  </define>

  <define name="Attachment">
    <element name="attachment">
      <ref name="SimpleName" />
      <ref name="Extensions" />
      <ref name="AttachmentData" />
    </element>
  </define>

  <define name="PropertyData">
    <choice>
      <note:a>
        Scalar property values may be stored in the value attribute,
	saving space and improving legibility.
      </note:a>
      <group>
        <attribute name="value" />
        <empty/>
      </group>

      <ref name="Complex" />

      <note:a> Array of (sub-)objects. </note:a>
      <element name="m">
        <oneOrMore>
	  <ref name="SubObject" />
        </oneOrMore>
      </element>
    </choice>
  </define>

  <define name="AttachmentData">
    <choice>
      <note:a>
        Scalar property values may be stored in the value attribute,
	saving space and improving legibility.
	Default type is String.
      </note:a>
      <group>
        <optional>
          <attribute name="type" />
        </optional>
        <attribute name="value" />
        <empty/>
      </group>

      <group>
        <attribute name="type" />
        <optional>
          <note:a>
            Property path in dotted notation, referring to the enclosing object.
            The property is passed to the constructor of the data stored in this attachment.
          </note:a>
          <attribute name="construct" />
        </optional>
        <ref name="Complex" />
      </group>

      <ref name="Text" />
    </choice>
  </define>

  <define name="Text">
    <note:a>
      Unstructured text must be declared explicitly by the type attribute.
      The contents are expected to be enclosed in CDATA brackets to preserve line breaks etc.
    </note:a>
    <attribute name="type"><value>text</value></attribute>
    <text/>
  </define>

  <define name="Complex">
    <choice>
      <ref name="Vector" />
      <ref name="Matrix" />
      <ref name="Tuple" />
    </choice>
  </define>

  <define name="VectorContents">
    <choice>
      <note:a> A dense vector with simple scalar elements </note:a>
      <list>
        <oneOrMore>
          <data type="string" />
        </oneOrMore>
      </list>
      <note:a> A dense vector with complex elements </note:a>
      <oneOrMore>
        <ref name="Tuple" />
      </oneOrMore>
      <note:a> A sparse vector </note:a>
      <group>
        <note:a>
          Vector dimension; if omitted, the cols attribute of the enclosing matrix has to be taken.
        </note:a>
        <optional>
          <ref name="SparseContainerDim" />
        </optional>
        <choice>
          <note:a> simple scalar elements; this choice matches an empty vector as well </note:a>
          <zeroOrMore>
            <element name="e">
              <ref name="ElementIndex" />
              <data type="string" />
            </element>
          </zeroOrMore>
          <note:a> complex elements </note:a>
          <oneOrMore>
            <element name="t">
              <ref name="ElementIndex" />
              <ref name="TupleContents" />
            </element>
          </oneOrMore>
        </choice>
      </group>
    </choice>
  </define>

  <note:a> index of an element in a sparse container </note:a>
  <define name="ElementIndex">
    <attribute name="i">
      <data type="nonNegativeInteger" />
    </attribute>
  </define>

  <note:a> dimension of a sparse container </note:a>
  <define name="SparseContainerDim">
     <attribute name="dim">
      <data type="nonNegativeInteger" />
    </attribute>
  </define>

  <note:a> number of columns in a matrix </note:a>
  <define name="NumberColumns">
     <attribute name="cols">
      <data type="nonNegativeInteger" />
    </attribute>
  </define>

  <note:a> data instance referred to from other places in the document </note:a>
  <define name="IdAttribute">
    <attribute name="id">
      <data type="nonNegativeInteger" />
    </attribute>
  </define>

  <define name="Vector">
    <element name="v">
      <ref name="VectorContents" />
    </element>
  </define>

  <define name="MatrixContents">
    <note:a> a matrix or a list of complex elements </note:a>
    <choice>
      <group>
        <note:a> cols attribute applies to sparse matrices </note:a>
        <optional>
          <ref name="NumberColumns" />
        </optional>
        <zeroOrMore>
          <ref name="Vector" />
        </zeroOrMore>
      </group>
      <group>
        <note:a>
          sparse container of complex elements, like graph with gaps left over from deleted nodes
        </note:a>
        <ref name="SparseContainerDim" />
        <optional>
          <ref name="NumberColumns" />
        </optional>
        <zeroOrMore>
          <element name="v">
            <ref name="ElementIndex" />
            <ref name="VectorContents" />
          </element>
        </zeroOrMore>
      </group>
      <oneOrMore>
        <ref name="Matrix" />
      </oneOrMore>
      <oneOrMore>
        <ref name="Tuple" />
      </oneOrMore>
    </choice>
  </define>

  <define name="Matrix">
    <element name="m">
      <ref name="MatrixContents" />
    </element>
  </define>

  <define name="TupleContents">
    <note:a> a heterogeneous ordered list </note:a>
    <choice>
      <note:a> all elements are simple acalars </note:a>
      <list>
        <oneOrMore>
          <data type="string" />
        </oneOrMore>
      </list>
      <note:a> at least one complex element </note:a>
      <oneOrMore>
        <choice>
          <ref name="Vector" />
          <ref name="Matrix" />
          <ref name="Tuple" />
          <element name="e">
            <data type="string" />
          </element>
        </choice>
      </oneOrMore>
    </choice>
  </define>

  <define name="Tuple">
    <element name="t">
      <ref name="TupleContents" />
    </element>
  </define>

</grammar>