README.docs 6.12 KB
Newer Older
1 2 3 4
Welcome to the Bugzilla documentation project!
You'll find these directories and files here:

README.docs	# This README file
5 6
html/		# The compiled HTML docs from XML sources (do not edit)
txt/		# The compiled text docs from XML sources (do not edit)
7 8 9 10
xml/		# The original XML doc sources (edit these)

A note about the XML:
  The documentation is written in DocBook 4.1.2, and attempts to adhere
11
to the LinuxDoc standards where applicable (http://www.tldp.org).
12 13
Please consult "The LDP Author Guide" at tldp.org for details on how
to set up your personal environment for compiling XML files.
14
  If you need to make corrections to typographical errors, or other minor
15
editing duties, feel free to use any text editor to make the changes.  XML
16 17 18
is not rocket science -- simply make sure your text appears between 
appropriate tags (like <para>This is a paragraph</para>) and we'll be fine.
If you are making more extensive changes, please ensure you at least validate
19 20
your XML before checking it in with something like:
	nsgmls -s $JADE_PUB/xml.dcl Bugzilla-Guide.xml
21

22
  When you validate, please validate the master document (Bugzilla-Guide.xml)
23 24 25 26 27 28
as well as the document you edited to ensure there are no critical errors.
The following errors are considered "normal" when validating with nsgmls:

 DTDDECL catalog entries are not supported
 "DOCTYPE" declaration not allowed in instance

29
  The reason these occur is that free sgml/xml validators do not yet support
30
the DTDDECL catalog entries, and I've included DOCTYPE declarations in
31
entities referenced from Bugzilla-Guide.xml so these entities can compile
32 33 34 35 36 37 38
individually, if necessary.  I suppose I ought to comment them out at some
point, but for now they are convenient and don't hurt anything.

  Thanks for taking the time to read these notes and consulting the
documentation.  Please address comments and questions to the newsgroup:
news://news.mozilla.org/netscape/public/mozilla/webtools .

39
==========
40
HOW TO SET UP YOUR OWN XML EDITING ENVIRONMENT:
41 42
==========

43
Trying to set up an XML Docbook editing environment the 
44 45
first time can be a daunting task.
I use Linux-Mandrake, in part, because it has a fully-functional
46
XML Docbook editing environment included as part of the
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
distribution CD's.  If you have easier instructions for how to
do this for a particular Linux distribution or platform, please
let the team know at the mailing list: mozilla-webtools@mozilla.org.

The following text is taken nearly verbatim from
http://bugzilla.mozilla.org/show_bug.cgi?id=95970, where I gave
these instructions to someone who wanted the greater manageability
maintaining a document in Docbook brings:

This is just off the top of my head, but here goes.  Note some of these may 
NOT be necessary, but I don't think they hurt anything by being installed.

rpms:

openjade
jadetex
63
docbook-dtds
64 65
docbook-style-dsssl
docbook-style-dsssl-doc
66
docbook-utils
67 68 69 70 71 72
xemacs
psgml
sgml-tools
sgml-common


73 74
If you're getting these from RedHat, make sure you get the ones in the
rawhide area.  The ones in the 7.2 distribution are too old and don't
75 76
include the XML stuff.  The packages distrubuted with RedHat 8.0 and 9
and known to work.
77

78
Download "ldp.dsl" from the Resources page on tldp.org.  This is the 
79 80 81 82 83 84
stylesheet I use to get the HTML and text output.  It works well, and has a 
nice, consistent look with the rest of the linuxdoc documents.  You'll have to 
adjust the paths in ldp.dsl at the top of the file to reflect the actual 
locations of your docbook catalog files.  I created a directory, 
/usr/share/sgml/docbook/ldp, and put the ldp.dsl file there.  I then edited 
ldp.dsl and changed two lines near the top:
85
<!ENTITY docbook.dsl SYSTEM "../dsssl-stylesheets/html/docbook.dsl" CDATA 
86 87
dsssl>
...and...
88
<!ENTITY docbook.dsl SYSTEM "../dsssl-stylesheets/print/docbook.dsl" CDATA
89 90 91 92 93
dsssl>

Note the difference is the top one points to the HTML docbook stylesheet, 
and the next one points to the PRINT docbook stylesheet.

94 95
Also note that modifying ldp.dsl doesn't seem to be needed on RedHat 9.

96
  You know, this sure looks awful involved.  Anyway, once you have this in
97
place, add to your .bashrc:
98
export SGML_CATALOG_FILES=/etc/sgml/catalog
99
export LDP_HOME=/usr/share/sgml/docbook/ldp
100 101 102 103 104 105 106 107 108 109 110 111 112 113
export JADE_PUB=/usr/share/doc/openjade-1.3.1/pubtext

or in .tcshrc:
setenv SGML_CATALOG_FILES /etc/sgml/catalog
setenv LDP_HOME /usr/share/sgml/docbook/ldp
setenv JADE_PUB /usr/share/doc/openjade-1.3.1/pubtext

  If you have root access and want to set this up for anyone on your box,
you can add those lines to /etc/profile for bash users and /etc/csh.login
for tcsh users.

  Make sure you edit the paths in the above environment variables if those
folders are anywhere else on your system (for example, the openjade version
might change if you get a new version at some point).
114

115
  I suggest xemacs for editing your XML Docbook documents.  The darn
116 117 118 119 120
thing just works, and generally includes PSGML mode by default.  Not to
mention you can validate the SGML from right within it without having to
remember the command-line syntax for nsgml (not that it's that hard
anyway).  If not, you can download psgml at
http://www.sourceforge.net/projects/psgml.
121

122 123 124
  Another good editor is the latest releases of vim and gvim.  Vim will
recognize DocBook tags and give them a different color than unreconized tags.

125
==========
126
NOTES:
127
==========
128 129

  Here are the commands I use to maintain this documentation.
130
  You MUST have DocBook 4.1.2 set up correctly in order for this to work.
131

132 133
  These commands can be run all at once using the ./makedocs.pl script.

134 135
To create HTML documentation:
bash$ cd html
136
bash$ jade -t sgml -i html -d $LDP_HOME/ldp.dsl\#html \
137
$JADE_PUB/xml.dcl ../xml/Bugzilla-Guide.xml
138 139 140

To create HTML documentation as a single big HTML file:
bash$ cd html
141
bash$ jade -V nochunks -t sgml -i html -d $LDP_HOME/ldp.dsl\#html \
142
$JADE_PUB/xml.dcl ../xml/Bugzilla-Guide.xml >Bugzilla-Guide.html
143 144 145 146 147

To create TXT documentation as a single big TXT file:
bash$ cd txt
bash$ lynx -dump -nolist ../html/Bugzilla-Guide.html >Bugzilla-Guide.txt

148

149 150 151
Sincerely,
 Matthew P. Barnson
 The Bugzilla "Doc Knight"
152 153 154 155
 mbarnson@sisna.com

 with major edits by Dave Miller <justdave@syndicomm.com> based on
 experience setting this up on the Landfill test server.