Import formats in EdAdmin4

Build 1501 on 14/Nov/2017  This topic last edited on: 24/Oct/2016, at 14:39

To import formats in EdAdmin4

1.View formats as explained in View formats in EdAdmin4.

2.On the Format menu, click Import.

3.Select the folder and then select the file name you exported as explained in Export formats in EdAdmin4.

Note: The exported file may contain one or more formats. Make sure you did all necessary editing of the XML file before importing it.

IMPORTANT WARNING BEFORE REIMPORTING EXPORTED FORMAT FILE

The exported XML file contains the original format id, the original ids of all style libraries, and the typography name (one in each style library and one in format). If you exported more formats, then the previously mentioned data appears for each format. So, if you import it 'as-is', you will simply replace the existing objects in the database.

There are four possible cases:

1.Import it as a new format in the same typography, with links to existing style libraries. This is suitable if you want to have a copy of the existing format, and change just the format properties, while continuing to use the same styles. Edit the XML file and remove the id of the format, e.g. remove id="obj1860" from the <justContext id="obj1860". On importing, this will force the creation of the new format.

2.Import it as a new format in the same typography, with duplicates of the existing style libraries. This is suitable if you want to have a copy of the existing format, and change the format properties, and the styles. Edit the XML file and remove the id of the format, e.g. remove id="obj1860" from the <justContext id="obj1860"., and then also remove ids of all style libraries, e.g. remove id="obj161540" from the <justDef id="obj161540", and from all other <justDef elements. On importing, this will force the creation of the new format and new style libraries.

3.Import it as a new format in another typography, with duplicates of the existing style libraries. This is suitable if you want to have a copy of the existing format, and change the format properties, and either use the same styles (duplicates) or change them. Edit the XML file and remove the id of the format, e.g. remove id="obj1860" from the <justContext id="obj1860"., and then also remove ids of all style libraries, e.g. remove id="obj161540" from the <justDef id="obj161540", and from all other <justDef elements. Moreover, replace all the occurrences of the typography name with the new typography name, e.g. replace Default in <keyVal>Default</keyVal> with another name. On importing, this will force the creation of the new format and new style libraries.

4.Import it as a existing format in the same typography, with changes of the style libraries. This is suitable if you want to edit actual settings in XML, using find and replace. Edit the XML file but do not change ids or typography names.

Example of a XML file

<?xml version="1.0" encoding="utf-8"?>

<objects 

  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

  xmlns="urn:schemas-teradp-com:gn4tera">

 <justDef id="obj161540" name="Jumps" modifiedDate="2012-06-21T16:50:51.263Z">

         <description />

         <scopeRef objectType="justScope">

                 <keyVal>Default</keyVal>

         </scopeRef>

         <cmds>

                 <cmd xmlns="" name="JumpTo2" desc="JumpTo2" cmdType="ParStyle" nextSt="">

                         <par desc="Jumpline" type="String" def="" min="0" max="0" />

                         ...

                 </cmd>

                 ...

         </cmds>

 </justDef>

 <justDef id="obj189113" name="J" modifiedDate="2014-02-10T12:06:53.810Z">

         <description>Default styles library</description>

         <scopeRef objectType="justScope">

                 <keyVal>Default</keyVal>

         </scopeRef>

         <cmds>

   ...

         </cmds>

 </justDef>

 <justContext id="obj1860" 

   name="J" modifiedDate="2014-02-06T14:43:59.237Z" 

   textFit="Body" defaultParaFit="Head" minDepth="0" maxDepth="0">

         <description>Default format</description>

         <scopeRef objectType="justScope">

                 <keyVal>Default</keyVal>

         </scopeRef>

         <status>

                 <ets xmlns="" mode="None" modeData="0" YOfs="0" flags="0" fontCode="10111" 

       slant="0" charH="8994" charW="8994" shEnlarge="50" shX="60" shY="50" 

       kerning="0" hyp="en">

                         <color isCode="true" cmyk="0" code="1" gray="100" />

                         <supColor isCode="true" cmyk="0" code="1" gray="0" />

                 </ets>

                 <ps xmlns="" hyp="true" app="0" lastApp="3" useLastApp="true" standardIndent="0" 

      nStandardIndent="0" leftIndent="0" nLeftIndent="0" rightIndent="0" nRightIndent="0" 

      leading="9538" spaceBefore="0" spaceAfter="0" areaBreak="false" leadingCol="9538" 

      leadingColOn="false" lineWidth="240000" topVAdd="0" topVSub="0" vAdd="0" vSub="0" 

      keepTop="0" keepBot="0" keepNext="false" spaceW="270" minSpaceW="190" 

      maxSpaceW="330" gridH="9538" gridOfs="9538" />

                 <justPars xmlns="" breakChars="-" tLen="4" spacing="Optimal" overfull="Shape" />

         </status>

         <xmlTxt>--</xmlTxt>

         <defs>

                 <ref objectType="justDef">

                         <keyRef objectType="justScope">

                                 <keyVal>Default</keyVal>

                         </keyRef>

                         <keyVal>J</keyVal>

                 </ref>

                 <ref objectType="justDef">

                         <keyRef objectType="justScope">

                                 <keyVal>Default</keyVal>

                         </keyRef>

                         <keyVal>Jumps</keyVal>

                 </ref>

         </defs>

 </justContext>

</objects>

See also

Export/import style libraries in EdAdmin4