This file is indexed.

/usr/share/refdb/dsssl/bibdb2tei.dsl is in refdb-clients 1.0.2-1.

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
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

<style-sheet>
<style-specification>
<style-specification-body>

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This file is part of RefDB
;; Markus Hoenicka 011113
;; markus@mhoenicka.de
;; $Id: bibdb2tei.dsl,v 1.2 2002/12/13 20:33:48 mhoenicka Exp $
;;
;;
;;; The purpose of this stylesheet is to convert cooked DocBook 
;;; bibliographies into TEI bibliographies
;;; The current implemenation is limited to the elements that occur
;;; in the RefDB DocBook bibliography output
;
;;; Processing: jade -t xml -d bibdb2tei.dsl [sgml-declaration] docbook-file.sgml > tei-file.xml

(declare-flow-object-class element
			   "UNREGISTERED::James Clark//Flow Object Class::element")
(declare-flow-object-class processing-instruction
			   "UNREGISTERED::James Clark//Flow Object Class::processing-instruction")

(declare-flow-object-class document-type
  "UNREGISTERED::James Clark//Flow Object Class::document-type")

(element BIBLIOGRAPHY
  (if (equal? (normalize (attribute-string (normalize "role"))) (normalize "refdb"))
      (make sequence
	(make processing-instruction 
	  data: "xml version=\"1.0\"")
	(make document-type
	  name: "listBibl"
	  system-id: "http://www.tei-c.org/P4X/DTD/tei2.dtd"
	  public-id: "-//TEI P4//DTD Main Document Type//EN")
	(make element
	  gi: "div"
	  attributes: (list (list "type" "refdb-bibliography"))
	  (with-mode div-mode (process-first-descendant "title"))
	  (make element
	    gi: "listBibl"
	    attributes: (list (list "rend" "refdb"))
	    (process-children))))
      (empty-sosofo)))

(mode div-mode
  (element (BIBLIOGRAPHY TITLE)
    (make sequence
      (make element
	gi: "head"
	(make element
	  gi: "title"
	  (process-children)))))
)

(element (BIBLIOGRAPHY TITLE)
  (empty-sosofo))

(element BIBLIOMIXED
  (make element
    gi: "bibl"
    attributes: (if (equal? (normalize (attribute-string (normalize "role"))) (normalize "multixref"))
		    (list (list "rend" "multixref"))
		    (list
		     (list "id" (attribute-string (normalize "id")))
		     (list "rend" (attribute-string (normalize "role")))))
    (process-children)))

(element BIBLIOMSET
  (let ((relation (normalize (attribute-string (normalize "relation"))))
	(role (normalize (attribute-string (normalize "role")))))
    (cond
     ((equal? relation (normalize "author"))
      (make element
	gi: "persName"
	attributes: (list (list "type" "author"))
	(process-children)))
     ((equal? relation (normalize "editor"))
      (make element
	gi: "persName"
	attributes: (list (list "type" "editor"))
	(process-children)))
     ((equal? relation (normalize "seditor"))
      (make element
	gi: "persName"
	attributes: (list (list "type" "seditor"))
	(process-children)))
     ((equal? relation (normalize "article"))
      (make element
	gi: "seg"
	attributes: (list (list "type" "article"))
	(process-children)))
     (role
      (make element
	gi: "seg"
	attributes: (list (list "type" role)
			  (list "id" (attribute-string (normalize "id"))))
	(process-children)))
     (else
      (make element
	gi: "seg"
	attributes: (if (equal? relation (normalize "endtermtarget"))
			(list
			 (list "id" (attribute-string (normalize "id")))
			 (list "type" "endtermtarget"))
			(list (list "type" relation)))
	(process-children))))))

(element SURNAME
  (make element
    gi: "surname"
    (process-children)))

(element FIRSTNAME
  (make element
    gi: "foreName"
    (process-children)))

(element OTHERNAME
  (make element
    gi: "name"
    attributes: (list (list "type" "othername"))
    (process-children)))

(element LINEAGE
  (make element
    gi: "name"
    attributes: (list (list "type" "lineage"))
    (process-children)))

(element PUBDATE
  (make element
    gi: "date"
    attributes: (list (list "rend" (attribute-string (normalize "role"))))
    (process-children)))

(element TITLE
  (make element
    gi: "title"
    attributes: (cond
		 ((equal? (attribute-string (normalize "role")) "JOUR")
		  (list (list "level" "a")))
		 ((equal? (attribute-string (normalize "role")) "BOOK")
		  (list (list "level" "m")))
		 ((equal? (inherited-attribute-string (normalize "relation")) "journal")
		  (list (list "level" "j"))))
    (process-children)))
      
(element VOLUMENUM
  (make element
    gi: "seg"
    attributes: (list (list "type" "volume"))
    (process-children)))

(element ISSUENUM
  (make element
    gi: "seg"
    attributes: (list (list "type" "issue"))
    (process-children)))

(element PAGENUMS
  (make element
    gi: "seg"
    attributes:  (list (list "type" "pages"))
    (process-children)))

(element ADDRESS
  (make element
    gi: "address"
    (make element
      gi: "name"
      (process-children))))

(element ABBREV
  (make element
    gi: "abbr"
    (process-children)))

(element PUBLISHERNAME
  (make element
    gi: "publisher"
    (process-children)))

;; library functions

(define (normalize str)
  ;; REFENTRY normalize
  ;; PURP Normalize the str according to the SGML declaration in effect
  ;; DESC
  ;; Performs SGML general name normalization on the string;
  ;; used to compare attribute names and generic identifiers correctly
  ;; according to the SGML declaration in effect; this is necessary
  ;; since XML is case-sensitive but the reference concrete syntax and
  ;; many SGML DTDs are not.
  ;; /DESC
  ;; AUTHOR Chris Maden
  ;; /REFENTRY
  (if (string? str)
      (general-name-normalize str
			      (current-node))
      str))

</style-specification-body>
</style-specification>
</style-sheet>