Skip to Content
DocBook 5: The Definitive Guide
book

DocBook 5: The Definitive Guide

by Norman Walsh, Richard L. Hamilton
May 2010
Intermediate to advanced
552 pages
13h 37m
English
O'Reilly Media, Inc.
Content preview from DocBook 5: The Definitive Guide

Removing Attributes

Just as there may be more elements than you need, there may be more attributes.

Suppose your processing system doesn’t support continued lists. You want to remove the continuation attribute from the orderedlist element. There are two ways you could accomplish this. One way would be to redefine the db.orderedlist.continuation.attribute pattern as not allowed; the other would be to redefine the db.orderedlist.attlist pattern so that it does not include the continuation attribute. Either will accomplish the goal. Example 5-10 uses the first method.

Example 5-10. Removing continuation from orderedlist

namespace db = "http://docbook.org/ns/docbook"

include "docbook.rnc" {
   db.orderedlist.continuation.attribute = empty
}

Subsetting the Common Attributes

DocBook defines a set of common attributes, which appear on every element. Depending on how you process your documents, removing some of them can both simplify the authoring task and improve processing speed.

Some obvious candidates are:

Effectivity attributes (arch, os, condition...)

If you’re not using all of the effectivity attributes in your documents, you can get rid of up to seven attributes in one fell swoop.

xml:lang

If you’re not producing multilingual documents, you can remove xml:lang.

remap

The remap attribute is designed to hold the name of a semantically equivalent construct from a previous markup scheme (e.g., a Microsoft Word–style template name, if you’re converting from Word). If you’re authoring from scratch, ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

WebAssembly: The Definitive Guide

WebAssembly: The Definitive Guide

Brian Sletten
Spark: The Definitive Guide

Spark: The Definitive Guide

Bill Chambers, Matei Zaharia

Publisher Resources

ISBN: 9781449380243Errata