Information Classification: External Restricted.
See https://www.chili-publish.com/security

Resource Item Definition XML

Concept

Any resource (see ?Resources.) maintained in CHILI (through the BackOffice or through the API) contains "Resource Items". And each Resource Item has what we call a "Definition XML".

This XML is used by CHILI to describe the resource item (either as a reference or containing all object information, depending on the Resource's type. Again: see ?Resources.). But it is also used throughout the API as results of webservice functions, or als arguments.

The XML structure varies depending on the resource. The minimum information you'll find is:

<item name="MY_DOCUMENT" id="9a060ed3-55a7-40d4-ade6-739056d7802a" relativePath="Test Documents/InDesignImports/MY_DOCUMENT.xml" />

(where "relativePath" ONLY applies to resources of type "directory_file" or "directory_object").

Any resource can have additional properties present. A font, for example, will include a "family" and "style". PDF Export Settings contain all attributes configurable through the backoffice, etc.:

<item name="Arial Bold" id="123-456-789" relativePath="My Fonts/arialb.ttf" family="Arial" style="Bold" />

Assets and documents will contain additional information when returned by webservice functions, as those resources can also contain previews, and may have some relevant metadata and file information needed by CHILI Editor upon easy/fast request (in "metaData" and "fileInfo" sub-nodes):

<item name="boober1.jpg" id="8c8819b5-16e2-4027-b46a-8ffc20da60c9" relativePath="Exported\boober1.jpg" hasPreviewErrors="false">
   <fileInfo fileIndexed="2010-10-11 15:01:55" numPages="1" resolution="96" width="321" height="445" fileSize="0.02 Mb">
      <metaData>
         <item name="Width (px)" value="321"/>
         <item name="Height (px)" value="445"/>
         <item name="Resolution" value="96"/>
      </metaData>
      <boxes/>
   </fileInfo>
</item>

NOTE: this additional information is maintained in the "fileinfo.xml" file of the item's Private_Data

WebService Functions

Any webservice function returning the datatype ?Webservice DataTypes - resourceItemXML returns the XML describing the item. This includes:

JavaScript

When working with JavaScript, the most common use of definition XML is working with assets. For example in:

All information on this page must be treated as External Restricted, or more strict. https://www.chili-publish.com/security