This is the mail archive of the docbook@lists.oasis-open.org mailing list for the DocBook project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: category file and DTD file


Hello Yue,

> If I have a DTD file indicated in <!DOCTYPE> tag in my SGML file, do I
> need the category file too?

Short answer: 
-------------

If that's working okay for you, then fine.  You can do it that way if
you want.


Longer answer: 
--------------

The way you're doing it probably isn't the best way.

You're a Windows NT user, right?  Well, I don't know about WinNT, but
on my system, the DocBook DTD is in the file:

   /usr/lib/sgml/dtd/docbook-4.1/docbook.dtd

(This is a system identifier.)

If I want, I can use that file in the <!DOCTYPE> declarations of my
documents.  But there's a problem: what if I give my file to you?
Unless your DTD is in the same location, the document won't validate.
You'll have to open the file, and edit the location of the DTD.  What
a pain.

For that reason, it's better if I use a public identifier.  On my
system, the DTD above can be referenced by this public identifier:

	"-//OASIS//DTD DocBook V4.1//EN"

If your computer has DocBook 4.1 installed, and your catalog file is
set up correctly, then you should be able to process my files, without
having to edit the <!DOCTYPE>.

That's the sort of thing which catalog files are good for: mapping
public identifiers to system identifiers, mapping remote system
identifiers to local system identifiers, etc. etc.  Many of the
freely-available documents about DocBook on the Internet have a
section which explains about catalog files.  I suggest you do a bit of
reading: it is useful to have at least a basic understanding of
catalog files.

In summary, if you only want to edit & process your files yourself,
you will be okay using system identifiers (i.e. the name of a DTD file
on your system).  But if you want to share your files with others, you
definitely should be using public identifiers (as defined in your
catalog file).


Regards,
Dave

------------------------------------------------------------------
To unsubscribe from this elist send a message with the single word
"unsubscribe" in the body to: docbook-request@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]