This is the mail archive of the
docbook@lists.oasis-open.org
mailing list for the DocBook project.
Fwd: another question about <!ENTITY % blah "INCLUDE">
- To: docbook at lists dot oasis-open dot org
- Subject: DOCBOOK: Fwd: another question about <!ENTITY % blah "INCLUDE">
- From: Jorge Godoy <godoy at conectiva dot com>
- Date: 22 May 2000 12:12:45 -0300
- Reply-To: docbook at lists dot oasis-open dot org
It does interest me too.
Jade/OpenJade can't use this kind of instruction. How to do that
avoiding duplication?
I thought about something too complicated: creating a third file with
the whole content and including parts of it where needed... And, if I
need just part of the text use these entities...
There might be a better solution.
The message below describes the problem and the solution I've
suggested on this other list. It works with some tools, but not with
Jade / OpenJade...
Thanks,
- To: ldp-discuss at lists dot linuxdoc dot org
- Subject: another question about <!ENTITY % blah "INCLUDE">
- From: Gerard Beekmans <gerard at linuxfromscratch dot org>
- Date: Fri, 19 May 2000 16:39:04 -0400
- Organization: Linux From Scratch
Imagine a simple book with book.sgml as the main file:
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
<!ENTITY chapter1 SYSTEM "chapter1.sgml">
<!ENTITY chapter2 SYSTEM "chapter2.sgml">
<!ENTITY contents SYSTEM "contents.sgml">
<!ENTITY % chapter2-specific "IGNORE">
]>
<book>
&chapter1;
&chapter2;
</book>
chapter1.sgml and chapter2.sgml both include the contents.sgml file.
chapter1.sgml:
<chapter id="chapter1">
&contents
</chapter>
and chapter2.sgml:
<chapter id="chapter2">
&contents
</chapter>
contents.sgml contains:
<sect1><title>Contents</title>
<para>Blah</para>
<![%chapter2-specific;[
<para>
This is only suppose to show up in chapter2
</para>
]]>
The question is, how do I enable that chapter2-specific part? If I
change the "IGNORE" part into "INCLUDE" in the main book.sgml file, that
second paragraph will show up in both chapters. I tried including this
in chapter2.sgml:
<!ENTITY % chapter2-specific "INCLUDE">
but that generates in this error:
jade:chapter2.sgml:1:2:E: "ENTITY" declaration not
allowed in instance
Is there some other way I can do it? Have I overlooked something or
should I just create a file c2-specific.sgml and have that included in
chapter2.sgml
--
Gerard Beekmans
www.linuxfromscratch.org
-*- If Linux doens't have the solution, you have the wrong problem -*-
--
To UNSUBSCRIBE, email to ldp-discuss-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
--
Godoy. <godoy@conectiva.com>
Departamento de Publicações
Publishing Department Conectiva S.A.