Give each language and encoding it's own freebsd.dsl, to contain style

sheet definitions for that language only.  Each file reads in the defaults
from the master share/sgml/freebsd.dsl file, and adds overrides, or new
definitions, as necessary.

Move the per-language hacks from share/sgml/freebsd.dsl in to
<lang>/share/sgml/freebsd.dsl as necessary.

Add links to the -questions and -doc mailing lists to the bottom of the
generated HTML output for some languages.  The -questions link will
become a link to Greg's "Getting the most from questions" document when
I bring that in, but I haven't done that yet, and I didn't want these
patches hanging around my local tree.

This was the real reason for making freebsd.dsl language local, as it
makes it much easier to translate generated text, such as the text of
the links, without polluting share/sgml/freebsd.dsl.

Update doc.docbook.mk to use the new, per-language freebsd.dsl file when
building the docs.  While I'm here, update .pdb generation so that it
creates a symlink to ${CURDIR:T}.pdb as well (e.g., the Handbook generates
"book.pdb" and "handbook.pdb").  This makes it easier to install more than
one document on a Palm, because two docs called "book.pdb" or "article.pdb"
can not co-exist.
This commit is contained in:
Nik Clayton 2000-03-23 09:00:17 +00:00
parent 2194956cdd
commit a595525171
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=6844
14 changed files with 287 additions and 34 deletions
en_US.ISO8859-1/share/sgml
en_US.ISO_8859-1/share/sgml
es_ES.ISO8859-1/share/sgml
es_ES.ISO_8859-1/share/sgml
fr_FR.ISO8859-1/share/sgml
fr_FR.ISO_8859-1/share/sgml
ja_JP.eucJP
ru_RU.KOI8-R
share
zh_TW.Big5/share/sgml

View file

@ -0,0 +1,30 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -0,0 +1,30 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -0,0 +1,30 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -0,0 +1,30 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -0,0 +1,37 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
<!-- Fix a problem with the French localisation. This should really
be a patch to the dsssl-docbook-modular port, but this gets it
more widely available sooner. A patch will be applied to the
port as well, and then this can be removed. -->
(define (gentext-fr-nav-prev prev)
(make sequence (literal "Pr\U-00E9;c\U-00E9;dent")))
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -0,0 +1,37 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
<!-- Fix a problem with the French localisation. This should really
be a patch to the dsssl-docbook-modular port, but this gets it
more widely available sooner. A patch will be applied to the
port as well, and then this can be removed. -->
(define (gentext-fr-nav-prev prev)
(make sequence (literal "Pr\U-00E9;c\U-00E9;dent")))
(define ($email-footer$)
(make sequence
(literal "For questions about FreeBSD, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:questions@FreeBSD.org"))
(literal "questions@FreeBSD.org"))
(literal ">.")
(make empty-element gi: "br")
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:doc@FreeBSD.org"))
(literal "doc@FreeBSD.org"))
(literal ">.")))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -1,9 +1,8 @@
# #
# $FreeBSD$ # $FreeBSD: doc/ja_JP.eucJP/articles/Makefile.inc,v 1.1.1.1 2000/01/06 07:22:40 kuriyama Exp $
# #
# Original revision: 1.3 # Original revision: 1.3
JADEFLAGS= -ilang.ja
TIDYFLAGS= -raw TIDYFLAGS= -raw
DESTDIR?= ${DOCDIR}/ja/articles/${.CURDIR:T} DESTDIR?= ${DOCDIR}/ja/articles/${.CURDIR:T}

View file

@ -1,8 +1,7 @@
# #
# $FreeBSD$ # $FreeBSD: doc/ja_JP.eucJP/books/Makefile.inc,v 1.4 1999/09/06 06:53:19 peter Exp $
# #
JADEFLAGS= -ilang.ja
TIDYFLAGS= -raw TIDYFLAGS= -raw
DESTDIR?= ${DOCDIR}/ja/books/${.CURDIR:T} DESTDIR?= ${DOCDIR}/ja/books/${.CURDIR:T}

View file

@ -0,0 +1,17 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define %gentext-language% "ja")
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=EUC-JP"))))
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -1,8 +1,7 @@
# #
# $FreeBSD: doc/ru_RU.KOI8-R/books/Makefile.inc,v 1.3 1999/10/13 00:33:42 phantom Exp $ # $FreeBSD: doc/ru_RU.KOI8-R/books/Makefile.inc,v 1.4 1999/10/31 22:13:32 phantom Exp $
# #
JADEFLAGS= -ilang.ru
TIDYFLAGS= -raw TIDYFLAGS= -raw
DESTDIR?= ${DOCDIR}/ru_RU.KOI8-R/books/${.CURDIR:T} DESTDIR?= ${DOCDIR}/ru_RU.KOI8-R/books/${.CURDIR:T}

View file

@ -0,0 +1,17 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
(define %gentext-language% "ja")
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=koi8-r"))))
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>

View file

@ -1,5 +1,5 @@
# #
# $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.7 2000/02/03 03:10:43 kuriyama Exp $ # $FreeBSD: doc/share/mk/doc.docbook.mk,v 1.8 2000/03/08 11:21:37 nbm Exp $
# #
# This include file <doc.docbook.mk> handles building and installing of # This include file <doc.docbook.mk> handles building and installing of
# DocBook documentation in the FreeBSD Documentation Project. # DocBook documentation in the FreeBSD Documentation Project.
@ -49,8 +49,8 @@ MASTERDOC?= ${.CURDIR}/${DOC}.sgml
JADE= ${PREFIX}/bin/jade JADE= ${PREFIX}/bin/jade
DSLHTML?= ${DOC_PREFIX}/share/sgml/freebsd.dsl DSLHTML?= ../../share/sgml/freebsd.dsl
DSLPRINT?= ${DOC_PREFIX}/share/sgml/freebsd.dsl DSLPRINT?= ../../share/sgml/freebsd.dsl
FREEBSDCATALOG= ${DOC_PREFIX}/share/sgml/catalog FREEBSDCATALOG= ${DOC_PREFIX}/share/sgml/catalog
DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog DOCBOOKCATALOG= ${PREFIX}/share/sgml/docbook/catalog
@ -137,8 +137,8 @@ CLEANFILES+= ${DOC}.tar
_docs+= ${DOC}.doc _docs+= ${DOC}.doc
CLEANFILES+= ${DOC}.doc CLEANFILES+= ${DOC}.doc
.elif ${_cf} == "pdb" .elif ${_cf} == "pdb"
_docs+= ${DOC}.pdb _docs+= ${DOC}.pdb ${.CURDIR:T}.pdb
+CLEANFILES+= ${DOC}.pdb +CLEANFILES+= ${DOC}.pdb ${.CURDIR:T}.pdb
.endif .endif
.endfor .endfor
@ -185,7 +185,10 @@ ${DOC}.txt: ${DOC}.html
w3m -S -dump ${.ALLSRC} > ${.TARGET} w3m -S -dump ${.ALLSRC} > ${.TARGET}
${DOC}.pdb: ${DOC}.html ${DOC}.pdb: ${DOC}.html
iSilo386 -y -d0 -Idef ${DOC}.html ${DOC}.pdb iSiloBSD -y -d0 -Idef ${DOC}.html ${DOC}.pdb
${.CURDIR:T}.pdb: ${DOC}.pdb
ln -f ${DOC}.pdb ${.CURDIR}.pdb
${DOC}.rtf: ${SRCS} ${DOC}.rtf: ${SRCS}
${JADE} -Vrtf-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC} ${JADE} -Vrtf-backend -ioutput.print ${JADEOPTS} -d ${DSLPRINT} -t rtf -o ${.TARGET} ${MASTERDOC}

View file

@ -1,34 +1,21 @@
<!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.12 2000/02/14 01:29:17 nik Exp $ --> <!-- $FreeBSD: doc/share/sgml/freebsd.dsl,v 1.13 2000/02/15 01:57:17 nik Exp $ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [ <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY % output.html "IGNORE"> <!ENTITY % output.html "IGNORE">
<!ENTITY % output.print "IGNORE"> <!ENTITY % output.print "IGNORE">
<!ENTITY % lang.ja "IGNORE">
<!ENTITY % lang.ja.dsssl "IGNORE">
<!ENTITY % lang.ru "IGNORE">
<![ %output.html; [ <![ %output.html; [
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL> <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
]]> ]]>
<![ %output.print; [ <![ %output.print; [
<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL> <!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
]]> ]]>
]> ]>
<style-sheet> <style-sheet>
<style-specification use="docbook"> <style-specification use="docbook">
<style-specification-body> <style-specification-body>
<!-- Locatization -->
<![ %lang.ja; [
<![ %lang.ja.dsssl; [
(define %gentext-language% "ja")
]]>
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=EUC-JP"))))
]]>
<![ %lang.ru; [
(define %html-header-tags% '(("META" ("HTTP-EQUIV" "Content-Type") ("CONTENT" "text/html; charset=koi8-r"))))
]]>
<!-- HTML only .................................................... --> <!-- HTML only .................................................... -->
<![ %output.html; [ <![ %output.html; [
@ -74,12 +61,35 @@
attributes: '(("VALIGN" "TOP")) attributes: '(("VALIGN" "TOP"))
(process-children))) (process-children)))
<!-- Fix a problem with the French localisation. This should really <!-- The next two definitions control the appearance of an
be a patch to the dsssl-docbook-modular port, but this gets it e-mail footer at the bottom of each page. -->
more widely available sooner. A patch will be applied to the
port as well, and then this can be removed. --> <!-- This is the text to display at the bottom of each page.
(define (gentext-fr-nav-prev prev) Defaults to nothing. The individual stylesheets should
(make sequence (literal "Pr\U-00E9;c\U-00E9;dent"))) redefine this as necessary. -->
(define ($email-footer$)
(empty-sosofo))
<!-- This code handles displaying $email-footer$ at the bottom
of each page.
If "nuchunks" is turned on then we make sure that an <hr>
is shown first.
Then create a centered paragraph ("<p>"), and reduce the font
size ("<small>"). Then run $email-footer$, which should
create the text and links as necessary. -->
(define ($html-body-end$)
(if (equal? $email-footer$ (normalize ""))
(empty-sosofo)
(make sequence
(if nochunks
(make empty-element gi: "hr")
(empty-sosofo))
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
($email-footer$))))))
]]> ]]>
<!-- Print only ................................................... --> <!-- Print only ................................................... -->

View file

@ -0,0 +1,15 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY freebsd.dsl SYSTEM "../../../share/sgml/freebsd.dsl" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="freebsd.dsl">
</style-sheet>