DocBook: refer to a subfolder with <xref linkend>

Questions about XML that are not covered by the other forums should go here.
Posts: 1
Joined: Tue Mar 12, 2019 10:22 am

DocBook: refer to a subfolder with <xref linkend>

Post by SignSet » Tue Mar 12, 2019 10:41 am


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.

<title>Next steps</title>
<para><xref linkend="tools"/>.</para>

Posts: 346
Joined: Mon May 09, 2016 9:37 am

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

Post by sorin_carbunaru » Tue Mar 12, 2019 1:27 pm


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: You should also try to find some answers there :).

All the best wishes,
Sorin Carbunaru
oXygen XML

Post Reply