root/alternc/trunk/aide/bin/frames.dsl

Revision 1, 4.0 kB (checked in by anarcat, 3 years ago)

[project @ Tailorization of alternc]
Tailorization of alternc

Import of the upstream sources from

Repository: /cvs
Module: alternc
Revision: 2003-03-26 17:41:29 by root

Original author: tailor@cvs
Date: 2005-08-30 16:57:40

Line 
1 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
2 <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
3 ]>
4
5 <style-sheet>
6 <style-specification use="docbook">
7 <style-specification-body>
8
9 (define %stylesheet-version%
10   "DocBook HTML Frames Stylesheet version 2.0")
11
12
13 (define %stylesheet% "docbook.css");
14
15
16
17 (root
18  (make sequence
19    (process-children)
20    (with-mode manifest
21      (process-children))
22    (make-dhtml-toc)))
23
24
25
26 (define (make-dhtml-toc)
27   (make entity
28     system-id: "toc.htm"
29     (make element gi: "HTML"
30           (make element gi: "HEAD"
31                 (make element gi: "TITLE" (literal "DocBook TOC"))
32                 ($standard-html-header$))
33           (make element gi: "BODY"
34                 (with-mode dhtmltoc
35                            (process-children))
36                 )))
37   )
38
39
40
41
42
43
44
45 (define (dhtml-toc-entry nd gilist)
46   (let*
47
48       (
49        (subdivnodes (node-list-filter-by-gi (children nd) gilist))
50        (subdivs (and (> (node-list-length subdivnodes) 0) (not (node-list=? nd (sgml-root-element))) ) )
51
52        )
53
54
55     (if (node-list=? nd (sgml-root-element))
56                                         ; SEQUENCE 1 : ROOT element
57         (make sequence
58               (make element gi: "NOBR"           
59               (make element gi: "A"
60                     attributes: (list (list "HREF" (href-to (current-node)))
61                                       (list "TARGET" "right")
62                                       )
63                     (element-title-sosofo (current-node))
64                     )
65               (make empty-element gi: "BR")
66               (make element gi: "UL"
67                     attributes: (list (list "CLASS" "TOC"))
68                     (process-children))
69               )
70               )
71                                         ; SEQUENCE 2 : Children elements
72       (make sequence
73             (make empty-element gi: "LI")
74             (make element gi: "NOBR"           
75             (make element gi: "A"
76                   attributes: (list (list "HREF" (href-to (current-node)))
77                                     (list "TARGET" "right")
78                                     )
79                   (element-title-sosofo (current-node))
80                   ))
81                                         ; DIV ENFANT :
82             (make element gi: "UL"
83                   attributes: (list (list "CLASS" "TOC2"))
84                   (process-children))
85
86             ) ; sequence
87       ) ; if node-list ...
88
89     ))
90
91
92
93
94
95
96
97
98
99
100 (mode dhtmltoc
101       (default (empty-sosofo))
102
103       (element set (dhtml-toc-entry (current-node)
104                                     (list (normalize "book"))))
105
106       (element book (dhtml-toc-entry (current-node)
107                                      (list (normalize "part")
108                                            (normalize "preface")
109                                            (normalize "chapter")
110                                            (normalize "appendix")
111                                            (normalize "reference"))))
112
113       (element preface (dhtml-toc-entry (current-node)
114                                         (list (normalize "sect1"))))
115
116       (element part (dhtml-toc-entry (current-node)
117                                      (list (normalize "preface")
118                                            (normalize "chapter")
119                                            (normalize "appendix")
120                                            (normalize "reference"))))
121
122       (element chapter (dhtml-toc-entry (current-node)
123                                         (list (normalize "sect1"))))
124
125       (element appendix (dhtml-toc-entry (current-node)
126                                          (list (normalize "sect1"))))
127
128       (element sect1 (dhtml-toc-entry (current-node) '()))
129
130       (element reference (dhtml-toc-entry (current-node)
131                                           (list (normalize "refentry"))))
132
133       (element refentry (dhtml-toc-entry (current-node) '()))
134
135       )
136
137
138
139 </style-specification-body>
140 </style-specification>
141
142 <external-specification id="docbook" document="docbook.dsl">
143
144 </style-sheet>
Note: See TracBrowser for help on using the browser.