This file is indexed.

/usr/share/system-config-printer/xml/preferreddrivers.rng is in system-config-printer-common 1.3.8+20120201-0ubuntu8.

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
<?xml version="1.0" encoding="UTF-8"?>

<!--
   This type of file is for ordering named PPD files for a given
   printer.

   When choosing a driver for a known printer, first the complete list
   of available drivers is compiled.  This includes any generic
   drivers that are likely to be able to drive the device, based on
   its IEEE 1284 Device ID's COMMAND SET field.

   The next task is to present this list to the user in order of
   preference, i.e. the drivers most likely to be the "right" ones
   first.

   This is done with reference to an XML file of the type described
   here.

   Child elements of the preferenceorder element are processed in
   order, with each printer element being matched against the printer
   in question.  Once all the elements have been processed, the result
   will be a list of driver types in preference order (most preferred
   first), and a set of blacklisted driver types.

   For each printer element, at least one of the make-and-model and
   deviceid elements must match.  A deviceid element matches if all of
   the field regular expressions match.  For a matching printer
   element, the driver types matching each pattern contained in the
   drivers, avoid, and blacklist elements are appended to separate
   lists for drivers to use, drivers to avoid, and drivers that must
   not be used.

   A printer element that does not contain any make-and-model or
   deviceid elements is a "catch-all" element and matches any
   printer.

   To convert this into a list of drivers (i.e. PPDs), the drivertypes
   element is examined.  Each PPD is assigned a driver type name, and
   then the PPDs are arranged in order corresponding to the list of
   preferred driver types.  Drivers in the avoid list are then placed
   at the end of the list, and drivers in the blacklist are removed
   altogether.

   To determine the driver type name for a PPD, the child elements of
   the drivertypes element are examined.  For each drivertype element,
   the criteria elements defined are matched against the PPD
   attributes.  If all criteria are satisfied, this PPD's driver type
   is given by the "name" attribute of the containing drivertype
   element.  In this case, no further drivertype elements are
   examined.

   If there are no criteria defined by a driver type, it is considered
   to match (i.e. it is a "catch-all" type).
  -->

<grammar xmlns="http://relaxng.org/ns/structure/1.0"
	 xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" 
         datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
  <start>
    <element name="preferreddrivers">
      <ref name="drivertypes"/>
      <ref name="preferenceorder"/>
    </element>
  </start>

  <!-- drivertypes -->
  <define name="drivertypes">
    <element name="drivertypes">
      <zeroOrMore>
	<!-- First matching element stops processing of elements
	     following it -->
	<ref name="drivertype"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="drivertype">
    <element name="drivertype">
      <attribute name="name">
	<!-- Same name may be specified in more than one drivertype
	     element -->
	<data type="normalizedString"/>
      </attribute>

      <optional>
	<attribute name="packagehint">
	  <!-- A filename belonging to the package providing this
	       driver type -->
	  <data type="normalizedString"/>
	</attribute>
      </optional>

      <!-- Match criteria (ppdname, attributes, deviceid, fit)
	   within one drivertype element must all be satisfied -->
      <interleave>
	<optional>
	  <ref name="ppdname"/>
	</optional>

	<zeroOrMore>
	  <ref name="attribute"/>
	</zeroOrMore>

	<zeroOrMore>
	  <ref name="deviceid"/>
	</zeroOrMore>

	<zeroOrMore>
	  <ref name="fit"/>
	</zeroOrMore>
      </interleave>
    </element>
  </define>

  <define name="ppdname">
    <element name="ppdname">
      <attribute name="match">
	<!-- Extended regular expression for matching against
	     ppd-name attribute value (starting at beginning)
	-->
	<data type="string"/>
      </attribute>

      <empty/>
    </element>
  </define>

  <define name="attribute">
    <element name="attribute">
      <attribute name="name">
	<!-- IPP attribute name, e.g. ppd-make-and-model -->
	<data type="normalizedString"/>
      </attribute>

      <attribute name="match">
	<!-- Extended regular expression for matching against
	     attribute's value (starting at beginning) -->
	<data type="string"/>
      </attribute>

      <empty/>
    </element>
  </define>

  <define name="deviceid">
    <element name="deviceid">
      <oneOrMore>
	<element name="field">
	  <attribute name="name">
	    <!-- Case-insensitive, abbreviated form of IEEE 1284
		 Device ID field key name e.g. MFG -->
	    <data type="normalizedString"/>
	  </attribute>

	  <attribute name="match">
	    <!-- Extended regular expression for matching against
		 IEEE 1284 Device ID field's value (starting at
		 beginning) -->
	    <data type="string"/>
	  </attribute>

	  <empty/>
	</element>
      </oneOrMore>
    </element>
  </define>

  <define name="fit">
    <element name="fit">
      <list>
	<oneOrMore>
	  <choice>
	    <!-- Drivers are put into one of the following categories
	         regarding how well it fits for this particular
	         printer.  When matching against a category of
	         fitness, "exact" implies "exact-cmd", i.e. an
	         "exact-cmd" driver will match an entry listing
	         "exact". -->

	    <!-- STATUS_SUCCESS and CMD matches -->
	    <value>exact-cmd</value>

	    <!-- STATUS_SUCCESS -->
	    <value>exact</value>

	    <!-- STATUS_MODEL_MISMATCH -->
	    <value>close</value>

	    <!-- STATUS_GENERIC_DRIVER -->
	    <value>generic</value>

	    <!-- STATUS_NO_DRIVER -->
	    <value>none</value>
	  </choice>
	</oneOrMore>
      </list>
    </element>
  </define>

  <!-- typeorders -->
  <define name="preferenceorder">
    <element name="preferenceorder">
      <zeroOrMore>
	<!-- Matches are accumulated -->
	<ref name="printer"/>
      </zeroOrMore>
    </element>
  </define>

  <define name="printer">
    <element name="printer">

      <!-- Any of these make-and-model or deviceid criteria must match -->
      <optional>
	<element name="make-and-model">
	  <attribute name="match">
	    <!-- Extended regular expression for matching against
		 device-make-and-model attribute value (starting at
		 beginning) -->
	    <data type="string"/>
	  </attribute>
	  <empty/>
	</element>
      </optional>

      <zeroOrMore>
	<ref name="deviceid"/>
      </zeroOrMore>

      <interleave>
	<optional>
	  <element name="drivers">
	    <!-- Ordered list of named drivertypes, most preferred
		 first -->
	    <oneOrMore>
	      <element name="drivertype">
		<!-- drivertype glob pattern -->
		<text/>
	      </element>
	    </oneOrMore>
	  </element>
	</optional>

	<optional>
	  <!-- These drivertypes will collectively be put last in
	       the preference list, in no particular order. -->
	  <element name="avoid">
	    <oneOrMore>
	      <element name="drivertype">
		<!-- drivertype glob pattern -->
		<text/>
	      </element>
	    </oneOrMore>
	  </element>
	</optional>

	<optional>
	  <element name="blacklist">
	    <!-- List of named drivertypes which must not be used -->
	    <oneOrMore>
	      <element name="drivertype">
		<!-- drivertype glob pattern -->
		<text/>
	      </element>
	    </oneOrMore>
	  </element>
	</optional>
      </interleave>
    </element>
  </define>
</grammar>