Open raducoravu opened 5 years ago
See places like: "plugins\org.dita.pdf2\xsl\fo\links.xsl":
<xsl:template match="*[contains(@class, ' topic/section ')][*[contains(@class, ' topic/title ')]]" mode="retrieveReferenceTitle">
Possibly we need to add a new template in the "insert-text" mode which ignored draft-comment, but it should be somehow connected to the parameter:
<xsl:template match="*[contains(@class, ' topic/draft-comment ')]" mode="insert-text"/>
Same problem when having draft-comment in topic titles.
Same issue with draft-comments in table/figure titles showing up in List of Tables/Figures (DITA-OT 3.3.3)
This issue has been automatically marked as stale because it has not been updated recently. It will be closed soon if no further activity occurs. Thank you for your contributions.
this issue comes up in LoT/LoF as well when table or figure titles contain draft comments
EDIT: I just realised that lildebbiedragon beat me to it :D
https://github.com/dita-ot/dita-ot/issues/3271#issuecomment-537104267
anyway, is there a reason for me not to simply add
<xsl:template match="*[contains(@class, ' topic/draft-comment ')]" mode="insert-text"/>
to my XSL stylesheet as a workaround?
@thendarion I do not remember this issue too well anymore, there is this "args.draft" parameter which can be enabled for the published output and I do not know how well it works anymore if you add this template which ignores any draft comment.
Removing draft content is conceptually similar to filtering. If we moved removal to preprocessing, then all transformation targets could inherit the functionality. Perhaps something to consider for DITA-OT 4.0?
(Similarly, I wish preprocessing would remove <draftintro>
topics from <bookmap>
publishing when args.draft
!= true
; see #3663 for details.)
Tested with latest DITA OT 3.3 trunk code. For example, I have a topic with a section, title and draft-comment:
Then in another topic, I add an xref to the above section:
The PDF output shows the draft comment text inside the link text. The HTML-based output does not have this problem.