OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: DOCBOOK: Re: newbie: partitioning docbook documents


/ Robert Krüger <krueger@signal7.de> was heard to say:
| could someone point me to a tutorial or the part in the documentation that 
| explains how to partition a document into many files? At the moment I would 
| like to do two things:
|
| - put each section of an article into a separate file

You can use external entities for that.

<!DOCTYPE book PUBLIC "..." "..." [
<!ENTITY chap1 SYSTEM "chap1.xml">
<!ENTITY chap1s1 SYSTEM "chap1s1.xml">
<!-- etc -->
]>
<book>
&chap1;
</book>

Then in 'chap1.xml', you can say:

<chapter>
<title>...</title>
&chap1s1;
</chapter>

etc. Note that you must not put a !DOCTYPE declaration in the chapter.
This means you have to make a little driver file if you want to
process the chapter separately. Or you can use the rootid parameter of
the stylesheets.

| - and put code examples that I use as programlistings in a separate file

That's easy, just drop them in a separate file and point to them.

<programlisting><textobject>
<textdata fileref="pathtoprogramlisting"/>
</textobject>
</programlisting>

| do I have to declare external entities for that? I have played around with 
| that but ran into problems (CDATA section was not parsed when in a separate 
| file). could anyone give me a working example for the two things I describe 
| above.

Not parsed? I'm not sure what you mean by that.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com>      | A lie is an abomination unto the
http://www.oasis-open.org/docbook/ | Lord and a very present help in
Chair, DocBook Technical Committee | time of trouble.--Adlai Stevenson


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC