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