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

Relative paths not working correctly

tklukewich1
1-Newbie

Relative paths not working correctly

Hi:

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

Oracle

3 REPLIES 3
bfriesen
14-Alexandrite
(To:tklukewich1)

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

../../12345.dita

X:\directory\subdirectory\12345.dita

\\serveraddress\directory\subdirectory\12345.dita

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.

Bryon

rdiaz
5-Regular Member
(To:tklukewich1)

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):

http://www.ptc.com/cs/help/arbortext_hc/ae60m060_hc/index.jspx?id=help6488&action=show

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.

Announcements