At the moment Publican 3's Builder.pm hardcodes the schema to be used for validation for Docbook 5: if ( $dtdver =~ m/^5/ ) { $dtd_type = qq|-//OASIS//DTD DocBook XML $dtdver//EN|; $dtd_path = qq|http://docbook.org/xml/$dtdver/rng/docbook.rng|; I have a customization layer that Norm wrote for me that I'd like to be able to use (https://gist.github.com/2768701). Can we make it possible to override the default validation schema from the xml?
This fix has been committed to the devel branch for inclusion in Publican 3.1. Added dtd_type and dtd_uri parameters, which can be set in brands, to override the strings Publican generates.
Hi Jeff, does this belong in defaults.cfg, overrides.cfg or publican.cfg in the brand (or some combination of these)?
Thinking about it more I think as a brand setting the answer must be publican.cfg in the brand but I will test to be sure.
In a brand publican.cfg affects packaging the brand itself. defaults.cfg & overrides.cfg affect books using that brand. In this case you want the brand to control what happens in the books, so either defaults.cfg or overrides.cfg will do.
Verify version:publican-3.1.0-0.el6eng.noarch -> PASS Verify steps: 1. $Publican create_brand --name=test --lang=en-US 2. Add dtd_type and dtd_uri parameters in defaults.cfg of brand, set dtd_uri to https://gist.github.com/2768701 and dtd_type to -//OASIS//DTD DocBook XML 5.0//EN 3. Build the brand and install it to /usr/share/publican/Common_Content/ 4. Create a book and set brand: test in publican.cfg. 5. Build the book, then check tmp/en-US/*.xml Actual results: Validation schema for Docbook 5 have been changed to what we set.