How do I export Document Type Association info?

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
martindholmes
Posts: 161
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

How do I export Document Type Association info?

Post by martindholmes » Wed Feb 17, 2021 7:51 pm

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

Radu
Posts: 7468
Joined: Fri Jul 09, 2004 5:18 pm

Re: How do I export Document Type Association info?

Post by Radu » Thu Feb 18, 2021 10:25 am

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

martindholmes
Posts: 161
Joined: Wed Apr 20, 2005 5:43 pm
Location: Victoria, BC, Canada

Re: How do I export Document Type Association info?

Post by martindholmes » Sun Feb 28, 2021 3:07 am

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

Post Reply