Bernd Kuemmerlen wrote: > we have been using a customization for writing DocBook documents with > XXE for some time, using a customized css for display. For this, I > included a > <css alternate="false" location="css/mydocbook.css" > name="DocBook (Custom)" /> > in my custom configuration file. > > With this, in versions prior to XXE 2.4, the "DocBook (Custon)" > stylesheet was selected by default, with the other(s) still available > through the menu. > > Now in 2.4, the default css is the one which is provided with the > installation (I can still select my custom stylesheet from the menu). > > I noticed that adding the alternate=true attribute to the css > declaration in docbook.xxe brings back the old behaviour, but this is > strange since in the pre 2.4 versions, the css declarations looked like > this: > <css name="DocBook (collapsible sections)" > location="css/docbook-collapsible.css" /> > <css name="DocBook" alternate="true" location="css/docbook.css" /> > i.e. the attribute was only set for the "DocBook" stylesheet. > > Is this a bug in the stylesheet selection mechanism or is this a problem > in my usage? The Power User's Guide does not define the behaviour when > the alternate attribute is *not* set at all.
The default value for alternate is false. It is expected to have several alternate="true" style sheets and a single default style sheet (alternate="false" or no alternate attribute at all). When XXE finds several default style sheets, it simply uses default style sheet declared first. In summary, you need to add alternate="true" to the declaration of the DocBook style sheet bundled with XXE before adding a declaration for your own custom style sheet.

