Kate,
If you are able to use xinclude in your environment, one option
would be to make each of the three files a "dummy" chapter, then
use xinclude to grab just the sect1s from each file.
Here's a short example:
book.xml:
<!DOCTYPE book --- etc./> <book>
--- title, info, etc.
<chapter><title>Chapter 1</title>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="chapter.xml"
xpointer="xpointer(/chapter/sect1[*])"/>
</chapter>
--- other chapters
</book>
chapter.xml:
<!DOCTYPE chapter --- etc./>
<chapter><title>Dummy chapter</title>
<sect1><title>Section 1</title>
--- content for section 1
</sect1>
<sect1><title>Section 2</title>
--- content for section 2
</sect>
</chapter>
When you resolve the xincludes, for example with xmllint, the
result will be a file that looks like this:
<!DOCTYPE book --- etc./>
<book>
--- title, info, etc.
<chapter><title>Chapter 1</title>
<sect1><title>Section 1</title>
--- content for section 1
</sect1>
<sect1><title>Section 2</title>
--- content for section 2
</sect>
</chapter>
--- other chapters
</book>
The only caveat here is that I have no idea how this solution
will work with XMetal; I haven't tried xinclude with XMetal.
Hope that helps.
Regards,
Dick Hamilton
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, January 30, 2008 9:58 AM
To: [email protected]
Subject: [docbook] Is it possible to split chapters ?
Hello,
We are using docbook 4.2 with our own customizations and our authoring
tool is XMetaL 5.0.
Currently we have a very large chapter, largechapter.xml, that contains
reference material.
This chapter is divided into sect1s. For various reasons, we'd like
to split up the contents of largechapter.xml into three files/entities
and insert the
entities into the largechapter.xml.
What we've done is created three files that contain a list of sect1s.
For example file1.xml 's hierarchy looks like the following:
<sect1>
referenceA material
</sect1>
<sect1>
referenceB material
</sect1>
...
We have no problem inserting an entity for file1.xml into
largechapter.xml and validating
largechaper.xml. The problem is that we can't validate file1.xml on its
own, because
it does not contain an over-arching root. As a result, it is difficult
for us to edit
file1.xml. Is there a tag that we could use that would fit within the
chapter tag and would
accept sect1s? Or is there another way to do this?
I know that an easy solution would be to convert all the current sect1s
in file1.xml
to sect2s and use one sect1. We'd prefer not to do this as it would add
an
extra level for our users to drill down through.
Any suggestions welcome!
Thank you,
Kate
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]