This is the mail archive of the
mailing list for the DocBook project.
Re: external entities cannot be valid?
- To: docbook at lists dot oasis-open dot org
- Subject: Re: DOCBOOK: external entities cannot be valid?
- From: Nik Clayton <nik at nothing-going-on dot demon dot co dot uk>
- Date: Mon, 28 Feb 2000 11:24:00 +0000
- Cc: bobs at sco dot com
- Organization: Nik at home, where there's nothing going on
- References: <firstname.lastname@example.org>
- Reply-To: docbook at lists dot oasis-open dot org
On Fri, Feb 25, 2000 at 05:30:11PM -0800, Bob Stayton wrote:
> It appears that external parsed entities cannot be
> valid XML. Someone please prove me wrong.
> Option A: Leave out the doctype declaration from the
> chapter files so the external parsed entity references will
> legal and the book file that contains the doctype
> declaration will be valid. However, this means the
> chapter files are not valid and cannot be individually
> validated by a validating processor or editor.
As others have pointed out, you can't do this in SGML either. I do (A)
above, using Xemacs as the editor. If you use psgml on Xemacs you can
put something like this at the bottom of each chapter .sgml file
sgml-parent-document: ("../book.sgml" "part" "chapter")
This assumes that you have a "../chapter.decl" that looks like
<!DOCTYPE chapter PUBLIC "-//FreeBSD//DTD DocBook V3.1-Based Extension//EN">
(that's the FreeBSD FPI, but you get the idea), that the parent document is
called "../book.sgml", and that your chapters are organised in to <part>s
in the top level book.sgml file. Tweak as necessary.
Xemacs can then validate the document for you as you go.
If you don't use Xemacs, check the documentation for your SGML editor, as
it may have similar options to make working on compound documents easier.
If you want to imagine the future, imagine a tennis shoe stamping
on a penguin's face forever.
--- with apologies to George Orwell