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: external entities cannot be valid?


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.

Correct.

[...]

> 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

<!-- 
     Local Variables:
     mode: sgml
     sgml-declaration: "../chapter.decl"
     sgml-parent-document: ("../book.sgml" "part" "chapter")
     End:
-->

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.

N
-- 
    If you want to imagine the future, imagine a tennis shoe stamping
    on a penguin's face forever.
        --- with apologies to George Orwell


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