More RELNOTESng infrastructure fixup: The directory layout of

stylesheets (particularly with respect to translations) is now similar
to that of the doc/ tree.  Added a customization for HTML page footers
(this is the only reader-visible change).
This commit is contained in:
Bruce A. Mah 2001-05-03 21:59:35 +00:00
parent bb59398935
commit e758685bc9
6 changed files with 199 additions and 3 deletions

View File

@ -18,10 +18,21 @@ DOC_PREFIX Makefile variable. RELNOTESng also requires the DocProj
build tools, which can easily be installed with the textproc/docproj
port in the Ports Collection.
Notable files and directories:
share/mk/doc.relnotes.mk
Common Makefile definitions for RELNOTESng. These definitions
mostly accomodate the fact that we're building DocProj-like
documents outside the doc/ tree.
share/sgml/catalog
Main SGML catalog for all language-neutral (and default EN)
stylesheet and entity files. Can be overridden if needed for
translations.
share/sgml/default.dsl
All documents build with this file as a stylesheet. All it
does is to make it possible to use the document catalogs to
locate the "real" stylesheet by reference, rather than having
to specify it by pathname.
share/sgml/release.dsl
Language-neutral stylesheet. This stylesheet supports
the arch= attribute on (all?) DocBook elements; elements with
@ -34,6 +45,14 @@ share/sgml/release.ent
this file when rolling new revisions; these should take effect
in all documents.
en_US.ISO_8859-1/share/sgml/release.dsl
Language-dependent stylesheet for en, but also the default for
translations if they don't override the settings here. This
stylesheet sets the email footer at the bottom of HTML pages,
as well as a few other parameters. If necessary for
translations, this file can be overridden with
*/share/sgml/release.dsl and */share/sgml/catalog.
*/relnotes/common/
Directory for multi-architecture release notes files.
*/relnotes/*/
@ -87,7 +106,13 @@ should be possible.
When creating a translation, make a new directory under this
directory with a language code (paralleling the DocProj directory
structure).
structure). If necessary, new language-dependent HTML footers can be
generated by making a new language-dependent
${LANG}/share/sgml/release.dsl, a ${LANG}/share/sgml/catalog that
points to it, and a new definition in the Makefiles that adds
${LANG}/share/sgml/catalog to EXTRA_CATALOGS. Except for the Makefile
changes, this is the same procedure that is used for creating a new
translation for DocProj files.
RELNOTESng is supported in the FreeBSD release-build process. For
now, the building of RELNOTESng is enabled by RELNOTESNG=YES when

View File

@ -0,0 +1,75 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY release.dsl PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Language Neutral Stylesheet//EN" CDATA DSSSL>
<!ENTITY % output.html "IGNORE">
<!ENTITY % output.print "IGNORE">
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "This file, and other release-related documents, can be downloaded from ")
(make element gi: "a"
attributes: (list (list "href" (entity-text "release.url")))
(literal (entity-text "release.url")))
(literal ".")))
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "For questions about FreeBSD, read the ")
(make element gi: "a"
attributes: (list (list "href" "http://www.freebsd.org/docs.html"))
(literal "documentation"))
(literal " before contacting <")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-questions@FreeBSD.org"))
(literal "freebsd-questions@FreeBSD.org"))
(literal ">.")
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "All users of FreeBSD ")
(literal (entity-text "release.branch"))
(literal " should subscribe to the ")
(literal "<")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-current@FreeBSD.org"))
(literal "freebsd-current@FreeBSD.org"))
(literal "> mailing list.")))
(make element gi: "p"
attributes: (list (list "align" "center"))
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-doc@FreeBSD.org"))
(literal "freebsd-doc@FreeBSD.org"))
(literal ">."))))))
<!-- Convert " ... " to `` ... '' in the HTML output. -->
(element quote
(make sequence
(literal "``")
(process-children)
(literal "''")))
<!-- Generate links to HTML man pages -->
(define %refentry-xref-link% #t)
<!-- Specify how to generate the man page link HREF -->
(define ($create-refentry-xref-link$ refentrytitle manvolnum)
(string-append "http://www.FreeBSD.org/cgi/man.cgi?query="
refentrytitle "&" "sektion=" manvolnum))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="release.dsl">
</style-sheet>

View File

@ -0,0 +1,75 @@
<!-- $FreeBSD$ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY release.dsl PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Language Neutral Stylesheet//EN" CDATA DSSSL>
<!ENTITY % output.html "IGNORE">
<!ENTITY % output.print "IGNORE">
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
<![ %output.html; [
(define ($email-footer$)
(make sequence
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "This file, and other release-related documents, can be downloaded from ")
(make element gi: "a"
attributes: (list (list "href" (entity-text "release.url")))
(literal (entity-text "release.url")))
(literal ".")))
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "For questions about FreeBSD, read the ")
(make element gi: "a"
attributes: (list (list "href" "http://www.freebsd.org/docs.html"))
(literal "documentation"))
(literal " before contacting <")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-questions@FreeBSD.org"))
(literal "freebsd-questions@FreeBSD.org"))
(literal ">.")
(make element gi: "p"
attributes: (list (list "align" "center"))
(make element gi: "small"
(literal "All users of FreeBSD ")
(literal (entity-text "release.branch"))
(literal " should subscribe to the ")
(literal "<")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-current@FreeBSD.org"))
(literal "freebsd-current@FreeBSD.org"))
(literal "> mailing list.")))
(make element gi: "p"
attributes: (list (list "align" "center"))
(literal "For questions about this documentation, e-mail <")
(make element gi: "a"
attributes: (list (list "href" "mailto:freebsd-doc@FreeBSD.org"))
(literal "freebsd-doc@FreeBSD.org"))
(literal ">."))))))
<!-- Convert " ... " to `` ... '' in the HTML output. -->
(element quote
(make sequence
(literal "``")
(process-children)
(literal "''")))
<!-- Generate links to HTML man pages -->
(define %refentry-xref-link% #t)
<!-- Specify how to generate the man page link HREF -->
(define ($create-refentry-xref-link$ refentrytitle manvolnum)
(string-append "http://www.FreeBSD.org/cgi/man.cgi?query="
refentrytitle "&" "sektion=" manvolnum))
]]>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="release.dsl">
</style-sheet>

View File

@ -6,8 +6,8 @@ DOC_PREFIX?= ${RELN_ROOT}/../../../doc
EXTRA_CATALOGS+= ${RELN_ROOT}/share/sgml/catalog
# Use the appropriate architecture-dependent RELNOTESng stylesheet
DSLHTML?= ${RELN_ROOT}/share/sgml/release.dsl
DSLPRINT?= ${RELN_ROOT}/share/sgml/release.dsl
DSLHTML?= ${RELN_ROOT}/en_US.ISO_8859-1/share/sgml/release.dsl
DSLPRINT?= ${RELN_ROOT}/en_US.ISO_8859-1/share/sgml/release.dsl
# XXX using /release/doc as anchor!
DESTDIR?= ${DOCDIR}/${.CURDIR:C/^.*\/release\/doc//}

View File

@ -6,3 +6,10 @@
PUBLIC "-//FreeBSD//ENTITIES Release Specification//EN"
"release.ent"
PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Language Neutral Stylesheet//EN"
"release.dsl"
PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Stylesheet//EN"
"../../en_US.ISO_8859-1/share/sgml/release.dsl"

View File

@ -0,0 +1,14 @@
<!-- $FreeBSD $ -->
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
<!ENTITY release.dsl PUBLIC "-//FreeBSD//DOCUMENT Release Notes DocBook Stylesheet//EN" CDATA DSSSL>
]>
<style-sheet>
<style-specification use="docbook">
<style-specification-body>
</style-specification-body>
</style-specification>
<external-specification id="docbook" document="release.dsl">
</style-sheet>