Showing results for 
Search instead for 
Did you mean: 
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Relative paths not working correctly


Relative paths not working correctly


For some reason, PTC Arbortext 6.1 M060 does not construct relative paths properly in DITA. We've set the file locations in Arbortext for the root of the DITA project. If we do not set the root, we get absolute file references. Setting the root gives us links of the form:

<xref format="dita" href="SubDirectoryUnderRoot/someFile.dita" scope="local" type="concept"></xref>  This will not resolve in the build given a source file in an adjacent subdirectory.

The links, in this particular case, should be:

<xref format="dita" href="../../SubDirectoryUnderRoot/someFile.dita" scope="local" type="concept"></xref> This will resolve properly in the build for a given file in an adjacent subdirectory.

If we set the file locations for each and every subdirectory, we still get incomplete URLs without relative paths.

Information Developers are adding the relative path ../../ info manually until we figure out a fix, which is tedious and error-prone.

It's as if Arbortext does not know the current context of the open file and thus cannot construct a relative path to that file. From the documentation, I thought Arbortext first looks to the immediate context of the open file for constructing relative paths.

Any tips appreciated.

Troy Klukewich



We have had issues that paths in ditamaps and topics are not the same causing links not to be published correctly




All of these paths will take you to the correct file. But if they are used interchangeably in the map and topics, there will be issues when publishing.


5-Regular Member

Hi Troy,

There's some known complications when trying to set paths for DITA.

Please try the following, and let us know if you have some more luck:

  • Absolute paths are being created when the Editor cannot find the path of the document in its known set of paths
  • These paths are defined using "set ditapath"
  • To designate relative paths, instead of absolute paths for DITA use the set ditapath function
  • Please review the set ditapath Help Center Topic (help 6488):

I did set ditapath for the root of the project folder. As long as references are within the current folder or to a subfolder within the current directory, the links will be relative.

The problem is with links to adjacent folders in large projects with essentially multiple chapters. We can't reasonably have hundreds of ditapaths, one to each folder for links to resolve across folders.

DITA OT supports links across folders as long as the root map is at the root. Interestingly, oXgyen defaults to full relative path support for large projects, so the problem wasn't an issue until an acquisition switched editors and could no longer construct relative links to other folders using Arbortext.

Apparently, the answer is to construct a custom method to resolve a relative path. We'll give this a try, though it seems really odd to have to customize such a basic linking feature that other XML and HTML editing tools fully support out of the box. I've entered an ER to expand relative path construction in Arbortext.

Top Tags