For concatenating LaTeX's .dvi files you can use the program dviconcat:
dviconcat -o combined.dvi file1.dvi file2.dvi file3.dvi
What program can you use for concatenating XeLaTeX's .xdv files?
For concatenating LaTeX's .dvi files you can use the program dviconcat:
dviconcat -o combined.dvi file1.dvi file2.dvi file3.dvi
What program can you use for concatenating XeLaTeX's .xdv files?
The reason why I write this as an "answer" is that the amount of text does not fit into a comment.
In your comment you link some code of mine. With the three examples did you only change the driver-option from dvipdfm to xetex? If so, then the special for reactivating destinations was in use. But that does not solve all the problems that occur when trying to concatenate.
When I wrote the examples linked by you in your comment, I tried many routes.
With none of them but the dviconcat/dvipdfm-route things seemed to work out.
E.g.,
dvips-driver-option while creating .dvi-files: Result: When you concatenate .dvi-files via dviconcat, then via dvips convert the concatenated .dvi-file to .ps-file and then via ps2pdf convert the .ps-file to .pdf-file, then you get a .pdf-file which contains all documents. But within that .pdf-file links between different documents contained in the same.pdf-file do not work out.pdftex-driver-option while creating .pdf-files. Problem: MyDocument1 contains links to MyDocument2 and vice versa. Thus when compiling MyDocument1.tex/MyDocument2.tex pdflatex will find links to destinations that do not exist. (These destinations will exist after concatenating.) In these links pdflatex will replace these destinations by "fixed ones". An undesired side-effect of this is that it ensures that within the .pdf-file that comes into being as a result of concatenating the .pdf-files created by pdflatex linking from one document contained in that .pdf-file to another document contained in that .pdf-file will be broken.xetex-driver-option while creating .xdv-files: Problem as mentioned by you: There is no tool/program available for concatenating .xdv-files.xetex-driver-option while creating .pdf-files: Poppler's pdfinfo shows that with all .pdf-files created by xelatex destinations are reachable from outside. But problem: You need programs for concatenating the resulting .pdf-files. I now—like you—tried both pdftk and Poppler's pdfunite. With both attempts in those .pdf-files that came into being as a result of concatenating, links between documents concatenated into the same .pdf-file did not work out. Besides this pdfinfo -dests ... showed that .pdf-files that come into being due to concatenating do not contain any destination that is reachable from outside. I think for resolving this you need to change the ways in which the programs for concatenating .pdf-files work. So—strictly speaking—this is not a problem on the side of LaTeX but this is a problem on the side of the tools/programs in use for laterwards concatenating whatsoever output-files that were produced by LaTeX. The connection to LaTeX is: In some circumstances (no computer-fillable pdf-forms needed, dvipdfm-route feasible) you can use LaTeX for creating output-files (.dvi-files) with which some concatenating-tools (dviconcat) and converting-tools (dvipdfmx) are tricked into yielding the results you want...
xdvipdfmx– egreg Oct 31 '19 at 22:05pdfinfo -dests concatenated.pdfshows there are no destinations reachable from outside. Basically I would like to re-create the scenario shown by Ulrich Diez (he uses dvipdfm-driver) with xetex-driver-option where links to external files will be turned to internal links when files are united. – Jewdokija Oct 31 '19 at 22:40