Description of problem: I have been working of late to see how feasible it is to build documentation from the openstack-manuals project using Publican, allowing us to single source while working with the upstream community. At this time I am looking at using a pre-build script to perform some transformations on the XML to allow this but some of these seem like they should/could be unnecessary. One thing I have noticed is that the project uses the "os" conditional in some guides to support downstream projects in building documentation output specific to a single operating system. I would like to see support for the "os" conditional in publican. My interim plan is to convert these attributes to "condition" which is supported by publican in pre-build scripting. Version-Release number of selected component (if applicable): publican-3.1.3-1.fc17.noarch
Reflecting on this request further I suspect the precursor would be support for setting more than one profiling condition from publican.cfg (currently you can *set* more than one but only the last one found is used when processing the XML). Not sure how feasible this is in the current publican code base.
It just needs an extra if statement in XmlClean::prune_xml and to store 'os' in $Publican->{config} You might be better off storing it in the 'arch' conditional, which isn't strictly correct but it would be easy to regex back to 'os' later on if you have a chance of using 'condition'.
Assuming two conditions means OR. e.g. a section for 'fu' or 'bar'. <section condition="fu;bar"> a section for 'bang' <section condition="bang"> In the publican.cfg condition: 'fu;bang' Both the above sections would be included. [Dev Note] XmlClean.pm, sub prune_xml, put all attrs from http://www.sagehill.net/docbookxsl/Profiling.html in an array, loop, split, loop, compare, FTW.
Docs need to be updated! Previously we supported arch and conditional, this has been expanded to the full list. arch audience condition conformance lang** os revision revisionflag role security status userlevel vendor wordsize Previously the profiling allowed 1 option to be set. e.g.: arch: "i386" The logic has been changed so that multiple conditions can be set. e.g. arch: "i386;x86_64" Where the ';' means OR. The XML supports the same OR logic, e.g. <para security="minimal;maximal"> ** lang is special, it's always used in Publican and it gets set implicitly. To ssh://git.fedorahosted.org/git/publican.git 1bc3841..1b8f230 HEAD -> devel
(In reply to Jeff Fearn from comment #4) > Docs need to be updated! Zac, can you take this one too please?
*** Bug 733577 has been marked as a duplicate of this bug. ***
The os attribute works as expected.
However, unless I'm missing something, "audience" does not. I have in my publican.cfg: audience: dudes But, when I add something like this to a book: <section audience='dudes'> I get this when I build it: Beginning work on en-US DTD Validation failed: Introduction.xml:16: validity error : No declaration for attribute audience of element section
I tried examples of each of these: arch audience condition conformance lang** os revision revisionflag role security status userlevel vendor wordsize They all work except for audience, as stated in comment #8. publican-3.1.5-0.fc18.t62.noarch
Changing to verified as audience is a DocBook 5 common attribute and will correctly fail when used in DocBook 4 content.
The fix for this bug has been shipped in publican 3.2.0