Roy MacLean wrote: > Hi Hussein, > You are right that the spec does not make clear what happens with a topicref > with scope=external. > I was thinking that a reltable could be used to 'inject' a Related > Information link into a DITA topic, but the spec doesn't make clear whether > this is the intended use. > > The scenario I have is this: I have DITA topics that are training sessions, > with inline code fragments. But I'd also like Related Links to actual code > files - e.g. a Java class. Rather than local copies in the DITA source tree, > these will be the real code files somewhere in my Java source tree. I don't > want to have the Related Links hrefs in the DITA topics being absolute paths > into the Java source, since this is a maintenance headache. So I was > thinking of using a relatable to link topics and code files. However, I take > your point that the maps are about topics, not other resources. > > I have a solution where the Topics link to local HTML files (within the DITA > output location) - e.g. Resource/MyClass_java.html. These files redirect > (Meta Refresh) to the real resources - e.g. ........./MyClass.java. This at > least means that the absolute paths can be changed without needing to edit > the Topics or re-build the output. > > regards > /Roy MacLean > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > Roy MacLean -- IT Training & Technical Writing > http://roymaclean-it.co.uk > contact at roymaclean-it.co.uk > 07 956 474 911 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >
Thank you for this feedback and thank you for confirming that how to process topicrefs having scope="external" is not clear. Note that we often reference .java files from our documents. In order to do this we use xref or link elements having scope="external", format="java" and the href attribute pointing to a *relative* URI. This relative URI is relative to the location of the deliverable, and not to the location of the DITA source document. Because scope="external" has been specified, ditac will not process this kind of URIs.

