Xref text resolution on elements without title
Posted: Mon Mar 04, 2019 7:05 pm
Hi,
In DITA if you use an xref without text, that's the title of linked element that it gets in output (PDF,WebHelp).
For example with following code I will have "Go to How To Make." :
But here I will have "Go to."
I would like to manage this last case (linked element without title).
For PDF, in my plugin, I just have to insert this template (it works) :
But for HTML I don't know where I have to do modification.
I try to modify this template, but inside it it seems that xref text are already resolved:
Any idea where xref text for WebHelp (HTML5) are resolved?
Thanks.
In DITA if you use an xref without text, that's the title of linked element that it gets in output (PDF,WebHelp).
For example with following code I will have "Go to How To Make." :
Code: Select all
Go to <xref href="a001" format="dita"/>.
...
<task id="a001">
<title>How To Make</title>
...
Code: Select all
Go to <xref href="a001" format="dita"/>.
...
<stepsection id="ONE-ONE">My stepsection</stepsection>
...
For PDF, in my plugin, I just have to insert this template (it works) :
Code: Select all
<xsl:template match="*[contains(@class, ' task/stepsection ')]" mode="retrieveReferenceTitle">
<xsl:value-of select="."/>
</xsl:template>
I try to modify this template, but inside it it seems that xref text are already resolved:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/xref ')]" name="topic.xref">...
Thanks.