Hi Hussein, Thanks for getting back to me on this point.
After some further analysis I've determined that it's not actually necessary to modify Ref fields to Hyperlinks in the original document. Instead it's possible to modify the topic.xslt template in a minor way to handle the different anchor elements that are supplied to the template for Ref and Hyperlink fields: e.g. Ref field: <a xmlns="http://www.w3.org/1999/xhtml" class="role-xref" href="#step_reference" title="Conversion step reference"/> Hyperlink field: <a xmlns="http://www.w3.org/1999/xhtml" href="#option_p">–p</a> The change that I've made to the topic.xslt is to insert this code within the processXref named template: <!-- If title is populated for xref element then extract the text --> <xsl:if test="@class = 'role-xref'"> <xsl:variable name="title" select="normalize-space(@title)"/> <xsl:choose> <xsl:when test="$title != ''"> <xsl:value-of select="$title"/> </xsl:when> </xsl:choose> </xsl:if> I don't know if this is of interest to you but I thought that I'd mention my solution to the problem. NB I know that there is a more elegant way to override these template matches than directly modifying your templates but I'm having some trouble getting that working for map creation. Cheers, Damian On Thu, 5 Sep 2019 at 15:55, Hussein Shafie <huss...@xmlmind.com> wrote: > Damian Cannon wrote: > > I'm currently engaged in testing your Word to Dita conversion tool for > my company and so far it's pretty good. > > > > However I have a couple of specific questions where the first one > appears to be a bug in the conversion. > > > > To reproduce both of these issues I have used your online conversion > tool (https://www.xmlmind.com/w2x/docx_to_dita.html) so I presume that > this is using the latest release? > > > > Yes. > > > > 1) An xref in the output dita file does not contain the link text shown > in the Word document. > > > > To reproduce: Convert the manual.docx file which you include in your > evaluation zip file (w2x-eval-1_7_0\doc\manual). Then open the > going_further.dita file and search for the text "documented in chapter". > > > > The problem: The xref following this text contains no text content: > <xref href="step_reference.dita#step_reference"/> > > > > My expectation: This xref should contain the text "Conversion step > reference" since this is shown in Word and is available in the > step_reference.dita file. > > > > There is no bug here. > > If you open our "manual.docx" in MS-Word you'll see that "Conversion > step reference" has not been typed by the author. It's some text that > MS-Word has automatically generated for a *REF* *field* the author (that > is, me) has inserted in his DOCX file. See attached screenshot. > > Therefore <xref href="step_reference.dita#step_reference"/> is an > accurate translation of what the author did in MS-Word. > > Note that this is really not an issue. Anyway text "Conversion step > reference" will be automatically generated by the DITA processor (e.g. > the DITA Open Toolkit or our in house ditac; > https://www.xmlmind.com/ditac/) when you'll convert the DITA document > created by XMLmind Word To XML to other formats like PDF, EPUB, HTML, etc. > > If you really want see some text in a DITA xref, then you must insert an > Hyperlink in your DOCX file and not a REF field. > > > > > -- *Damian Cannon | Senior Developer | Scribestar Limited* T: +44 (0) 208 528 1494 | damian.can...@scribestar.com 11th Floor, 88 Wood Street, London, EC2V 7RS [image: Inline images 1] -- Scribestar Limited is a company registered in England and Wales. Registered number: 06935972. Registered office: Suite 202, Central Point, 45 Beech Street, London, EC2Y 8AD. This message is private and confidential. If you have received this message in error please remove it from your system. You must not disclose, copy or distribute the contents of this email or any attachments to any other person nor use its contents or the content in any attachments in any way or you may be acting unlawfully.
-- XMLmind Word To XML Support List firstname.lastname@example.org https://www.xmlmind.com/mailman/listinfo/w2x-support