Page 1 of 1

How do I export Document Type Association info?

Posted: Wed Feb 17, 2021 7:51 pm
by martindholmes
Hi all,

I'd like to export a Document Type Association setup from one project (XPR file) and import it into another. How do I do that?

All help appreciated,
Martin

Re: How do I export Document Type Association info?

Posted: Thu Feb 18, 2021 10:25 am
by Radu
Hi Martin,

I assume that in the Preferences->"Document Type Association" page you have switched the entire page to "Project" level, and then created a new document type configuration which got stored in the project. When you create a new document type you can choose to store it internally or externally to a file. I assume you chose to save it internally, meaning that it got serialized directly in the XPR file.

The XPRs are XML documents, so one way to do this would be to drag and drop both XPRs in Oxygen's main editing area and choose to edit them as XML. You will see that in the XML there is a structure like:

Code: Select all

 <options>
            <serialized xml:space="preserve">
                <serializableOrderedMap>
                    <entry>
                        <String>document.types</String>
That particular entry with the key "document.types" can be copied in the other XPR.
Ideally you would save all framework configurations externally, inside a framework folder bundled with the project. In the Oxygen Preferences->"Document Type Association / Locations" page you can specify additional frameworks directories using editor variables like ${pd} which gets expanded to the current project's location. Like this sample Oxygen project on Github:

https://github.com/oxygenxml/oXygenDITAProject

which comes with its own "frameworks/customDITA" framework folder which is loaded when the XPR is opened in the project view.

Regards,
Radu

Re: How do I export Document Type Association info?

Posted: Sun Feb 28, 2021 3:07 am
by martindholmes
Thanks Radu! I ended up duplicating the XPR file and then editing away the bits I didn't want.

I've got into the habit of using the XPR file to store all this stuff, but I guess a separate framework folder would be better.

Cheers,
Martin