XML technologies / DocBook / Customizing DocBook / Changing and adding attributes / Changing an existing attribute for all elements
(Excerpt from "DocBook-XML: Media-neutral and platform-independent publishing" by Thomas Schraitle)
Suppose you are writing documentation for different computer architectures, with some chapters, sections and so on applying only to particular platforms. For this purpose, the attribute arch accepts only specific values such as x86, x86_64, powerpc and so on.
- DocBook 4
The parameter entity for the attribute
archis named%arch.attrib;. Add the following line to your customization file:
<!ENTITY % arch.attrib "arch (x86|x86_64|powerpc)">Add further entries to the list if needed.
- DocBook 5
The pattern is named
db.arch.attribute. Add the following line to your customization file:
<include href="docbook.rng">
<define name="db.arch.attribute">
<attribute name="arch">
<choice>
<value>x86</value>
<value>x86_64</value>
<value>powerpc</value>
</choice>
</attribute>
</define>
</include>include "docbook.rnc" {
db.arch.attribute =
attribute arch { "x86" | "x86_64" | "powerpc"}
}
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
back to top