Red Hat Bugzilla – Bug 839460
RFE: xrefstyle on injected links
Last modified: 2014-10-19 19:01:08 EDT
Can you please have the csprocessor write the xrefs for injected lists like this:
<xref xrefstyle="see-also" linkend="..." />
<xref xrefstyle="prereq" linkend="..." />
<xref xrefstyle="list" linkend="..." />
We can use the xrefstyle attribute of <xref> elements to remove the "Section 1.3.5" in front of links in the "See Also:" lists in html builds.
In cases where no matching style exists in a brand the default behaviour of rendering the Section / Chapter metadata in front of the link target title will continue, but for those who want to, they will be able to modify the output.
There is a workaround at the moment:
Run this on the assembled publican XML:
perl -p -i -e 's/xref linkend=/xref xrefstyle="select:title" linkend=/g' en-US/topics/*.xml
This suppresses all the "Section / Chapter" preamble on xref links. Doing it using named xrefstyles allows us to control the behaviour via the brand, and to use different styles for links that have different purposes ("See Also" vs "Prerequisite", for example).
What would give us the most flexibility is if we have an --override / publican.cfg ability to tell csprocessor to use semantic xrefstyles (which should be the default) or just output the vanilla xrefs that it does atm.
OS: Fedora release 16 (Verne)
JAVA: java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)
CSProcessor client version: 0.25.1
I've added those "xrefstyle" attributes the the xref links for 0.25.2.
I'll take a look at command line option at a later stage since it's not very high priority atm.
Oops forgot to mention that the only change i made to the xrefstyle names is to call "link-list" instead of "link"
Moving this back to MODIFIED as it's not complete.
Maybe the thing to do with issues like this is to split them into separate sub-features? That way when something gets released, the bug that tracks it changes state.
Just to add to my last comment about what's not complete. I still need to look at the command line option to turn off the xrefstyle injections. However that is a low priority.
Also note that it won't be a publican.cfg option as those variables are for publican. If you want it added to there so that publican removes all the xrefstyles then you'll need to create an RFE in the publican bug queue.
As per your suggestion I'm splitting this into two bugs to mark this one as ON_QA.
New bug for the switch: Bug #843451
Closing and setting as current release as no QA was performed by the original reporter. If there is still an issue with this bug still than please re-open it.