This file is indexed.

/usr/share/photoml/xsl/html/index.xsl is in photoml 0.28-0ubuntu1.

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
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<!-- 
     This file contains templates for constructing an HTML index of
     roll, sheet, digital, and digimage elements using the summary
     details extracted by preindex.xsl.

     Copyright © 2005,2011 Brendt Wohlberg <photoml@wohlberg.net>

     This is free software; you can redistribute it and/or modify it 
     under the terms of version 2 of the GNU General Public License 
     at http://www.gnu.org/licenses/gpl-2.0.txt.

     This software 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.
-->

  <xsl:output method="xml" indent="yes" encoding="utf-8"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"/>

  <!-- Stylesheet parameter determining the primary font size -->
  <xsl:param name="font-size">11</xsl:param>
   <!-- Stylesheet parameter determining whether to group by year -->
   <xsl:param name="year-group" select="false"/>

  <!-- Key matching all sheet elements with specific year of start date -->
  <xsl:key name="sheetyear" match="sheet" use="substring(startdate,1,4)"/>

  <!-- Key matching all roll elements with specific year of start date -->
  <xsl:key name="rollyear" match="roll" use="substring(startdate,1,4)"/>

   <!-- Key matching all digital elements with specific year of start date -->
  <xsl:key name="digyear" match="digital" use="substring(startdate,1,4)"/>

  <!-- Key matching all digimage elements with specific group-id -->
  <xsl:key name="digigid" match="digimage" use="@group-id"/>


  <!-- Template matching document root. -->
  <xsl:template match="/">
    <html>
      <head>
        <title>Photo Metadata Index</title>
        <style type="text/css">
          body  {
          margin-left: 3%;
          margin-right: 3%;
          font-family: sans-serif;
          font-size: <xsl:value-of select="$font-size"/>pt;
          color: black;
          background: white;
          }
          table { 
          margin-left: auto;
          margin-right: auto;
          border: solid black 1px;
          border-spacing: 5px;
          border-collapse: collapse;
          }
          tr, td {
          background-color: rgb(245,245,245);
          border: solid black 1px;
          padding: 4px;
          }
          th { 
          background-color: rgb(230,230,230);
          border: solid black 1px;
          padding: 4px;
          }
          a {
          text-decoration: none;
          color: #2e5c89;
          } 
          a:hover {
          color: #247cd2;
          }
          .year {
          background-color: rgb(237,237,237);
          }
          .center {
          text-align : center;
          }
          .title {
          text-align: center;
          font-size: 170%;
          padding-bottom: 0.4em;
          }
          .spacer {
          padding-bottom: 3em;
          }
        </style>
      </head>
      <body>
        <xsl:if test="//sheet">
          <xsl:call-template name="sheet"/>
          <div class="spacer"/>
        </xsl:if>
        <xsl:if test="//roll">
          <xsl:call-template name="roll"/>
          <div class="spacer"/>
        </xsl:if>
        <xsl:if test="//digital">
          <xsl:call-template name="digital"/>
          <div class="spacer"/>
        </xsl:if>
        <xsl:if test="//digimage">
          <xsl:call-template name="digimage"/>
        </xsl:if>
      </body>
    </html>
  </xsl:template>


  <!-- Write index of sheet elements. -->
  <xsl:template name="sheet">
    <div class="title">Sheet Index</div>
    <table>
      <tr>
        <th>ID</th>
        <th>Date</th>
        <th>Film</th>
        <th>Camera</th>
      </tr>
      <xsl:choose>
        <xsl:when test="boolean($year-group)">
          <xsl:for-each select="//sheet[generate-id(.) =
                                    generate-id(key('sheetyear',
                                    substring(startdate,1,4))[1])]">
            <xsl:sort select="substring(startdate,1,4)"/>
            <tr>
              <td colspan="4" align="center" class="year">
                <b><xsl:value-of select="substring(startdate,1,4)"/></b>
              </td>
            </tr>
            <xsl:for-each select="key('sheetyear', substring(startdate,1,4))">
              <xsl:sort select="@id"/>
              <xsl:call-template name="sheet-row"/>
            </xsl:for-each>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:for-each select="//sheet">
            <xsl:sort select="@id"/>
            <xsl:call-template name="sheet-row"/>
          </xsl:for-each>
        </xsl:otherwise>
      </xsl:choose>
    </table>
  </xsl:template>
   

   <!-- Write a single sheet table row. -->
  <xsl:template name="sheet-row">
    <tr>
      <td>
        <a href="{concat(parent::file/@html,@aid)}">
          <xsl:value-of select="@id"/>
        </a>
      </td>
      <td><xsl:value-of select="startdate"/></td>
      <td><xsl:apply-templates select="film"/></td>
      <td><xsl:apply-templates select="body"/></td>
    </tr>
  </xsl:template>


  <!-- Write index of roll elements. -->
  <xsl:template name="roll">
    <div class="title">Roll Index</div>
    <table>
      <tr>
        <th>ID</th>
        <th>Start</th>
        <th>End</th>
        <th>Film</th>
        <th>Camera</th>
      </tr>
      <xsl:choose>
        <xsl:when test="boolean($year-group)">
          <xsl:for-each select="//roll[generate-id(.) =
                                    generate-id(key('rollyear',
                                    substring(startdate,1,4))[1])]">
            <xsl:sort select="substring(startdate,1,4)"/>
            <tr>
              <td colspan="5" align="center" class="year">
                <b><xsl:value-of select="substring(startdate,1,4)"/></b>
              </td>
            </tr>
            <xsl:for-each select="key('rollyear', substring(startdate,1,4))">
              <xsl:sort select="@id"/>
              <xsl:call-template name="roll-row"/>
            </xsl:for-each>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:for-each select="//roll">
            <xsl:sort select="@id"/>
            <xsl:call-template name="roll-row"/>
          </xsl:for-each>
        </xsl:otherwise>
      </xsl:choose>
    </table>
  </xsl:template>


  <!-- Write a single roll table row. -->
  <xsl:template name="roll-row">
    <tr>
      <td>
        <a href="{concat(parent::file/@html,@aid)}">
          <xsl:value-of select="@id"/>
        </a>
      </td>
      <td><xsl:value-of select="startdate"/></td>
      <td><xsl:value-of select="enddate"/></td>
      <td><xsl:apply-templates select="film"/></td>
      <td><xsl:apply-templates select="body"/></td>
    </tr>
  </xsl:template>
  

  <!-- Handle film child of sheet or roll elements. -->
  <xsl:template match="film">
    <xsl:value-of select="make"/>
    <xsl:text> </xsl:text>
    <xsl:value-of select="name"/>
    <xsl:if test="speed">
      (ISO <xsl:value-of select="speed"/>)
    </xsl:if>
  </xsl:template>


  <!-- Handle camera body description. -->
  <xsl:template match="body">
    <xsl:value-of select="concat(make,' ',model)"/>
  </xsl:template>


  <!-- Write index of digital elements. -->
  <xsl:template name="digital">
    <div class="title">Digital Index</div>
    <table>
      <tr>
        <th>ID</th>
        <th>Start</th>
        <th>End</th>
        <th>Camera</th>
      </tr>
      <xsl:choose>
        <xsl:when test="boolean($year-group)">
          <xsl:for-each select="//digital[generate-id(.) =
                                generate-id(key('digyear',
                                substring(startdate,1,4))[1])]">
            <xsl:sort select="substring(startdate,1,4)"/>
            <tr>
              <td colspan="4" align="center" class="year">
                <b><xsl:value-of select="substring(startdate,1,4)"/></b>
              </td>
            </tr>
            <xsl:for-each select="key('digyear', substring(startdate,1,4))">
              <xsl:sort select="@id"/>
              <xsl:call-template name="digital-row"/>
            </xsl:for-each>
          </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
          <xsl:for-each select="//digital">
            <xsl:sort select="@id"/>
            <xsl:call-template name="digital-row"/>
          </xsl:for-each>
        </xsl:otherwise>
      </xsl:choose>
    </table>
  </xsl:template>


   <!-- Write a single digital table row. -->
  <xsl:template name="digital-row">
    <tr>
      <td>
        <a href="{concat(parent::file/@html,@aid)}">
          <xsl:value-of select="@id"/>
        </a>
      </td>
      <td><xsl:value-of select="startdate"/></td>
      <td><xsl:value-of select="enddate"/></td>
      <td><xsl:apply-templates select="body"/></td>
    </tr>
  </xsl:template>


  <!-- Write index of digimage elements. -->
  <xsl:template name="digimage">
    <div class="title">Digimage Index</div>
    <table>
      <tr>
        <th>ID</th>
        <th>Frames</th>
      </tr>
      <!-- Iterate over each unique digimage group-id -->
      <xsl:for-each select="//digimage[generate-id(.)=generate-id(key('digigid',@group-id)[1])]">
        <xsl:sort select="@group-id"/>
        <xsl:variable name="gid" select="@group-id"/>
        <tr>
          <td><xsl:value-of select="$gid"/></td>
          <td>
            <!-- Iterate over each file containing a digimage with $gid as
                 its group-id -->
            <xsl:for-each select="//file[child::digimage[@group-id=$gid]]">
              <xsl:sort select="@html"/>
              <xsl:text>[</xsl:text>
              <a href="{concat(@html,'#digimage-',$gid)}">
                <xsl:for-each select="digimage[@group-id=$gid]">
                  <xsl:sort select="@frame-id"/>
                  <xsl:variable name="fid" select="@frame-id"/>
                  <xsl:if test="not(following-sibling::digimage[@group-id=$gid][@frame-id=$fid])">
                    <xsl:value-of select="$fid"/>
                    <xsl:if test="not(position() = last())">
                      <xsl:text>, </xsl:text>
                    </xsl:if>
                  </xsl:if>
                </xsl:for-each>
              </a>
              <xsl:text>] </xsl:text>
            </xsl:for-each>
          </td>
        </tr>
      </xsl:for-each>
    </table>
  </xsl:template>


</xsl:stylesheet>