The procedure for writing, testing, and using a customization layer is always about the same. In this section, we’ll go through the process in some detail. The rest of the sections in this chapter describe a range of useful customization layers.
If you’re considering writing a customization layer, there must be something that you want to change. Perhaps you want to add an element or attribute, remove one, or change some other aspect of the schema.
Adding an element, particularly an inline element, is one
possibility. For example, if you’re writing about cryptography, you
might want to add a “
The next section describes how to create a customization layer to do
Figuring out what to change may be the hardest part of the
process. For the
example, there are several patterns that you could possibly change. The
choice will depend on the exact focus of your document. Here are several
candidates, all of which look plausible: technical inlines, programming
inlines, and domain inlines. Let’s suppose you chose the domain
As shown in Example 5-1, your customization would import the DocBook schema, extend the domain inlines, and then provide a pattern that matches the new element.
Example 5-1. Adding cleartext with a customization layer
namespace db = "http://docbook.org/ns/docbook" default namespace = "http://docbook.org/ns/docbook" include ...