Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable PDF product name overrides for #2293 #2693

Merged
merged 1 commit into from May 23, 2017

Conversation

robander
Copy link
Member

The $productName variable is set globally in the PDF code, and then used in many places (headers, footers, etc).

If product name metadata is specified in the map, that name is used to set the variable with xsl:value-of. If you want to modify the product name in any way (typically by supporting keywords that should generate extra text, as with the ™ character in #2293), there is no way to do so without overriding every use of $productName (default code today uses it in 17 named templates).

This pull request uses the existing text-only mode to ensure elements that add text are supported. This doesn't directly address ™, but it does pick up changes from similar elements and means that a simple override can add ™ into those 17 contexts.

Signed-off-by: Robert D Anderson robander@us.ibm.com

<xsl:when test="$mapProdname">
<xsl:value-of select="$mapProdname"/>
<xsl:when test="exists($mapProdname)">
<xsl:apply-templates select="$mapProdname" mode="dita-ot:text-only"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be mode="set-product-name"?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Thanks.

@jelovirt jelovirt added enhancement Changes to an existing feature plugin/pdf Issue related to PDF plug-in labels May 22, 2017
Signed-off-by: Robert D Anderson <robander@us.ibm.com>
@robander robander added this to the 2.5 milestone May 23, 2017
@jelovirt jelovirt merged commit 6780a17 into dita-ot:develop May 23, 2017
@robander robander deleted the hotfix/2293 branch May 23, 2017 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Changes to an existing feature plugin/pdf Issue related to PDF plug-in
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants