1 <!-- $FreeBSD: src/release/doc/share/sgml/release.dsl,v 1.2.2.4 2003/06/11 21:04:44 hrs Exp $ -->
3 <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
4 <!ENTITY % output.html "IGNORE">
5 <!ENTITY % output.print "IGNORE">
6 <!ENTITY freebsd.dsl PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN" CDATA DSSSL>
7 <!ENTITY % release.ent PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
12 <style-specification use="docbook">
13 <style-specification-body>
15 ; String manipulation functions
16 (define (split-string-to-list STR)
17 ;; return list of STR separated with char #\ or #\,
19 (let loop ((i (string-delim-index STR)))
20 (cond ((equal? (cdr i) '()) '())
21 (else (cons (substring STR (list-ref i 0) (- (list-ref i 1) 1))
25 (define (string-delim-index STR)
26 ;; return indexes of STR separated with char #\ or #\,
28 (let ((strlen (string-length STR)))
30 (cond ((= i strlen) (cons (+ strlen 1) '()))
31 ((= i 0) (cons i (loop (+ i 1))))
32 ((or (equal? (string-ref STR i) #\ )
33 (equal? (string-ref STR i) #\,)) (cons (+ i 1) (loop (+ i 1))))
34 (else (loop (+ i 1))))))
38 (define (string-list-match? STR STR-LIST)
39 (let loop ((s STR-LIST))
43 ((equal? (car s) #f) #f)
44 ((equal? STR (car s)) #t)
45 (else (loop (cdr s))))))
47 ; Deal with conditional inclusion of text via entities.
49 (let* ((arch (attribute-string (normalize "arch")))
50 (for-arch (entity-text "arch")))
53 ; If arch= not specified, then print unconditionally. This clause
54 ; handles the majority of cases.
55 ((or (equal? arch #f) (equal? arch ""))
58 ; arch= specified, see if it's equal to "all". If so, then
59 ; print unconditionally. Note that this clause could be
60 ; combined with the check to see if arch= wasn't specified
61 ; or was empty; they have the same outcome.
65 ; arch= specified. If we're building for all architectures,
66 ; then print it prepended with the set of architectures to which
67 ; this element applies.
69 ; XXX This doesn't work.
70 ; ((equal? for-arch "all")
71 ; (sosofo-append (literal "[") (literal arch) (literal "] ")
72 ; (process-children)))
74 ; arch= specified, so we need to check to see if the specified
75 ; parameter includes the architecture we're building for.
76 ((string-list-match? for-arch (split-string-to-list arch))
80 (else (empty-sosofo)))))
82 ; We might have some sect1 level elements where the modification times
83 ; are significant. An example of this is the "What's New" section in
84 ; the release notes. We enable the printing of pubdate entry in
85 ; sect1info elements to support this.
86 (element (sect1info pubdate) (process-children))
89 ; Put URLs in footnotes, and put footnotes at the bottom of each page.
90 (define bop-footnotes #t)
91 (define %footnote-ulinks% #t)
95 <!-- Convert " ... " to `` ... '' in the HTML output. -->
102 <!-- Specify how to generate the man page link HREF -->
103 (define ($create-refentry-xref-link$ #!optional (n (current-node)))
104 (let* ((r (select-elements (children n) (normalize "refentrytitle")))
105 (m (select-elements (children n) (normalize "manvolnum")))
106 (v (attribute-string (normalize "vendor") n))
107 (u (string-append "http://www.FreeBSD.org/cgi/man.cgi?query="
108 (data r) "&" "sektion=" (data m))))
110 (("xfree86") (string-append u "&" "manpath=XFree86+&release.manpath.xfree86;" ))
111 (("netbsd") (string-append u "&" "manpath=NetBSD+&release.manpath.netbsd;"))
112 (("ports") (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd-ports;"))
113 (else (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd;")))))
116 (define (toc-depth nd)
117 (if (string=? (gi nd) (normalize "book"))
121 </style-specification-body>
122 </style-specification>
124 <external-specification id="docbook" document="freebsd.dsl">