Subject: CVS commit: htdocs/share/mk
To: None <www-changes@NetBSD.org>
From: Hiroki Sato <hrs@netbsd.org>
List: www-changes
Date: 04/10/2005 13:56:56
Module Name:	htdocs
Committed By:	hrs
Date:		Sun Apr 10 13:56:56 UTC 2005

Modified Files:
	htdocs/share/mk: web.site.mk

Log Message:
Revise the build target for XML docs to support multiple
stylesheets in a directory.

In a Makefile, we can use "XMLDOCS= docid:xslt:xml:target"
where xslt is the stylesheet, xml is the source xml file,
and target is the target filename.  If some of the parameters
are not specified, the default ones (<docid>.{xml,html} and $XSLT.DEFAULT
for stylesheet) are used.  {TARGET,XSLT,XML,SRCS,PARAMS,XSLTPROCOPTS}.<docid>
are also available.

For example,

XMLDOCS=	foo:bar.xsl:baz.xml:foo.html

means baz.xml is processed by using stylesheet bar.xsl, and the output
file is foo.html.  This is equivalent to the following:

XMLDOCS=	foo

TARGET.foo=	foo.html
XSLT.foo=	bar.xsl
XML.foo=	baz.xml

XSLT.<docid> accepts the following keywords:

docbook         - Norm Walsh's DocBook stylesheet used in NetBSD Guide.
docbook-website - Norm Walsh's DocBook stylesheet used throughout htdocs/.
xsl             - <docid>.xsl file.

and when it is not specified, $XSLT.DEFAULT is used (set to docbook-website
by default).  For example:

XMLDOCS=	foo:::foo2.html

means foo.xml is processed by the stylesheet specified in $XSLT.DEFAULT,
and the output file is foo2.html.

Note that this change should not prevent the old $DOCS from working.


To generate a diff of this commit:
cvs rdiff -r1.30 -r1.31 htdocs/share/mk/web.site.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.