Bug 919486
Summary: | RFE: Support all DocBook conditionals | ||
---|---|---|---|
Product: | [Community] Publican | Reporter: | Stephen Gordon <sgordon> |
Component: | publican | Assignee: | Jeff Fearn 🐞 <jfearn> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | tools-bugs <tools-bugs> |
Severity: | unspecified | Docs Contact: | Zac Dover <zdover> |
Priority: | unspecified | ||
Version: | 3.1 | CC: | aigao, jfearn, rlandman, thildred, xma |
Target Milestone: | 3.2 | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | 3.2.0 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-08-09 04:49:26 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 913281 |
Description
Stephen Gordon
2013-03-08 15:54:43 UTC
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 |