XML technologies / DocBook / Customizing DocBook / Removing elements / Removing an inline element
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Inline elements appear in body text and elsewhere, such as in title, subtitle, etc. Removing one requires more code in DocBook 4 than in DocBook 5.
Customizing DocBook 4
For DocBook 4, proceed as follows:
Procedure: Removing database in DocBook 4
Disabling
%database.module;
Disable thedatabaseelement usingIGNOREand the parameter entity%database.module;:
<!ENTITY % database.module "IGNORE">This declaration disables the element and all its attributes.
Where does
databaseoccur?
Search the files*.modand*.dtdof the DocBookDTD for every occurrence of the element, heredatabase):
<!-- dbpoolx.mod -->
<!ENTITY % tech.char.class "...|guisubmenu|database|interface..."> Redefining element and entity declarations
Remove the element from the element and entity declarations you found. Your customization file looks like this:
<!ENTITY % database.module "IGNORE">
<!ENTITY % local.tech.char.class "">
<!ENTITY % tech.char.class
"action|application
|classname|methodname|interfacename|exceptionname
|ooclass|oointerface|ooexception
|command|computeroutput
|email|envar|errorcode|errorname|errortype|errortext
|filename|function|guibutton|guiicon|guilabel|guimenu
|guimenuitem|guisubmenu|hardware|interface|keycap
|keycode|keycombo|keysym|literal|constant|markup
|medialabel|menuchoice|mousebutton|option|optional
|parameter|prompt|property|replaceable|returnvalue
|sgmltag|structfield|structname|symbol|systemitem|token
|type|userinput|varname
%local.tech.char.class;">
<!ENTITY % DocBookDTD PUBLIC
"-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.docbook.org/xml/4.5/docbookx.dtd">
%DocBookDTD;In the original file
dbpoolx.modthe parameter entitytech.char.classalso contains a line with%ebnf.inline.hook;, which includes the EBNF module. It was omitted here for simplicity.
Using the customization file
Use the customization file instead of the original DocBook file (see Validating with a DocBook 4 customization file).
Customizing DocBook 5
DocBook 5 requires very few lines in your customization file:
<include href="docbook.rng">
<define name="db.database">
<notAllowed/>
</define>
</include>include "docbook.rnc" {
db.database = notAllowed
}
Copyright © 2009 Millin Verlag
You may print the online version for your private use.
Otherwise, this chapter from "DocBook-XML: Medienneutrales und plattformunabhängiges Publizieren" is subject to the same provisions as the printed edition: the work, including all its parts, is protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Millin Verlag, Siebengebirgsring 36, 53797 Lohmar, info(at)millin.de