Error message when generating the documentation

Having trouble installing Oxygen? Got a bug to report? Post it all here.
BogdanM777
Posts: 68
Joined: Tue Jun 09, 2015 6:26 pm
Location: Canada

Error message when generating the documentation

Post by BogdanM777 »

Hi guys,

I have a small issue when I am generating the documentation for a product of ours using Jenkins.
I get this type of error, and I do not quite understand why it is coming as the documentation is generating anyways:

[xslt] : Error! Ambiguous rule match for /bookmap/opentopic:map[1]/chapter[11]/glossref[7]
[xslt] Matches both "*[contains(@class, ' bookmap/chapter ')] | *[contains(@class, ' map/topicref ')] [not(ancestor-or-self::*[contains(@class,' bookmap/frontmatter ')])]" on line 55 of file:E:/JENKINS_HOME/jobs/DOCUMENTATION/workspace/dita_toolkit/DITA-OT/plugins/org.dita.pdf2/cfg/fo/xsl/custom.xsl

In the line mentioned in custom.xsl there are some changes I did after some suggestions from you regarding the numbering of topics and subtopics (see post35014.html#p35014).
If you would have some advices for that, it would be wonderful.

Thank you
Radu
Posts: 9049
Joined: Fri Jul 09, 2004 5:18 pm

Re: Error message when generating the documentation

Post by Radu »

Hi Bogdan,

I think the warning you posted is incomplete, it should have also stated the other matched template.
The bottom line is that the template you added in the custom.xsl also matches DITA <glossref> elements because it contains the selector:

Code: Select all

 *[contains(@class, ' map/topicref ')]
and a glossref is also a topicref. And there is probably another template somewhere else which also matches glossref. And both templates have the same priority so probably only one of them will be called.
In such cases you could set a @priority attribute on your XSLT template like:

Code: Select all


<xsl:template priority="100".....
if you want the processing to prefer your template for glossrefs.
Or if you want the processing to prefer the standard template for glossrefs you need to make the matching more precise like:

Code: Select all

 *[contains(@class, ' map/topicref ')][not(contains(@class, ' glossref-d/glossref '))]
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply