Exporting editions

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

Exporting editions structure
 
Here is an example XSLT that export the structure of one or more editions - i.e. the list of pages, master pages, layers and external documents contained in the edition.

Click to toggle expandfeed_EditionStructure.xml
Click to toggle expandxsl_EditionStructure.xslt

 
Import both configuration files in the database, and then you can get the XML of an edition calling:

  ../do.ashx?cmd=feed&name=EditionStructure&ids=XXX

where XXX is the id of the edition (or multiple editions separated by comma).

The output XML is something like this:

    <objects>

      <edition id="2767">

        <masters>

          <master id="2768" name="Left" masterType="Left" twoSides="false" 

                  width="822197" height="1180667" />

          <master id="2769" name="Right" masterType="Right" twoSides="false" 

                  width="822197" height="1180667" />

          <master id="2770" name="Double" masterType="Double" twoSides="true" 

                  width="1644394" height="1180667" />

        </masters>

        <pages>

          <page id="2772" logicalPage="false" double="false" leftColor="true" rightColor="true" 

                autoDeadline="2010-07-01T23:30:00.000Z" 

                number="1" sectionId="1659" sectionName="-" zoneId="1656" zoneName="-" 

                workstateId="6675" workstateName="Archived">

            <layers>

              <layer idref="2771" />

            </layers>

          </page>

          <page id="2776" logicalPage="false" double="false" leftColor="true" rightColor="true" 

                autoDeadline="2010-07-01T22:30:00.000Z" 

                number="3" sectionId="1660" sectionName="A" zoneId="1657" zoneName="North" 

                workstateId="6675" workstateName="Archived">

            <layers>

              <layer idref="2775" />

            </layers>

          </page>

          <page id="4123" logicalPage="false" double="false" leftColor="true" rightColor="true" 

                autoDeadline="2010-07-02T00:00:00.000Z" 

                number="4" sectionId="1660" sectionName="A" zoneId="1657" zoneName="North" 

                workstateId="3982" workstateName="Hold">

            <layers>

              <layer idref="4122" />

            </layers>

          </page>

        </pages>

        <extDocs>

        </extDocs>

        <layers>

          <layer id="2771" name="-1 -" layerTypeId="1651" layerTypeName="Editorial" />

          <layer id="2775" name="-3 -" layerTypeId="1651" layerTypeName="Editorial" />

          <layer id="4122" name="A4 North" layerTypeId="1651" layerTypeName="Editorial" />

        </layers>

      </edition>

    </objects>

The master pages width and height are in millipoints. To get centimeters instead, use:

  ../do.ashx?cmd=feed&name=EditionStructure&pars=unit:cm&ids=2767