Index Data web stylesheet works.
[yaz-moved-to-github.git] / doc / yazphp.dsl
1 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
2 <!ENTITY docbook.dsl SYSTEM "../../docbook-dsssl/html/docbook.dsl"
3   CDATA DSSSL>
4 ]>
5 <!--
6   $Id: yazphp.dsl,v 1.3 2001-08-14 11:50:07 adam Exp $
7 -->
8 <style-sheet>
9 <style-specification use="docbook">
10 <style-specification-body>
11
12 (define %html-ext% ".php")
13 (define %shade-verbatim% #t)
14
15 (define newline "\U-000D")
16
17 (define (html-document title-sosofo body-sosofo)
18   (let* (;; Let's look these up once, so that we can avoid calculating
19          ;; them over and over again.
20          (prev         (prev-chunk-element))
21          (next         (next-chunk-element))
22          (prevm        (prev-major-component-chunk-element))
23          (nextm        (next-major-component-chunk-element))
24          (navlist      (list prev next prevm nextm))
25          
26          ;; Let's make it possible to control the output even in the
27          ;; nochunks case. Note: in the nochunks case, (chunk?) will
28          ;; return #t for only the root element.
29          (make-entity? (and (or (not nochunks) rootchunk)
30                             (chunk?)))
31          
32          (make-head?   (or make-entity?
33                            (and nochunks
34                                 (node-list=? (current-node)
35                                              (sgml-root-element)))))
36          (doc-sosofo 
37           (if make-head?
38               (make sequence
39                 (make formatting-instruction data:
40                       (string-append "<" "?php "
41                                      newline
42                                      "require \"../../id_common.inc\";"
43                                      newline
44                                      "id_header(\""
45                                      )
46                       )
47                 title-sosofo
48                 (make formatting-instruction data:
49                       (string-append "\");"
50                                      newline
51                                      "?" ">"
52                                      )
53                       )
54                 (header-navigation (current-node) navlist)
55                 body-sosofo
56                 (footer-navigation (current-node) navlist)
57                 (make formatting-instruction data:
58                       (string-append "<" "?php id_footer() ?>")
59                       )
60                 )
61               body-sosofo
62               )
63           )
64          )
65     (if make-entity?
66         (make entity
67           system-id: (html-entity-file (html-file))
68           (if %html-pubid%
69               (make document-type
70                 name: "HTML"
71                 public-id: %html-pubid%)
72               (empty-sosofo))
73           doc-sosofo)
74         (if (node-list=? (current-node) (sgml-root-element))
75             (make sequence
76               (if %html-pubid%
77                   (make document-type
78                     name: "HTML"
79                     public-id: %html-pubid%)
80                   (empty-sosofo))
81               doc-sosofo)
82             doc-sosofo)
83         )
84     )
85   )
86
87 </style-specification-body>
88 </style-specification>
89 <external-specification id="docbook" document="docbook.dsl">
90 </style-sheet>
91
92 <!--
93 Local Variables:
94 mode: scheme
95 End:
96 -->