Page 1 of 1

DocBook: refer to a subfolder with <xref linkend>

Posted: Tue Mar 12, 2019 10:41 am
by SignSet
Hello,

I have a question which might be quite easy to answer for someone who has already worked with DocBook for a while. However, I was unable to find the correct answer in official DocBook documents.

I'd like to refer to a subfolder using <xref linkend>. At the end of a topic, there is a "next steps" section leading the user to other relevant topics. In the XML code below, the user is led to the XML file tools.xml in the same subfolder as the current XML file, when clicking on the link. That doesn't help in this case, because I have quite a huge substructure and would like to refer to "tools" in a parent folder or subfolder called "utilities". When I write <para><xref linkend="/utilities/tools"/>.</para, Oxgygen indicates "linkend is invalid; must be an XML Name without colons."

Is there any other link element in DocBook that allows to refer to a parent folder or subfolder?

Thanks a lot in advance.

[…]
<itemizedlist>
<title>Next steps</title>
<listitem>
<para><xref linkend="tools"/>.</para>
</listitem>
[…]

Re: DocBook: refer to a subfolder with <xref linkend>

Posted: Tue Mar 12, 2019 1:27 pm
by sorin_carbunaru
Hello,

Unfortunately for you, in the oXygen team we don't have a DocBook specialist, as we are mainly working with DITA. But I think you cannot create a cross-reference to a folder. You can create one to a file, by using <xref xlink:href="...">. By the way, note that linkend must have a reference to an ID as its value, not filenames or something else.

For DocBook related questions we usually recommend our users to write to this DocBook e-mail list: docbook-apps@lists.oasis-open.org. You should also try to find some answers there :).

All the best wishes,
Sorin Carbunaru
oXygen XML