This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Re: Nested Entities...
- To: docbook at lists dot oasis-open dot org
- Subject: Re: DOCBOOK: Nested Entities...
- From: Norman Walsh <ndw at nwalsh dot com>
- Date: Thu, 08 Feb 2001 15:25:41 -0500
- References: <200102082052.PAA07513@eworld.wox.org>
/ James Oden <joden@eworld.wox.org> was heard to say:
| My problem is, as far as I understand it an external entity must be
| declared within the doctype, and having a doctype in both the customer
| doc, and the error code doc, causes parsing of the error code doc to fail.
|
| What can I do?
Not much. XML 1.0 by itself does not support what you want to do.
XInclude might, but then you'd need XInclude-aware processors and
there aren't any of those :-)
| P.S. I am very new to docbook and to xml/sgml so if this seems
| like a stupid question forgive me (if it seems like a newbie
| question, well I am newbie so that would be appropriate). I did
| try to search the archive though before I posted the question.
No, it's not a stupid question. You could argue that it's a stupid
bug, but that' would be a different line of argument... :-)
Basically, your only hope is to decompose things further.
If you want
A to include B
B to include C
and you want A and B to both stand alone, you need to do something
like this.
1. Construct B-content to hold everything in B except the <!DOCTYPE
declaration and the root node.
This means that B-content contains an entity reference to C,
but no definition for it. Unfortunate, but true.
2. In B, include entity declarations for B-content and C, then
make it <root>&B-content;</root>
3. In A, include entity declarations for B-conetnt and C, then
make it <root>whatever content you want &B-content; in addition
to B.</root>
Does that help?
Be seeing you,
norm
--
Norman Walsh <ndw@nwalsh.com> | The man with ten children is
http://www.oasis-open.org/docbook/ | better off than the one with ten
Chair, DocBook Technical Committee | thousand fonts of type, because
| the man with ten children doesn't
| want any more.