Hi,

On 08/02/2010 02:03 AM, Jeffrey Fearn wrote:
Darrin Mison wrote:
Actually I would like this feature for a different usecase:
debugging.

It's useful to be able to comment out includes from the root document
xml to quickly narrow down the source of the problem, but with
projects
that have lots of xrefs it's a nightmare.

Any reason you can't use conditions as per my original response?

I believe Jeff's suggestion would be implemented like this:

<para
condition="RPM">For more information on checking package signatures, refer to <xref
    linkend="s1-check-rpm-sig"/>.</para>
<para
condition="NoRPM">For more information on checking package signatures, refer to the forthcoming &NEXTVER; edition of the &MAJOROS; <citetitle
    condition="NoRPM">&BOOKTITLE;</citetitle>.</para>

Obviously, calling the conditions "ch1", "ch2" and so on would be a bad idea; instead, they should be meaningfully echo the names of chapters or sections.

I had overlooked that multiple conditions can be set simultaneously (there's only a brief mention of that in one example in the Publican Users Guide).

Jeff's solution works, and conforms with the DocBook DTD. However:

* it can't be done ad-hoc (it would probably be overkill just for debugging)
* it busies up the XML markup
* in the case of large books, would add 40-50+ conditions to the build (two for each chapter, such as "RPM" and "NoRPM" above) * renaming a chapter (which happens occasionally) would suggest renaming the associated conditions everywhere they appear in the chapters * would force you to change the conditions set in publican.cfg quite often
* would probably make maintaining and debugging the xrefs a nightmare

Question: is there an upper limit on the number of conditions that can be set? This would be good to know & document.

On the whole, using conditions for this purpose is probably not worth the effort and trouble. That is why I was looking for a more Publican-centric solution.

Thanks,

Silas

Modifying the DTD to be incompatible with upstream is a huge step in
the wrong direction IMHO. Doubly so since using conditions is a
pretty simple work around, again IMHO.

Cheers, Jeff.


_______________________________________________
publican-list mailing list
publican-list@redhat.com
https://www.redhat.com/mailman/listinfo/publican-list
Wiki: https://fedorahosted.org/publican

Reply via email to