James Robertson jwrober at
Fri Feb 27 20:07:14 PST 2004

Kevin P. Fleming wrote:

> James Robertson wrote:
>> That and the path to the DTD file like we do in the book.
>> <?xml version="1.0" encoding="ISO-8859-1"?>
>> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
>>         "/usr/share/xml/docbook/xml-dtd-4.2/docbookx.dtd"
> I've never had the chance to read about all this stuff that goes into 
> the DOCTYPE element. I also don't think it will be necessary here; while 
> I will certainly produce a DTD for the log files so that they can be 
> validated, I don't think it will need to be used at runtime.

You can put anything you want in there.  That is what is so cool about 
it.  It really comes down to the difference between well formed xml and 
validated xml.  See this link:

If you write the log files using a well formed syntax, that is great and 
you can write nALFS to parse it.  if you want the app to validate that 
the log file syntax meets the dtd (is validated) then you need the dtd 
and the doctype entry so that when you have nALFS validate the log 
against the dtd, it knows what it up.  This is the same as what we have 
in the profiles today:

<!DOCTYPE alfs SYSTEM "nalfs.dtd" [

You are also right that it is not really needed at runtime, but I would 
put it in there so that if/when a full parser is written or if we want 
to provide xslt stylesheets for conversion we can.  This sets us up to 
do just about anything down the road.


James Robertson -- jwrober at linuxfromscratch dot org
Reg. Linux User -- #160424 --
Reg. LFS User   -- #6981   --
LFS Bugzilla Maintainer    -- http://{blfs-}

More information about the alfs-discuss mailing list