svn commit: r186761 - in stable/7/release/doc: . share/mk share/sgml
Hiroki Sato
hrs at FreeBSD.org
Mon Jan 5 05:56:22 UTC 2009
Author: hrs
Date: Mon Jan 5 05:56:19 2009
New Revision: 186761
URL: http://svn.freebsd.org/changeset/base/186761
Log:
Clean up a DSSSL file for release documents:
Remove {,no.}include.historic,
Fix arch="" support, and
Update platform list in README.
Modified:
stable/7/release/doc/README
stable/7/release/doc/share/mk/doc.relnotes.mk
stable/7/release/doc/share/sgml/release.dsl
Modified: stable/7/release/doc/README
==============================================================================
--- stable/7/release/doc/README Mon Jan 5 05:54:13 2009 (r186760)
+++ stable/7/release/doc/README Mon Jan 5 05:56:19 2009 (r186761)
@@ -99,9 +99,10 @@ element will be included. For example:
<para arch="sparc64">SPARC64-specific text</para>
-The currently-supported architectures are i386, sparc64, and
-ia64. An element may appear for multiple architectures by specifying
-a comma-separated list of architectures (i.e. arch="sparc64,ia64").
+The currently-supported architectures are amd64, arm, i386, ia64,
+pc98, powerpc, and sparc64. An element may appear for multiple
+architectures by specifying a comma-separated list of architectures
+(i.e. arch="sparc64,ia64").
When creating a translation, make a new directory under this
directory with a language code (paralleling the DocProj directory
Modified: stable/7/release/doc/share/mk/doc.relnotes.mk
==============================================================================
--- stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:54:13 2009 (r186760)
+++ stable/7/release/doc/share/mk/doc.relnotes.mk Mon Jan 5 05:56:19 2009 (r186761)
@@ -11,23 +11,6 @@ DSLHTML?= ${RELN_ROOT}/share/sgml/defaul
DSLPRINT?= ${RELN_ROOT}/share/sgml/default.dsl
#
-# Tweakable Makefile variables
-#
-# INCLUDE_HISTORIC Used by relnotes document only. When set,
-# causes all release notes entries to be printed,
-# even those marked as "historic". If not set
-# (the default), only print "non-historic"
-# release note entries. To designate a release
-# note entry as "historic", add a role="historic"
-# attribute to the applicable element(s).
-#
-.if defined(INCLUDE_HISTORIC)
-JADEFLAGS+= -iinclude.historic
-.else
-JADEFLAGS+= -ino.include.historic
-.endif
-
-#
# Automatic device list generation:
#
.if exists(${RELN_ROOT}/../man4)
Modified: stable/7/release/doc/share/sgml/release.dsl
==============================================================================
--- stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:54:13 2009 (r186760)
+++ stable/7/release/doc/share/sgml/release.dsl Mon Jan 5 05:56:19 2009 (r186761)
@@ -3,8 +3,6 @@
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % output.html "IGNORE">
<!ENTITY % output.print "IGNORE">
-<!ENTITY % include.historic "IGNORE">
-<!ENTITY % no.include.historic "IGNORE">
<!ENTITY freebsd.dsl PUBLIC "-//FreeBSD//DOCUMENT DocBook Stylesheet//EN" CDATA DSSSL>
<!ENTITY % release.ent PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN">
%release.ent;
@@ -14,14 +12,6 @@
<style-specification use="docbook">
<style-specification-body>
-; Configure behavior of this stylesheet
-<![ %include.historic; [
- (define %include-historic% #t)
-]]>
-<![ %no.include.historic; [
- (define %include-historic% #f)
-]]>
-
; String manipulation functions
(define (split-string-to-list STR)
;; return list of STR separated with char #\ or #\,
@@ -54,92 +44,6 @@
((equal? STR (car s)) #t)
(else (loop (cdr s))))))
-; Deal with conditional inclusion of text via entities.
-(default
- (let* ((arch (attribute-string (normalize "arch")))
- (role (attribute-string (normalize "role")))
- (for-arch (entity-text "arch")))
- (cond
-
- ; If role=historic, and we're not printing historic things, then
- ; don't output this element.
- ((and (equal? role "historic")
- (not %include-historic%))
- (empty-sosofo))
-
-
- ; If arch= not specified, then print unconditionally. This clause
- ; handles the majority of cases.
- ((or (equal? arch #f) (equal? arch ""))
- (next-match))
-
- ; arch= specified, see if it's equal to "all". If so, then
- ; print unconditionally. Note that this clause could be
- ; combined with the check to see if arch= wasn't specified
- ; or was empty; they have the same outcome.
- ((equal? arch "all")
- (next-match))
-
- ; arch= specified. If we're building for all architectures,
- ; then print it prepended with the set of architectures to which
- ; this element applies.
- ;
- ; XXX This doesn't work.
-; ((equal? for-arch "all")
-; (sosofo-append (literal "[") (literal arch) (literal "] ")
-; (process-children)))
-
- ; arch= specified, so we need to check to see if the specified
- ; parameter includes the architecture we're building for.
- ((string-list-match? for-arch (split-string-to-list arch))
- (next-match))
-
- ; None of the above
- (else (empty-sosofo)))))
-
-(mode qandatoc
- (default
- (let* ((arch (attribute-string (normalize "arch")))
- (role (attribute-string (normalize "role")))
- (for-arch (entity-text "arch")))
- (cond
-
- ; If role=historic, and we're not printing historic things, then
- ; don't output this element.
- ((and (equal? role "historic")
- (not %include-historic%))
- (empty-sosofo))
-
-
- ; If arch= not specified, then print unconditionally. This clause
- ; handles the majority of cases.
- ((or (equal? arch #f) (equal? arch ""))
- (next-match))
-
- ; arch= specified, see if it's equal to "all". If so, then
- ; print unconditionally. Note that this clause could be
- ; combined with the check to see if arch= wasn't specified
- ; or was empty; they have the same outcome.
- ((equal? arch "all")
- (next-match))
-
- ; arch= specified. If we're building for all architectures,
- ; then print it prepended with the set of architectures to which
- ; this element applies.
- ;
- ; XXX This doesn't work.
-; ((equal? for-arch "all")
-; (sosofo-append (literal "[") (literal arch) (literal "] ")
-; (process-children)))
-
- ; arch= specified, so we need to check to see if the specified
- ; parameter includes the architecture we're building for.
- ((string-list-match? for-arch (split-string-to-list arch))
- (next-match))
-
- ; None of the above
- (else (empty-sosofo))))))
-
; We might have some sect1 level elements where the modification times
; are significant. An example of this is the "What's New" section in
; the release notes. We enable the printing of pubdate entry in
@@ -150,6 +54,88 @@
; Put URLs in footnotes, and put footnotes at the bottom of each page.
(define bop-footnotes #t)
(define %footnote-ulinks% #t)
+
+ (define ($paragraph$)
+ (let ((arch (attribute-string (normalize "arch")))
+ (role (attribute-string (normalize "role")))
+ (arch-string (entity-text "arch"))
+ (merged-string (entity-text "merged")))
+ (if (or (equal? (print-backend) 'tex)
+ (equal? (print-backend) #f))
+ ;; avoid using country: characteristic because of a JadeTeX bug...
+ (make paragraph
+ first-line-start-indent: (if (is-first-para)
+ %para-indent-firstpara%
+ %para-indent%)
+ space-before: %para-sep%
+ space-after: (if (INLIST?)
+ 0pt
+ %para-sep%)
+ quadding: %default-quadding%
+ hyphenate?: %hyphenation%
+ language: (dsssl-language-code)
+ (make sequence
+ (cond
+ ;; If arch= not specified, then print unconditionally. This clause
+ ;; handles the majority of cases.
+ ((or (equal? arch #f)
+ (equal? arch "")
+ (equal? arch "all"))
+ (process-children-trim))
+ (else
+ (make sequence
+ (literal "[")
+ (let loop ((prev (car (split-string-to-list arch)))
+ (rest (cdr (split-string-to-list arch))))
+ (make sequence
+ (literal prev)
+ (if (not (null? rest))
+ (make sequence
+ (literal ", ")
+ (loop (car rest) (cdr rest)))
+ (empty-sosofo))))
+ (literal "] ")
+ (process-children-trim))))
+ (if (and (not (null? role)) (equal? role "merged"))
+ (literal " [" merged-string "]")
+ (empty-sosofo))))
+ (make paragraph
+ first-line-start-indent: (if (is-first-para)
+ %para-indent-firstpara%
+ %para-indent%)
+ space-before: %para-sep%
+ space-after: (if (INLIST?)
+ 0pt
+ %para-sep%)
+ quadding: %default-quadding%
+ hyphenate?: %hyphenation%
+ language: (dsssl-language-code)
+ country: (dsssl-country-code)
+ (make sequence
+ (cond
+ ;; If arch= not specified, then print unconditionally. This clause
+ ;; handles the majority of cases.
+ ((or (equal? arch #f)
+ (equal? arch "")
+ (equal? arch "all"))
+ (process-children-trim))
+ (else
+ (make sequence
+ (literal "[")
+ (let loop ((prev (car (split-string-to-list arch)))
+ (rest (cdr (split-string-to-list arch))))
+ (make sequence
+ (literal prev)
+ (if (not (null? rest))
+ (make sequence
+ (literal ", ")
+ (loop (car rest) (cdr rest)))
+ (empty-sosofo))))
+ (literal "] ")
+ (process-children-trim))))
+ (if (and (not (null? role)) (equal? role "merged"))
+ (literal " [" merged-string "]")
+ (empty-sosofo)))))))
]]>
<![ %output.html; [
@@ -172,11 +158,59 @@
(u (string-append "&release.man.url;?query="
(data r) "&" "sektion=" (data m))))
(case v
- (("xfree86") (string-append u "&" "manpath=XFree86+&release.manpath.xfree86;" ))
(("xorg") (string-append u "&" "manpath=Xorg+&release.manpath.xorg;" ))
(("netbsd") (string-append u "&" "manpath=NetBSD+&release.manpath.netbsd;"))
(("ports") (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd-ports;"))
(else (string-append u "&" "manpath=FreeBSD+&release.manpath.freebsd;")))))
+
+ ;; $paragraph$ function with arch attribute support.
+ (define ($paragraph$ #!optional (para-wrapper "P"))
+ (let ((footnotes (select-elements (descendants (current-node))
+ (normalize "footnote")))
+ (tgroup (have-ancestor? (normalize "tgroup")))
+ (arch (attribute-string (normalize "arch")))
+ (role (attribute-string (normalize "role")))
+ (arch-string (entity-text "arch"))
+ (merged-string (entity-text "merged")))
+ (make sequence
+ (make element gi: para-wrapper
+ attributes: (append
+ (if %default-quadding%
+ (list (list "ALIGN" %default-quadding%))
+ '()))
+ (make sequence
+ (cond
+ ;; If arch= not specified, then print unconditionally. This clause
+ ;; handles the majority of cases.
+ ((or (equal? arch #f)
+ (equal? arch "")
+ (equal? arch "all"))
+ (process-children))
+ (else
+ (sosofo-append
+ (make sequence
+ (literal "[")
+ (let loop ((prev (car (split-string-to-list arch)))
+ (rest (cdr (split-string-to-list arch))))
+ (make sequence
+ (literal prev)
+ (if (not (null? rest))
+ (make sequence
+ (literal ", ")
+ (loop (car rest) (cdr rest)))
+ (empty-sosofo))))
+ (literal "] ")
+ (process-children)))))
+ (if (and (not (null? role)) (equal? role "merged"))
+ (literal " [" merged-string "]")
+ (empty-sosofo))
+ (if (or %footnotes-at-end% tgroup (node-list-empty? footnotes))
+ (empty-sosofo)
+ (make element gi: "BLOCKQUOTE"
+ attributes: (list
+ (list "CLASS" "FOOTNOTES"))
+ (with-mode footnote-mode
+ (process-node-list footnotes)))))))))
]]>
(define (toc-depth nd)
More information about the svn-src-stable-7
mailing list