Subject: Re: The NetBSD Guide
To: None <jrf@adresearch.com>
From: Hiroki Sato <hrs@eos.ocn.ne.jp>
List: netbsd-docs
Date: 05/15/2003 05:08:03
----Next_Part(Thu_May_15_05:08:03_2003_141)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

"Jason R. Fink" <jrf@adresearch.com> wrote
  in <20030512093632.A1194@mail>:

jrf> Grant Beattie and Hubert Feyrer recently got the English
jrf> portion of the Guide to build the HTML target from XML
jrf> Docbook format. Many thanks to them for their hard work.

 I am working on Japanese translation of the Guide, and 
 have some questions and suggestions about the structure:

 1) Are there any strong reasons to use xsltproc for processing
    XML docs?  It can also be done with Jade/OpenJade, and
    Jade's XML->foo conversion capability is better than
    xsltproc's at the moment.  Of course, using XML+XSLT is the
    best option on the long-term basis, but for the translated
    docs, I think it is still problematic.  At least, Japanese docs
    in printable format such as PostScript or PDF cannot be
    generated properly using XSLT toolchains that are freely
    available (perhaps other non-Latin languages are in the
    similar situation).

 2) I think a customization layer is needed for DTDs and
    stylesheets used in the Guide.  Although some language-specific
    convention can be realized with stylesheets and/or entity
    substitution, the current structure does not allow such
    customization.  It restricts the flexibility needed for
    the translated (and the original) docs.

 I made a patch for the current htdocs/guide to use Jade for
 XML docs and add a customization layer to the DTD and the stylesheets.
 As far as I tested, there is no serious problem of the XML->HTML
 conversion.

 Any comments?

-- 
| Hiroki SATO  <hrs@eos.ocn.ne.jp> / <hrs@FreeBSD.org>

----Next_Part(Thu_May_15_05:08:03_2003_141)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="netbsd-guide-jade-xml.diff"

Index: en/netbsd.xml
===================================================================
RCS file: /home/cvs/private/hrs/netbsd-htdocs/guide/en/netbsd.xml,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.1.1.1 -r1.2
--- en/netbsd.xml	10 May 2003 12:54:19 -0000	1.1.1.1
+++ en/netbsd.xml	14 May 2003 19:02:30 -0000	1.2
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "docbookx.dtd" [
+<!DOCTYPE book PUBLIC "-//NetBSD//DTD DocBook XML V4.2-Based DocBook Extension//EN" [
 
 
 <!-- chapters -->
Index: en/Makefile
===================================================================
RCS file: /home/cvs/private/hrs/netbsd-htdocs/guide/en/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.1.1.1 -r1.2
--- en/Makefile	10 May 2003 12:54:17 -0000	1.1.1.1
+++ en/Makefile	14 May 2003 19:02:30 -0000	1.2
@@ -58,6 +58,6 @@
 
 
 # Old SGML stuff:
-include ../mk/guide.mk
+.include "../mk/guide.mk"
 
 .endif
Index: dsl/catalog
===================================================================
RCS file: dsl/catalog
diff -N dsl/catalog
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/catalog	14 May 2003 18:58:55 -0000	1.4
@@ -0,0 +1,19 @@
+-- $NetBSD$ --
+
+PUBLIC "-//NetBSD//DTD DocBook V4.1-Based DocBook Extension//EN"
+       "netbsd.dtd"
+
+PUBLIC "-//NetBSD//DTD DocBook XML V4.2-Based DocBook Extension//EN"
+       "netbsdx.dtd"
+
+PUBLIC "-//NetBSD//ENTITIES NetBSD Miscellaneous Entities//EN"
+       "misc.ent"
+
+PUBLIC "-//NetBSD//ENTITIES NetBSD Manual Page Entities//EN"
+       "man-refs.ent"
+
+PUBLIC "-//NetBSD//DOCUMENT DocBook DSSSL Stylesheet//EN"
+       "netbsd.dsl"
+
+PUBLIC "-//NetBSD//DOCUMENT Language Neutral DocBook DSSSL Stylesheet//EN"
+       "netbsd.dsl"
Index: dsl/default.dsl
===================================================================
RCS file: dsl/default.dsl
diff -N dsl/default.dsl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/default.dsl	11 May 2003 20:13:08 -0000	1.2
@@ -0,0 +1,15 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY netbsd.dsl PUBLIC "-//NetBSD//DOCUMENT DocBook DSSSL Stylesheet//EN" CDATA DSSSL>
+]>
+
+<!-- $NetBSD$ -->
+
+<style-sheet>
+  <style-specification use="docbook">
+    <style-specification-body>
+
+    </style-specification-body>
+  </style-specification>
+
+  <external-specification id="docbook" document="netbsd.dsl">
+</style-sheet>
Index: dsl/man-refs.ent
===================================================================
RCS file: dsl/man-refs.ent
diff -N dsl/man-refs.ent
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/man-refs.ent	14 May 2003 19:02:18 -0000	1.3
@@ -0,0 +1,10 @@
+<!-- $NetBSD$ -->
+
+<!ENTITY man.hire.7 "<citerefentry/<refentrytitle/hire/<manvolnum/7//">
+<!ENTITY man.packages.7 "<citerefentry/<refentrytitle/packages/<manvolnum/7//">
+<!ENTITY man.release.7 "<citerefentry/<refentrytitle/release/<manvolnum/7//">
+
+<!ENTITY man.useradd.8 "<citerefentry/<refentrytitle/useradd/<manvolnum/8//">
+<!ENTITY man.shutdown.8 "<citerefentry/<refentrytitle/shutdown/<manvolnum/8//">
+<!ENTITY man.halt.8 "<citerefentry/<refentrytitle/halt/<manvolnum/8//">
+<!ENTITY man.reboot.8 "<citerefentry/<refentrytitle/reboot/<manvolnum/8//">
Index: dsl/misc.ent
===================================================================
RCS file: dsl/misc.ent
diff -N dsl/misc.ent
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/misc.ent	11 May 2003 20:13:08 -0000	1.2
@@ -0,0 +1,27 @@
+<!-- $NetBSD$ -->
+
+<!ENTITY os "NetBSD">
+
+<!ENTITY rprompt "<prompt>#</prompt>">
+<!ENTITY uprompt "<prompt>$</prompt>">
+<!ENTITY cprompt "<prompt>%</prompt>">
+
+<!-- the home network -->
+
+<!ENTITY myuser  "carlo">
+<!ENTITY mynet   "insetti.net">
+<!ENTITY myhost  "ape">
+<!ENTITY myfqdn  "&myhost;.&mynet">
+<!ENTITY otherhost  "vespa">
+<!ENTITY otherfqdn  "&otherhost;.&mynet">
+
+<!-- provider data -->
+
+<!ENTITY providername    "BigNet">
+<!ENTITY providername2   "bignet">
+<!ENTITY provider        "bignet.it">
+<!ENTITY provuser        "alan">
+<!ENTITY provpwd         "pZY9o">
+<!ENTITY provmailserver  "mail.&provider;">
+<!ENTITY provnewsserver  "news.&provider;">
+<!ENTITY provmailaddr    "&provuser;@&provider;">
Index: dsl/myhtml.dsl
===================================================================
RCS file: dsl/myhtml.dsl
diff -N dsl/myhtml.dsl
--- dsl/myhtml.dsl	10 May 2003 12:54:17 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,63 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
-]>
-
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-;; $Id: myhtml.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
-;;
-;; This file is part of the Modular DocBook Stylesheet distribution.
-;; See ../README or http://www.berkshire.net/~norm/dsssl/
-;;
-;; Example of a customization layer on top of the modular docbook style
-;; sheet.  Definitions inserted in this file take precedence over 
-;; definitions in the 'use'd stylesheet(s).
-
-(define %graphic-default-extension% "gif")
-
-(define (chunk-element-list)
-  (list (normalize "preface")
-	(normalize "chapter")
-	(normalize "appendix") 
-	(normalize "article")
-	(normalize "glossary")
-	(normalize "bibliography")
-	(normalize "index")
-	(normalize "colophon")
-	(normalize "setindex")
-	(normalize "reference")
-	(normalize "refentry")
-	(normalize "part")
-;;	(normalize "sect1") 
-;;	(normalize "section") 
-	(normalize "book") ;; just in case nothing else matches...
-	(normalize "set")  ;; sets are definitely chunks...
-	))
-
-(define %chapter-autolabel% 
-  ;; Are chapters enumerated?
-  #t)
-
-(define %section-autolabel%
-  ;; Are sections enumerated?
-  #t)
-
-(define %stylesheet%
-  ;; REFENTRY stylesheet
-  ;; PURP Name of the stylesheet to use
-  ;; DESC
-  ;; The name of the stylesheet to place in the HTML LINK TAG, or '#f' to
-  ;; suppress the stylesheet LINK.
-  ;; /DESC
-  ;; AUTHOR N/A
-  ;; /REFENTRY
-  "normal.css")
-  
-</style-specification-body>
-</style-specification>
-
-<external-specification id="docbook" document="docbook.dsl">
-
-</style-sheet>
Index: dsl/myrtf.dsl
===================================================================
RCS file: dsl/myrtf.dsl
diff -N dsl/myrtf.dsl
--- dsl/myrtf.dsl	10 May 2003 12:54:17 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
-]>
-
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-;; $Id: myrtf.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
-;;
-;; This file is part of the Modular DocBook Stylesheet distribution.
-;; See ../README or http://www.berkshire.net/~norm/dsssl/
-;;
-;; Example of a customization layer on top of the modular docbook style
-;; sheet.  Definitions inserted in this file take precedence over 
-;; definitions in the 'use'd stylesheet(s).
-
-(define %graphic-default-extension% "bmp")
-
-(define %generate-book-titlepage%
-  ;; Should a book title page be produced?
-  #t)
-
-(define %chapter-autolabel% 
-  ;; Are chapters enumerated?
-  #t)
-
-(define %section-autolabel%
-  ;; Are sections enumerated?
-  #t)
-
-(define %figure-rules%
-  ;; Specify rules before and after an Figure
-  #f)
-  
-</style-specification-body>
-</style-specification>
-
-<external-specification id="docbook" document="docbook.dsl">
-
-</style-sheet>
Index: dsl/mytex.dsl
===================================================================
RCS file: dsl/mytex.dsl
diff -N dsl/mytex.dsl
--- dsl/mytex.dsl	10 May 2003 12:54:17 -0000	1.1.1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
-<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
-]>
-
-<style-sheet>
-<style-specification use="docbook">
-<style-specification-body>
-
-;; $Id: mytex.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
-;;
-;; This file is part of the Modular DocBook Stylesheet distribution.
-;; See ../README or http://www.berkshire.net/~norm/dsssl/
-;;
-;; Example of a customization layer on top of the modular docbook style
-;; sheet.  Definitions inserted in this file take precedence over 
-;; definitions in the 'use'd stylesheet(s).
-
-(define %graphic-default-extension% "eps")
-
-(define %generate-book-titlepage%
-  ;; Should a book title page be produced?
-  #t)
-
-(define %chapter-autolabel% 
-  ;; Are chapters enumerated?
-  #t)
-
-(define %section-autolabel%
-  ;; Are sections enumerated?
-  #t)
-
-(define %figure-rules%
-  ;; Specify rules before and after an Figure
-  #f)
-
-</style-specification-body>
-</style-specification>
-
-<external-specification id="docbook" document="docbook.dsl">
-
-</style-sheet>
Index: dsl/netbsd.dsl
===================================================================
RCS file: dsl/netbsd.dsl
diff -N dsl/netbsd.dsl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/netbsd.dsl	11 May 2003 20:13:08 -0000	1.3
@@ -0,0 +1,157 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+
+<!ENTITY % output.html      "IGNORE">
+<!ENTITY % output.print     "IGNORE">
+<!ENTITY % output.print.tex "IGNORE">
+<!ENTITY % output.print.rtf "IGNORE">
+
+<![ %output.html; [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook HTML Stylesheet//EN" CDATA DSSSL>
+]]>
+<![ %output.print; [
+<!ENTITY docbook.dsl PUBLIC "-//Norman Walsh//DOCUMENT DocBook Print Stylesheet//EN" CDATA DSSSL>
+]]>
+]>
+
+<!-- $NetBSD$ -->
+
+<style-sheet>
+  <style-specification use="docbook">
+    <style-specification-body>
+
+      (element username ($mono-seq$))
+      (element groupname ($mono-seq$))
+      (element devicename ($mono-seq$))
+      (element maketarget ($mono-seq$))
+      (element makevar ($mono-seq$))
+
+      <![ %output.html; [
+
+      ;; $Id: myhtml.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
+      ;;
+      ;; This file is part of the Modular DocBook Stylesheet distribution.
+      ;; See ../README or http://www.berkshire.net/~norm/dsssl/
+      ;;
+      ;; Example of a customization layer on top of the modular docbook style
+      ;; sheet.  Definitions inserted in this file take precedence over 
+      ;; definitions in the 'use'd stylesheet(s).
+      
+      (define %graphic-default-extension% "gif")
+      
+      (define %html-ext%
+      ;; Default extension for HTML output files
+      ".html")
+      
+      (define %use-id-as-filename%
+      ;; Use ID attributes as name for component HTML files?
+      #t)
+      
+      (define html-manifest
+      ;; Write a manifest?
+      #f)
+      
+      (define (chunk-element-list)
+        (list (normalize "preface")
+              (normalize "chapter")
+              (normalize "appendix") 
+              (normalize "article")
+              (normalize "glossary")
+              (normalize "bibliography")
+              (normalize "index")
+              (normalize "colophon")
+              (normalize "setindex")
+              (normalize "reference")
+              (normalize "refentry")
+              (normalize "part")
+              ;;	(normalize "sect1") 
+              ;;	(normalize "section") 
+              (normalize "book") ;; just in case nothing else matches...
+              (normalize "set")  ;; sets are definitely chunks...
+              ))
+
+      (define %chapter-autolabel% 
+      ;; Are chapters enumerated?
+      #t)
+
+      (define %section-autolabel%
+      ;; Are sections enumerated?
+      #t)
+
+      (define %stylesheet%
+      ;; REFENTRY stylesheet
+      ;; PURP Name of the stylesheet to use
+      ;; DESC
+      ;; The name of the stylesheet to place in the HTML LINK TAG, or '#f' to
+      ;; suppress the stylesheet LINK.
+      ;; /DESC
+      ;; AUTHOR N/A
+      ;; /REFENTRY
+      "normal.css")
+      ]]>
+
+      <![ %output.print; [
+      <![ %output.print.tex; [
+      ;; $Id: mytex.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
+      ;;
+      ;; This file is part of the Modular DocBook Stylesheet distribution.
+      ;; See ../README or http://www.berkshire.net/~norm/dsssl/
+      ;;
+      ;; Example of a customization layer on top of the modular docbook style
+      ;; sheet.  Definitions inserted in this file take precedence over 
+      ;; definitions in the 'use'd stylesheet(s).
+      
+      (define %graphic-default-extension% "eps")
+      
+      (define %generate-book-titlepage%
+      ;; Should a book title page be produced?
+      #t)
+      
+      (define %chapter-autolabel% 
+      ;; Are chapters enumerated?
+      #t)
+      
+      (define %section-autolabel%
+      ;; Are sections enumerated?
+      #t)
+      
+      (define %figure-rules%
+      ;; Specify rules before and after an Figure
+      #f)
+      ]]>
+      
+      <![ %output.print.rtf; [
+      
+      ;; $Id: myrtf.dsl,v 1.1.1.1 2000/12/11 10:10:24 dent Exp $
+      ;;
+      ;; This file is part of the Modular DocBook Stylesheet distribution.
+      ;; See ../README or http://www.berkshire.net/~norm/dsssl/
+      ;;
+      ;; Example of a customization layer on top of the modular docbook style
+      ;; sheet.  Definitions inserted in this file take precedence over 
+      ;; definitions in the 'use'd stylesheet(s).
+      
+      (define %graphic-default-extension% "bmp")
+      
+      (define %generate-book-titlepage%
+      ;; Should a book title page be produced?
+      #t)
+      
+      (define %chapter-autolabel% 
+      ;; Are chapters enumerated?
+      #t)
+      
+      (define %section-autolabel%
+      ;; Are sections enumerated?
+      #t)
+      
+      (define %figure-rules%
+      ;; Specify rules before and after an Figure
+      #f)
+      ]]>
+      ]]>
+  
+    </style-specification-body>
+  </style-specification>
+
+  <external-specification id="docbook" document="docbook.dsl">
+</style-sheet>
Index: dsl/netbsd.dtd
===================================================================
RCS file: dsl/netbsd.dtd
diff -N dsl/netbsd.dtd
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/netbsd.dtd	11 May 2003 20:13:08 -0000	1.3
@@ -0,0 +1,47 @@
+<!-- $NetBSD$ -->
+
+<!ENTITY % output.html      "IGNORE">
+<!ENTITY % output.print     "IGNORE">
+<!ENTITY % output.print.rtf "IGNORE">
+<!ENTITY % output.print.tex "IGNORE">
+
+<!ENTITY % local.tech.char.class "|HostID|Username|Devicename|MakeTarget|MakeVar">
+
+<!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook V4.1//EN">
+%orig-docbook;
+
+<!ELEMENT HostID - - ((%cptr.char.mix;)+)>
+<!ATTLIST HostID
+                --
+                Role: More specific information about this hostname.
+                If not specified then the default is 'hostname'.
+                --
+                Role    (Hostname
+                        |Domainname
+                        |FQDN
+                        |IPAddr
+                        |IP6Addr                
+                        |Netmask
+                        |MAC)      #IMPLIED
+                %common.attrib;
+>
+
+<!ELEMENT Username - - ((%cptr.char.mix;)+)>
+<!ATTLIST Username
+                %common.attrib;
+>
+
+<!ELEMENT Devicename - - ((%cptr.char.mix;)+)>
+<!ATTLIST Devicename
+                %common.attrib;
+>
+
+<!ELEMENT MakeTarget - - ((%cptr.char.mix;)+)>
+<!ATTLIST MakeTarget
+                %common.attrib;
+>
+
+<!ELEMENT MakeVar - - ((%cptr.char.mix;)+)>
+<!ATTLIST MakeVar
+                %common.attrib;
+>
Index: dsl/netbsdx.dtd
===================================================================
RCS file: dsl/netbsdx.dtd
diff -N dsl/netbsdx.dtd
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ dsl/netbsdx.dtd	14 May 2003 18:58:55 -0000	1.1
@@ -0,0 +1,49 @@
+<!-- $NetBSD$ -->
+
+<!ENTITY % output.html      "IGNORE">
+<!ENTITY % output.print     "IGNORE">
+<!ENTITY % output.print.rtf "IGNORE">
+<!ENTITY % output.print.tex "IGNORE">
+
+<!ENTITY % local.tech.char.class "|HostID|Username|Devicename|MakeTarget|MakeVar">
+
+<!ENTITY % sgml.features "INCLUDE">
+
+<!ENTITY % orig-docbook PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN">
+%orig-docbook;
+
+<!ELEMENT HostID - - ((%cptr.char.mix;)+)>
+<!ATTLIST HostID
+                --
+                Role: More specific information about this hostname.
+                If not specified then the default is 'hostname'.
+                --
+                Role    (Hostname
+                        |Domainname
+                        |FQDN
+                        |IPAddr
+                        |IP6Addr                
+                        |Netmask
+                        |MAC)      #IMPLIED
+                %common.attrib;
+>
+
+<!ELEMENT Username - - ((%cptr.char.mix;)+)>
+<!ATTLIST Username
+                %common.attrib;
+>
+
+<!ELEMENT Devicename - - ((%cptr.char.mix;)+)>
+<!ATTLIST Devicename
+                %common.attrib;
+>
+
+<!ELEMENT MakeTarget - - ((%cptr.char.mix;)+)>
+<!ATTLIST MakeTarget
+                %common.attrib;
+>
+
+<!ELEMENT MakeVar - - ((%cptr.char.mix;)+)>
+<!ATTLIST MakeVar
+                %common.attrib;
+>
Index: en/share/catalog
===================================================================
RCS file: en/share/catalog
diff -N en/share/catalog
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ en/share/catalog	11 May 2003 20:13:12 -0000	1.2
@@ -0,0 +1,4 @@
+-- $NetBSD$ --
+
+PUBLIC "-//NetBSD//DOCUMENT DocBook DSSSL Stylesheet//EN"
+       "netbsd.dsl"
Index: en/share/netbsd.dsl
===================================================================
RCS file: en/share/netbsd.dsl
diff -N en/share/netbsd.dsl
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ en/share/netbsd.dsl	11 May 2003 20:13:12 -0000	1.2
@@ -0,0 +1,33 @@
+<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" [
+<!ENTITY netbsd.dsl PUBLIC "-//NetBSD//DOCUMENT Language Neutral DocBook DSSSL Stylesheet//EN" CDATA DSSSL>
+
+<!ENTITY % output.html      "IGNORE">
+<!ENTITY % output.print     "IGNORE">
+<!ENTITY % output.print.tex "IGNORE">
+<!ENTITY % output.print.rtf "IGNORE">
+]>
+
+<!-- $NetBSD$ -->
+
+<style-sheet>
+  <style-specification use="docbook">
+    <style-specification-body>
+
+      <![ %output.html; [
+      
+      ]]>
+
+      <![ %output.print; [
+      <![ %output.print.tex; [
+      
+      ]]>
+      <![ %output.print.rtf; [
+
+      ]]>
+      ]]>
+
+    </style-specification-body>
+  </style-specification>
+
+  <external-specification id="docbook" document="netbsd.dsl">
+</style-sheet>
Index: mk/guide.mk
===================================================================
RCS file: /home/cvs/private/hrs/netbsd-htdocs/guide/mk/guide.mk,v
retrieving revision 1.1.1.1
retrieving revision 1.3
diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.1.1.1 -r1.3
--- mk/guide.mk	10 May 2003 12:54:22 -0000	1.1.1.1
+++ mk/guide.mk	14 May 2003 19:07:16 -0000	1.3
@@ -1,6 +1,13 @@
 # Makefile for the guide
 
+DOCTYPE?=
+
+.if ${DOCTYPE} == xml
+SOURCES = *.xml
+.else
 SOURCES = *.sgml
+.endif
+
 GIFS = ../images/*.gif
 EPSS = ../images/*.eps
 BMPS = ../images/*.bmp
@@ -13,4 +20,4 @@
 
 all: netbsd.html netbsd.rtf netbsd.ps
 
-include ../mk/sgml.mk
+.include "../mk/sgml.mk"
Index: mk/sgml.mk
===================================================================
RCS file: /home/cvs/private/hrs/netbsd-htdocs/guide/mk/sgml.mk,v
retrieving revision 1.1.1.1
retrieving revision 1.8
diff -d -u -I\$FreeBSD:.*\$ -I\$Id:.*\$ -I\$hrs:.*\$ -r1.1.1.1 -r1.8
--- mk/sgml.mk	10 May 2003 12:54:22 -0000	1.1.1.1
+++ mk/sgml.mk	14 May 2003 19:07:16 -0000	1.8
@@ -1,15 +1,53 @@
-# Makefile for SGML documentation
+# Makefile for SGML/XML documentation
 
-JADE = openjade
+UNAME!=uname -s
+
+.if ${UNAME} == NetBSD
+JADE?= jade
+.elif ${UNAME} == FreeBSD || ${UNAME} == OpenBSD
+JADE?= openjade
+.endif
 NSGMLS = onsgmls
 JADETEX	= jadetex
 
-HTML_DSL= ../dsl/myhtml.dsl
-RTF_DSL	= ../dsl/myrtf.dsl
-TEX_DSL	= ../dsl/mytex.dsl
+.if ${UNAME} == NetBSD
+TOOLS_PREFIX=	/usr/pkg/share/sgml
+DBX_CATALOG=	/usr/pkg/share/sgml/docbook/4.2/catalog
+.elif ${UNAME} == FreeBSD || ${UNAME} == OpenBSD
+TOOLS_PREFIX=	/usr/local/share/sgml
+DBX_CATALOG=	/usr/local/share/xml/docbook/4.2/catalog
+.endif
+
+CATALOGS=  share/catalog
+CATALOGS+= ../dsl/catalog
+CATALOGS+= ${TOOLS_PREFIX}/catalog
+CATALOGS+= ${TOOLS_PREFIX}/docbook/dsssl/modular/catalog
+CATALOGS+= ${DBX_CATALOG}
+
+DECL?=	${TOOLS_PREFIX}/docbook/dsssl/modular/dtds/decls/xml.dcl
+
+JADE_HTML_OPTS?= -i output.html -V html-manifest
+JADE_RTF_OPTS?= -i output.print -i output.print.rtf
+JADE_TEX_OPTS?= -i output.print -i output.print.tex
+
+DSSSL?=	   ../dsl/default.dsl
+
+SGML_CATALOGS= ${CATALOGS:S/^/-c /g}
+
+HTML_MANIFEST?=	HTML.manifest
+
+CLEANFILES+=	${MANIFEST}
+
+TIDY?=	tidy
+
+.if ${UNAME} == NetBSD || ${UNAME} == OpenBSD
+TIDY_OPTS?= -i -m -raw -f /dev/null -asxml ${TIDYFLAGS}
+.elif ${UNAME} == FreeBSD
+TIDY_OPTS?= -i -m -raw -preserve -f /dev/null -asxml ${TIDYFLAGS}
+.endif
 
 .SUFFIXES:
-.SUFFIXES: .sgml .html .rtf .ps .pdf
+.SUFFIXES: .xml .sgml .html .rtf .ps .pdf
 
 # The line
 #	echo >> $$i
@@ -17,27 +55,49 @@
 # with an 'incomplete last line' (i.e. no "\n" on the final line.)
 # This can confuse some utilities (eg. /usr/bin/sed on Solaris.)
 
+.if ${DOCTYPE} == xml
+.xml.html:
+	$(JADE) $(JADE_HTML_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t sgml -o $@ $(DECL) $<
+.if !defined(NO_TIDY)
+	-$(TIDY) $(TIDY_OPTS) `cat ${HTML_MANIFEST}` 
+.endif
+.xml.rtf:
+	$(NSGMLS) -sv $(SGML_CATALOGS) $<
+	$(JADE) $(JADE_RTF_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t rtf -o $(DECL) $@ $<
+
+.xml.ps:
+	$(NSGMLS) -sv $(SGML_CATALOGS) $<
+	$(JADE) $(JADE_TEX_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t tex -o $(DECL) $@ $<
+	$(JADETEX) $*.tex
+	$(JADETEX) $*.tex
+	$(JADETEX) $*.tex
+	dvips -f $*.dvi > $@
+	rm -f *.log *.aux *.tex *.dvi
+.else
 .sgml.html:
-	$(NSGMLS) -sv $<
-	$(JADE) -d $(HTML_DSL) -t sgml -o $@ $<
-	for i in *.html; do \
-		echo >> $$i; \
-	done
+	$(NSGMLS) -sv $(SGML_CATALOGS) $<
+	$(JADE) $(JADE_HTML_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t sgml -o $@ $<
+.if !defined(NO_TIDY)
+	-$(TIDY) $(TIDY_OPTS) `cat ${HTML_MANIFEST}` 
+.endif
 
 .sgml.rtf:
-	$(NSGMLS) -sv $<
-	$(JADE) -d $(RTF_DSL) -t rtf -o $@ $<
+	$(NSGMLS) -sv $(SGML_CATALOGS) $<
+	$(JADE) $(JADE_RTF_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t rtf -o $@ $<
 
 .sgml.ps:
-	$(NSGMLS) -sv $<
-	$(JADE) -t tex -d $(TEX_DSL) $<
+	$(NSGMLS) -sv $(SGML_CATALOGS) $<
+	$(JADE) $(JADE_TEX_OPTS) -d $(DSSSL) $(SGML_CATALOGS) -t tex -o $@ $<
 	$(JADETEX) $*.tex
 	$(JADETEX) $*.tex
 	$(JADETEX) $*.tex
 	dvips -f $*.dvi > $@
 	rm -f *.log *.aux *.tex *.dvi
+.endif
 
 clean:
+	-rm -f `cat ${HTML_MANIFEST}`
+	rm -f ${HTML_MANIFEST}
 	rm -f *~ core *.core
 	rm -f *.rtf
 	rm -f *.html

----Next_Part(Thu_May_15_05:08:03_2003_141)----