%freebsd.l10n; %freebsd.l10n-common; ]> (declare-flow-object-class formatting-instruction "UNREGISTERED::James Clark//Flow Object Class::formatting-instruction") (define %hyphenation% #f) (define ($user-html-header$ #!optional (home (empty-node-list)) (up (empty-node-list)) (prev (empty-node-list)) (next (empty-node-list))) ;; Add additional header tags. (let loop ((tl %html-header-tags%)) (if (or (null? tl) (null? (car tl))) (empty-sosofo) (make sequence (cond ((equal? (normalize "SCRIPT") (car (car tl))) (make sequence (make empty-element gi: (car (car tl)) attributes: (cdr (car tl))) (htmlnewline) (make formatting-instruction data: ""))) (else (make sequence (make empty-element gi: (car (car tl)) attributes: (cdr (car tl)))))) (loop (cdr tl)))))) (define %html-header-script-googlejs% "http://www.FreeBSD.org/layout/js/google.js") (define %html-header-script% #f) (define %html-header-tags% (list (quote ("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=&doc.html.charset;"))) (if %html-header-script% (list "SCRIPT" (list "TYPE" "text/javascript") (list "SRC" %html-header-script-googlejs%)) '()))) (define %gentext-nav-use-tables% ;; Use tables to build the navigation headers and footers? #t) (define %html-ext% ;; Default extension for HTML output files ".html") (define %shade-verbatim% ;; Should verbatim environments be shaded? #f) (define %use-id-as-filename% ;; Use ID attributes as name for component HTML files? #t) (define %root-filename% ;; Name for the root HTML document "index") (define html-manifest ;; Write a manifest? #f) (define %generate-legalnotice-link% ;; Should legal notices be a link to a separate file? ;; ;; Naturally, this has no effect if you're building one big ;; HTML file. #f) (define %generate-docformat-navi-link% ;; Create docformat navi link for HTML output? #f) ;; Taken from Norm's stylesheets; modified to add support for TITLE so ;; that we get a mouse over definition for acronyms in HTML output. (define ($acronym-seq$ #!optional (sosofo (process-children))) (let* ((acronym-remark (select-elements (children (current-node)) (normalize "remark")))) (let* ((title (if (and acronym-remark (equal? (attribute-string (normalize "role") acronym-remark) "acronym")) (data acronym-remark) ""))) (make element gi: "ACRONYM" attributes: (list (list "CLASS" (gi)) (list "TITLE" title)) sosofo)))) (define (book-titlepage-recto-elements) (list (normalize "title") (normalize "subtitle") (normalize "graphic") (normalize "mediaobject") (normalize "corpauthor") (normalize "authorgroup") (normalize "author") (normalize "editor") (normalize "copyright") (normalize "abstract") (normalize "legalnotice") (normalize "isbn"))) ;; Create a simple navigation link ;; if %generate-docformat-navi-link% defined. (define (make-docformat-navi tlist) (let ((rootgi (gi (sgml-root-element)))) (make element gi: "DIV" attributes: '(("CLASS" "DOCFORAMTNAVI")) (literal "[ ") (make-docformat-navi-link rootgi tlist) (literal " ]")))) (define (make-docformat-navi-link rootgi tlist) (make sequence (cond ((null? tlist) (empty-sosofo)) ((null? (car tlist)) (empty-sosofo)) ((not (symbol? (car tlist))) (empty-sosofo)) ((equal? (car tlist) 'html-split) (make sequence (create-link (list (list "href" "./index.html")) (literal "&docnavi.split-html;")) (if (not (null? (cdr tlist))) (make sequence (literal " / ") (make-docformat-navi-link rootgi (cdr tlist))) (empty-sosofo)))) ((equal? (car tlist) 'html-single) (make sequence (create-link (list (list "href" (string-append "./" (case-fold-down rootgi) ".html"))) (literal "&docnavi.single-html;")) (if (not (null? (cdr tlist))) (make sequence (literal " / ") (make-docformat-navi-link rootgi (cdr tlist))) (empty-sosofo)))) (else (empty-sosofo))))) (define (article-titlepage-separator side) (make sequence (if %generate-docformat-navi-link% (make-docformat-navi '(html-split html-single)) (empty-sosofo)) (make empty-element gi: "HR"))) (define (book-titlepage-separator side) (if (equal? side 'recto) (make sequence (if %generate-docformat-navi-link% (make-docformat-navi '(html-split html-single)) (empty-sosofo)) (make empty-element gi: "HR")) (empty-sosofo))) (define ($email-footer$) (empty-sosofo)) (define html-index-filename (if nochunks "html.index" "html-split.index")) (define %stylesheet% "docbook.css") (define ($html-body-end$) (if (equal? $email-footer$ (normalize "")) (empty-sosofo) (make sequence (if nochunks (make empty-element gi: "hr") (empty-sosofo)) ($email-footer$)))) (define %refentry-xref-link% ;; REFENTRY refentry-xref-link ;; PURP Generate URL links when cross-referencing RefEntrys? ;; DESC ;; If true, a web link will be generated, presumably ;; to an online man->HTML gateway. The text of the link is ;; generated by the $create-refentry-xref-link$ function. ;; /DESC ;; AUTHOR N/A ;; /REFENTRY #t) (define ($create-refentry-xref-link$ #!optional (n (current-node))) (let* ((r (select-elements (children n) (normalize "refentrytitle"))) (m (select-elements (children n) (normalize "manvolnum"))) (v (attribute-string (normalize "vendor") n)) (u (string-append "http://www.FreeBSD.org/cgi/man.cgi?query=" (data r) "&" "amp;" "sektion=" (data m)))) (case v (("current") (string-append u "&" "amp;" "manpath=FreeBSD+9-current")) (("xfree86") (string-append u "&" "amp;" "manpath=XFree86+4.7.0")) (("xorg") (string-append u "&" "amp;" "manpath=X11R7.4")) (("netbsd") (string-append u "&" "amp;" "manpath=NetBSD+5.1")) (("openbsd") (string-append u "&" "amp;" "manpath=OpenBSD+4.7")) (("ports") (string-append u "&" "amp;" "manpath=FreeBSD+8.2-RELEASE+and+Ports")) (else u)))) (element svnref (let ((svnurl (string-append "http://svnweb.freebsd.org/base?view=revision" "&" "amp;" "revision=" (data (current-node))))) (create-link (list (list "HREF" svnurl)) ($mono-seq$)))) (element application ($bold-seq$)) (element citerefentry (let ((href ($create-refentry-xref-link$))) (if %refentry-xref-link% (create-link (list (list "HREF" href)) (if %refentry-xref-italic% ($italic-seq$) ($charseq$))) (if %refentry-xref-italic% ($italic-seq$) ($charseq$))))) (element filename (let* ((class (attribute-string (normalize "role")))) (cond ((equal? class "package") (let* ((urlurl "http://svnweb.FreeBSD.org/") (href (string-append urlurl "ports/head/" (data (current-node)) "/pkg-descr?revision=HEAD"))) (create-link (list (list "HREF" href)) ($mono-seq$)))) (else ($mono-seq$))))) ;; Do not render email with mailto: when nolink role attribute ;; is used or when the email address matches ;; @example.{com|net|org} (element email (let* ((class (attribute-string (normalize "role")))) (cond ((or (equal? class "nolink") (and (> (string-length (data (current-node))) 11) (string=? (substring (data (current-node)) (- (string-length (data (current-node))) 11) (- (string-length (data (current-node))) 4)) "example"))) ($code-seq$ (make sequence (literal "<") (process-children) (literal ">")))) (else (next-match))))) ;; Ensure that we start with no preferred mediaobject notations, ;; so that in the text-only case we don't choose any of the ;; possible images, and fallback to the most appropriate ;; textobject (define preferred-mediaobject-notations '()) (element quote (make sequence (literal "“") (process-children) (literal "”"))) ;; The special FreeBSD version of the trademark tag handling. ;; This function was more or less taken from the DocBook DSSSL ;; stylesheets by Norman Walsh. (element trademark (if (show-tm-symbol? (current-node)) (make sequence ($charseq$) (cond ((equal? (attribute-string "class") (normalize "copyright")) (make entity-ref name: "copy")) ((equal? (attribute-string "class") (normalize "registered")) (make entity-ref name: "reg")) ((equal? (attribute-string "class") (normalize "service")) (make element gi: "SUP" (literal "SM"))) (else (make entity-ref name: "#8482")))) ($charseq$))) ;; multiple copyright holders should be separated. (element (copyright holder) (make sequence ($charseq$) (if (not (last-sibling? (current-node))) (literal ", ") (empty-sosofo)))) ]]>