Devrim E. wrote:
we have a large programmer's guide written in docbook. The master xml
looks like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC"-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY Introduction SYSTEM "Introduction.xml">
<!ENTITY Installation SYSTEM "Install.xml">
<!ENTITY Appendix SYSTEM"Appendix.xml">
]>
<book>
<bookinfo>
<copyright>
<year>2005-2014</year>
<holder>ACME Corp.</holder>
</copyright>
</bookinfo>
&Introduction;
&Installation;
&Appendix;
</book>
Problem 1: When I open this file in XML Mind, it tells me that I can use
the toolbar button "Edit Referenced Document". The problem is that I can
not find a toolbar button with this name.
It's a bug. We'll change this message.
Once you'll have ported your DocBook document to XInclude as explained
below, please use "Edit|Reference|Edit Referenced Document"
(Ctrl+Shift-E) to open or visit a chapter and then go back to the master
document using "Edit|Reference|Edit Referencing Document" (Ctrl+Shift-B).
See http://www.xmlmind.com/xmleditor/_distrib/doc/help/referenceMenu.html
I have tried edit
menu/Reference/Edit Referenced Document. But nothing happens when I
select this menu item.
Problem 2: If I open one of the XMLs mentioned in the master xml, e.g.
Introduction.xml, if that XML doesn't have a DOCTYPE, it is not
displayed as a docbook. But if I add the DOCTYPE, XMLMind tells me that
referenced documents can not include DOCTYPE.
* An entity included by reference cannot start with a DOCTYPE.
* A DocBook document without a DOCTYPE is not a standalone DocBook
document of its own; for example, it cannot contain " ".
For all these reasons, we have given up support for creating modular
documents using entity references since v4. You can open such legacy
modular documents in XMLmind XML Editor, but basically that's it.
What is the suggested way of splitting a large docbook into multiple small
XMLs?
You need to convert all entity references to XIncludes.
Please proceed as follows, using a *text* *editor* (not XMLmind XML Editor):
1) Add a DOCTYPE at the top of each module file (chapter, appendix,
section, preface, etc). For example, add:
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
at the top of Introduction.xml.
Make sure to add the DOCTYPE after the XML declaration, for example:
<?xml version="1.0" encoding="UTF-8"?>
2) In the master document, replace each entity reference by the
corresponding XInclude. For example:
&Introduction;
becomes:
<xi:include href="Introduction.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
3) In the master document, remove the now useless internal DTD subset.
That is, remove:
[
<!ENTITY Introduction SYSTEM "Introduction.xml">
<!ENTITY Installation SYSTEM "Install.xml">
<!ENTITY Appendix SYSTEM "Appendix.xml">
]
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support