svn commit: r229788 - stable/9/release/doc/share/sgml
Hiroki Sato
hrs at FreeBSD.org
Sat Jan 7 18:53:15 UTC 2012
Author: hrs
Date: Sat Jan 7 18:53:14 2012
New Revision: 229788
URL: http://svn.freebsd.org/changeset/base/229788
Log:
Add revision attribute handling. Links are now generated at the end
of the paragraph from revision="NNN".
Modified:
stable/9/release/doc/share/sgml/release.dsl
Modified: stable/9/release/doc/share/sgml/release.dsl
==============================================================================
--- stable/9/release/doc/share/sgml/release.dsl Sat Jan 7 18:52:16 2012 (r229787)
+++ stable/9/release/doc/share/sgml/release.dsl Sat Jan 7 18:53:14 2012 (r229788)
@@ -170,6 +170,7 @@
(tgroup (have-ancestor? (normalize "tgroup")))
(arch (attribute-string (normalize "arch")))
(role (attribute-string (normalize "role")))
+ (rev (attribute-string (normalize "revision")))
(arch-string (entity-text "arch"))
(merged-string (entity-text "merged")))
(make sequence
@@ -179,28 +180,46 @@
(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)))))
+ (sosofo-append
+ (if (and (not (equal? arch #f))
+ (not (equal? arch ""))
+ (not (equal? arch "all")))
+ (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 "] "))
+ (empty-sosofo))
+ (process-children)
+ (if (and (not (equal? rev #f))
+ (not (equal? rev "")))
+ (make sequence
+ (literal "[")
+ (let loop ((prev (car (split-string-to-list rev)))
+ (rest (cdr (split-string-to-list rev))))
+ (make sequence
+ (make element gi: "A"
+ attributes: (list
+ (list "HREF" (string-append
+ "http://svn.freebsd.org/viewvc/base?view=revision&revision="
+ prev))
+ (list "TARGET" "_top"))
+ (literal "r")
+ (literal prev))
+ (if (not (null? rest))
+ (make sequence
+ (literal ", ")
+ (loop (car rest) (cdr rest)))
+ (empty-sosofo))))
+ (literal "] "))
+ (empty-sosofo)))
(if (and (not (null? role)) (equal? role "merged"))
(literal " [" merged-string "]")
(empty-sosofo))
More information about the svn-src-stable-9
mailing list