My answer assumes that you are talking about DocBook v5+, not DocBook v4 (which does not support <xref xlink:href="#..."/>).


On 11/14/2016 11:58 AM, Vincent Bossier wrote:
I use <xref xlink:href="#..."/> links in my DocBook documents. When
creating an xref in XMLMind, there is a default "linkend" attribute but
no xlink:href.

Note that <xref xlink:href="#foo"> (starting with '#') is functionally equivalent to <xref linkend="foo">, just more complex and not well supported by XMLmind XML Editor (because this variant of <xref> is not really useful).





How can I replace linkend with xlink:href ?


1) Check "Enable the "Edit|Force Deletion" menu item" (Options|Preferences, General|Features section) and restart XXE. This step is done once for all.

2) Insert an <xref> and select it.

3) In the Attributes tool, right-click "linkend" and select "Force Removal" from the popup menu.

4) Reselect this now invalid <xref> if needed to. This time, attribute "xlink:href" should be listed in the Attributes tool, so give a value to the "xlink:href" attribute.



Once this is done, because performing steps (2), (3) and (4) over and over is quite inconvenient, it's possible to make <xref xlink:href="#???"/> your default <xref> template. How to do this is explained in this tutorial:

Inserting custom element templates
http://www.xmlmind.com/xmleditor/_tutorial/element_template/index.html

Screencast:
http://www.xmlmind.com/xmleditor/_tutorial/element_template/video/element_template.html


--
XMLmind XML Editor Support List
xmleditor-support@xmlmind.com
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to