ph with keyref is not converted to link in PDF output [DOT 2.x develop branch]
If my DITA Map has a key definition like:

```
    <topicref keys="CONTAINER" href="topics/care.dita">
      <topicmeta>
        <linktext>CONTAINER</linktext>
        <keywords>
          <keyword>CONTAINER</keyword>
        </keywords>
      </topicmeta>
    </topicref>
```

and another DITA topic has a keyref like:

```
<ph keyref="CONTAINER"/>
```

in the XHTML output the keyref becomes a link. But in the PDF output it does not.

diff --git a/src/main/java/org/dita/dost/reader/MergeTopicParser.java b/src/main/java/org/dita/dost/reader/MergeTopicParser.java
index ce2e7f12b..3511cad81 100644
--- a/src/main/java/org/dita/dost/reader/MergeTopicParser.java
+++ b/src/main/java/org/dita/dost/reader/MergeTopicParser.java
@@ -234,8 +234,10 @@ public final class MergeTopicParser extends XMLFilterImpl {
                 final String formatValue = atts.getValue(ATTRIBUTE_NAME_FORMAT);
                 // The scope for @href is local
                 if ((TOPIC_XREF.matches(classValue) || TOPIC_LINK.matches(classValue) || TOPIC_LQ.matches(classValue)
-                // term and keyword are resolved as keyref can make them links
-                        || TOPIC_TERM.matches(classValue) || TOPIC_KEYWORD.matches(classValue))
+                // term, keyword, cite, ph, and dt are resolved as keyref can make them links
+                        || TOPIC_TERM.matches(classValue) || TOPIC_KEYWORD.matches(classValue)
+                        || TOPIC_CITE.matches(classValue) || TOPIC_PH.matches(classValue)
+                        || TOPIC_DT.matches(classValue))
                         && (formatValue == null || ATTR_FORMAT_VALUE_DITA.equals(formatValue))) {
                     // local xref or link that refers to dita file
                     XMLUtils.addOrSetAttribute(atts, ATTRIBUTE_NAME_HREF, handleLocalDita(attValue, atts).toString());
diff --git a/src/main/plugins/org.dita.pdf2.fop/xsl/fo/tables_fop.xsl b/src/main/plugins/org.dita.pdf2.fop/xsl/fo/tables_fop.xsl
index 687a8e121..bc7c94fd8 100644
--- a/src/main/plugins/org.dita.pdf2.fop/xsl/fo/tables_fop.xsl
+++ b/src/main/plugins/org.dita.pdf2.fop/xsl/fo/tables_fop.xsl
@@ -20,7 +20,7 @@ See the accompanying LICENSE file for applicable license.
               <xsl:apply-templates select="../@id" mode="dlentry-id-for-fop"/>
               <xsl:apply-templates select="../*[contains(@class,' ditaot-d/ditaval-startprop ')]" mode="outofline"/>
             </xsl:if>
-            <xsl:apply-templates/>
+            <xsl:apply-templates select="." mode="inlineTextOptionalKeyref"/>
         </fo:block>
     </xsl:template>
 
diff --git a/src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl b/src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl
index a0983c8bf..27b048719 100644
--- a/src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl
+++ b/src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl
@@ -150,10 +150,9 @@ See the accompanying LICENSE file for applicable license.
   </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/option ')]">
-        <fo:inline xsl:use-attribute-sets="option">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="option"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/var ')]">
@@ -164,10 +163,9 @@ See the accompanying LICENSE file for applicable license.
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/parmname ')]">
-        <fo:inline xsl:use-attribute-sets="parmname">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="parmname"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/synph ')]">
@@ -199,10 +197,9 @@ See the accompanying LICENSE file for applicable license.
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/apiname ')]">
-        <fo:inline xsl:use-attribute-sets="apiname">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="apiname"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' pr-d/parml ')]">
@@ -225,12 +222,13 @@ See the accompanying LICENSE file for applicable license.
             <xsl:call-template name="commonattributes"/>
             <xsl:choose>
                 <xsl:when test="*"> <!-- tagged content - do not default to bold -->
-                    <xsl:apply-templates/>
+                    <xsl:apply-templates select="." mode="inlineTextOptionalKeyref"/>
                 </xsl:when>
                 <xsl:otherwise>
-                    <fo:inline xsl:use-attribute-sets="pt__content">
-                        <xsl:apply-templates/>
-                    </fo:inline> <!-- text only - bold it -->
+                    <!-- text only - bold it -->
+                    <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+                        <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="pt__content"/></xsl:with-param>
+                    </xsl:apply-templates>
                 </xsl:otherwise>
             </xsl:choose>
         </fo:block>
diff --git a/src/main/plugins/org.dita.pdf2/xsl/fo/sw-domain.xsl b/src/main/plugins/org.dita.pdf2/xsl/fo/sw-domain.xsl
index e4dcb7d0c..959c44d3a 100644
--- a/src/main/plugins/org.dita.pdf2/xsl/fo/sw-domain.xsl
+++ b/src/main/plugins/org.dita.pdf2/xsl/fo/sw-domain.xsl
@@ -54,24 +54,21 @@ See the accompanying LICENSE file for applicable license.
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' sw-d/msgnum ')]">
-      <fo:inline xsl:use-attribute-sets="msgnum">
-        <xsl:call-template name="commonattributes"/>
-        <xsl:apply-templates/>
-      </fo:inline>
+      <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+        <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="msgnum"/></xsl:with-param>
+      </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' sw-d/cmdname ')]">
-      <fo:inline xsl:use-attribute-sets="cmdname">
-        <xsl:call-template name="commonattributes"/>
-        <xsl:apply-templates/>
-      </fo:inline>
+      <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+        <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="cmdname"/></xsl:with-param>
+      </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' sw-d/varname ')]">
-      <fo:inline xsl:use-attribute-sets="varname">
-        <xsl:call-template name="commonattributes"/>
-        <xsl:apply-templates/>
-      </fo:inline>
+      <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+        <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="varname"/></xsl:with-param>
+      </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' sw-d/filepath ')]">
diff --git a/src/main/plugins/org.dita.pdf2/xsl/fo/tables.xsl b/src/main/plugins/org.dita.pdf2/xsl/fo/tables.xsl
index 6f5456a07..3035ce26a 100644
--- a/src/main/plugins/org.dita.pdf2/xsl/fo/tables.xsl
+++ b/src/main/plugins/org.dita.pdf2/xsl/fo/tables.xsl
@@ -101,7 +101,7 @@ See the accompanying LICENSE file for applicable license.
             <xsl:if test="not(preceding-sibling::*[contains(@class,' topic/dt ')])">
               <xsl:apply-templates select="../*[contains(@class,' ditaot-d/ditaval-startprop ')]" mode="outofline"/>
             </xsl:if>
-            <xsl:apply-templates/>
+            <xsl:apply-templates select="." mode="inlineTextOptionalKeyref"/>
         </fo:block>
     </xsl:template>
 
diff --git a/src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl b/src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl
index e8e64c385..711937500 100644
--- a/src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl
+++ b/src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl
@@ -1107,7 +1107,8 @@ See the accompanying LICENSE file for applicable license.
         </fo:inline>
     </xsl:template>
 
-  <xsl:template match="*[contains(@class,' topic/keyword ')]" name="topic.keyword">
+  <xsl:template match="*" mode="inlineTextOptionalKeyref">
+    <xsl:param name="copyAttributes" as="element()?"/>
     <xsl:param name="keys" select="@keyref" as="attribute()?"/>
     <xsl:param name="contents" as="node()*">
       <xsl:variable name="target" select="key('id', substring(@href, 2))"/>
@@ -1123,14 +1124,16 @@ See the accompanying LICENSE file for applicable license.
     <xsl:variable name="topicref" select="key('map-id', substring(@href, 2))"/>
     <xsl:choose>
       <xsl:when test="$keys and @href and not($topicref/ancestor-or-self::*[@linking][1]/@linking = ('none', 'sourceonly'))">
-        <fo:basic-link xsl:use-attribute-sets="xref keyword">
+        <fo:basic-link xsl:use-attribute-sets="xref">
+          <xsl:sequence select="$copyAttributes/@*"/>
           <xsl:call-template name="commonattributes"/>
           <xsl:call-template name="buildBasicLinkDestination"/>
           <xsl:copy-of select="$contents"/>
         </fo:basic-link>
       </xsl:when>
       <xsl:otherwise>
-        <fo:inline xsl:use-attribute-sets="keyword">
+        <fo:inline>
+          <xsl:sequence select="$copyAttributes/@*"/>
           <xsl:call-template name="commonattributes"/>
           <xsl:copy-of select="$contents"/>
         </fo:inline>
@@ -1138,11 +1141,16 @@ See the accompanying LICENSE file for applicable license.
     </xsl:choose>
   </xsl:template>
 
+    <xsl:template match="*[contains(@class,' topic/keyword ')]" name="topic.keyword">
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="keyword"/></xsl:with-param>
+        </xsl:apply-templates>
+    </xsl:template>
+
     <xsl:template match="*[contains(@class,' topic/ph ')]">
-        <fo:inline xsl:use-attribute-sets="ph">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="ph"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' topic/boolean ')]">
@@ -1442,10 +1450,9 @@ See the accompanying LICENSE file for applicable license.
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' topic/cite ')]">
-        <fo:inline xsl:use-attribute-sets="cite">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="cite"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="@platform | @product | @audience | @otherprops | @importance | @rev | @status"/>
diff --git a/src/main/plugins/org.dita.pdf2/xsl/fo/ui-domain.xsl b/src/main/plugins/org.dita.pdf2/xsl/fo/ui-domain.xsl
index 7ed0a92cd..85951bb69 100644
--- a/src/main/plugins/org.dita.pdf2/xsl/fo/ui-domain.xsl
+++ b/src/main/plugins/org.dita.pdf2/xsl/fo/ui-domain.xsl
@@ -45,17 +45,15 @@ See the accompanying LICENSE file for applicable license.
                 </xsl:call-template>
             </xsl:if>
         </xsl:if>
-        <fo:inline xsl:use-attribute-sets="uicontrol">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="uicontrol"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' ui-d/wintitle ')]">
-        <fo:inline xsl:use-attribute-sets="wintitle">
-            <xsl:call-template name="commonattributes"/>
-            <xsl:apply-templates/>
-        </fo:inline>
+        <xsl:apply-templates select="." mode="inlineTextOptionalKeyref">
+            <xsl:with-param name="copyAttributes" as="element()"><wrapper xsl:use-attribute-sets="wintitle"/></xsl:with-param>
+        </xsl:apply-templates>
     </xsl:template>
 
     <xsl:template match="*[contains(@class,' ui-d/menucascade ')]">
['src/main/plugins/org.dita.pdf2/xsl/fo/topic.xsl', 'src/main/java/org/dita/dost/reader/MergeTopicParser.java', 'src/main/plugins/org.dita.pdf2/xsl/fo/sw-domain.xsl', 'src/main/plugins/org.dita.pdf2/xsl/fo/pr-domain.xsl', 'src/main/plugins/org.dita.pdf2.fop/xsl/fo/tables_fop.xsl', 'src/main/plugins/org.dita.pdf2/xsl/fo/tables.xsl', 'src/main/plugins/org.dita.pdf2/xsl/fo/ui-domain.xsl']