The key is creating a conditional (filtered) compile.
I thought I could do this with labels, but they don’t work. Each binder item (text block) can have one label, and the compile condition only supports one label. So there’s no way to create a many:one relationship (ex: two books, 1 chapter).
Text blocks can have only one label, but they can have multiple keywords (tags). So keywords seem like they should work, but there’s no way to do a filtered compile off a keyword.
The trick is to create a named collection from a keyword search. Then use the collection name in the compile. That works. Keywords can be applied to both text blocks and to “folders”; you need the latter for chapter headings for example.
For my book I have two keywords, iPhone and Android, and two saved search collections of the same name. The compile uses one or the other. Common chapters get both keywords, platform specific chapters get one.
- fn -
 The keywords UI is an Aperture user element — which is very powerful but amusingly jarring. I assume it’s coming from an OS X API, though I wonder if it’s deprecated. The story of Apple’s abandoned Aperture app would make an interesting book.