When using "File->Save Ditamap As - Book With fm components", the xrefs in the generated book refer to the corresponding fm document and not the original xml/dita file. Hence, the links in PDF also get generated properly.
In case, it is not happening this way at your end, then there seems to be some specific reason.
I will suggest you to try the following steps:
1) Create new Map.
2) Create two new topics - 1.dita & 2.dita - and add to map.
3) Add an xref in 2.dita pointing to an element in 1.dita.
4) Save as Book with fm components
5) Open 2.fm book component.
6) "Double click" on the xref. The DITA xref dialog shall display 1.fm as the source file name.
Also, what version of FM are you using ? (to check this use "Help->About FrameMaker")
Adobe FrameMaker Engineering
I tested it as per your instructions in the Default structapps setting (so used DITA-Topic-FM and DITA-MAP-FM) within FM9.0p250.
- Created a book (Test.book)
- Created 2 topics (test1.dita and test2.dita)
- Used fm-xref to insert a reference from test2.dita to the topic of test.dita).
- Saved files
- Selected File > Save Ditamap As... Book 9.0 with fm components Book and fm files were created.
- Opened test2.fm
- Held CTRL+ALT and selected the link
- test.dita is opened (I expected test.fm to open instead)
- In test2.fm, double-clicked on the reference.
source file is test.dita, not test.fm
Ferry van der Vorst
After some testing, I have found out that patch p250 (latest patch; upgrade from patch p237) in FrameMaker 9 introduced this bug in the DITA implementation.
Prior to this patch, when saving the ditamap as a Book with fm components, the cross references are correctly resolved to the FrameMaker documents created during this process. Once this patch is installed, the cross references are no longer resolved to the fm documents, but to the source dita topics.
A temporary solution would be to uninstall patch 250 via the control panel.