This document describes the extensions to the standard comet data model that are prerequisite for activiating new features. If any of these extensions are missing, the corresponding feature remains deactivated.

The following table contains all extensions recognized by the system. The descriptions may refer you to more detailed documentation where applicable. The feature name given in the first column of the table is also used in the Logfile.

Introduction Description XML and SOAP ODBC and Oracle Type

1.3 Build 96

Jan 1, 2006

StringID

Extension of the ObjectID by a StringID.

This attribute affects loading, updating and writing of all placeholders using the corresponding objects.

panelstatements.xml
panelstatements.
  panelstatement.
    hasstringids

findstatements.xml
findstatements.
  panelstatement.
    hasstringids

PanelStatements.
  hasStringIDs

FindStatements.
  hasStringIDs

int

1.3.1 R112

Jan 27, 2006

Pageitem Scripts

Specification of an action ID. The action is executed before the template is inserted and can change the ID of the template that is actually to be inserted.

pageitems.xml
pageitems.
  pageitem.
    spread.
      scriptid
pageitems.
  scriptid
int

1.4 R280

Oct 24, 2006

Table Placeholders

Type of a template. This attribute is required to use table placeholders or table templates.

The value of this attrbute is set upon template creation, based on the current document selection. The value is visible in the Template dialog:

  • Selecting a frame results in a frame template
  • Selecting a table, cell, or text inside a table, results in a table template

The same symbol is used in the template list to visualize the template type.

pageitems.xml
pageitems.
  pageitems
    kind
pageitems.
  kindID
int
-

Preview snippets

currently unused

pageitems.xml
pageitems.
  pageitem
    record
      id
      id2
      id3
      stringid
pageitems
  recordID
  recordID2
  recordID3
  recordStringID
int
int
int
string

1.4 R368

Jun 6, 2007

Grid Direction

Are the contents of a grid sorted by row or by column?

  0 - automatic
  1 - by row
  2 - by column

The value of this attribute is automatically selected when creating or changing a grid in the Grid Assistant panel and affects the initial build and reorganization of pages using the product build .

grids.xml
grids.grid
    direction
grids.
  
direction
int

1.4.2 R504

Nov 15, 2007

Magnets & Nails

Does a template use magnets? The value of this attribute is automatically selected when creating or changing templates and affects frame updates. If the attribute is missing, magnets between template frames are ignored when loading frame placeholders.

pageitems.xml
pageitems.
  pageitem
    magnets
pageitems.
  magnets
int

2.1 R1760

Feb 20, 2010

Pageitem Visible Flag

Controls the visibility of templates in the Product Pool and within Whiteboard. If this flag is not defined, all templates are shown, and the popup for controlling visibility in the template panel is deactivated.

When inserting the attribute, it is best to set the default value to 3 (visible everywhere).

pageitems.xml
pageitems.
  pageitem
    active
pageitems.
  active
int

3.1 R1567

Sep 24, 2009

Page Templates

Support of the page build . When using XML, this file can be created automatically; when using SOAP, ODBC or Oracle, page templates (and thus, the entire page build system), cannot be supported.

File pagetemplates.xml Table pagetemplates -

Framerules

Determines the action that should be executed after a template has been inserted (e.g. adding new pages in front of a product). These settings are important, since a template's rules are unknown until it has been loaded, but still need to be executed.

You can find relevant information in multiple places:

File framerules.xml Table framerules -

Support Globals

Support of global variables in cScript.

Always active Table globals -

3.1 R1864

May 8, 2010

Support Object Names

Should object names be displayed with products in the To Dos Panel and in the Placeholder Options panel? If this attribute is missing, either no names are displayed (Placeholder Options), or an attempt is made to procedurally extracting a name from the placeholders in the document.

More information can be found in the documentation of the To Dos Panel and Placeholders.

placeholder.xml
metadata.
  placeholder.
    objectnameid
placeholder.
  ObjectNameID
int

3.2 R1828

Apr 9, 2010

Templates for New Pages

Continuation templates. May a template specify a continuation template, in addition to an opposite template? A continuation template is used during page building (), when a template does not fit in a continuous space, but may be continued elsewhere.

This attribute is automatically maintained when saving the template. If it is missing, page building cannot support N:1-spaces.

pageitems.xml
pageitems.
  pageitem
    spread
      continue
pageitems.
  continueid
int
-

Pageitem Colors

Currently unused

pageitems.xml
pageitems.
  pageitems.
    
color
pageitems.
  color
int

3.1 R1956

Jul 17, 2010

Deletion of Template & Page Templates

Before the deletion of a template, grid, or page template, the matching panel executes the panel statement, which may abort the deletion of the element.

Panelstatement 118 for Templates -
Panelstatement 119 for grids, analogous to Deletion of Templates
Panelstatement 120 for page templates

3.2.3 R2630

Sep 1, 2011

Template Groups

Templates within the same group may exchange contents of matching frames (i.e. frames with identical identifiers) during reorganization. Each template may belong to any number of groups. If two templates do not share any groups, and do not belong to the same smart template, the contents of matching frames are not carried over when changing templates.

The group names are stored in a comma-separated string ("Group 1", "Group 2").

Groups can be created and assigned using the Templates panel.

pageitems.xml
pageitems.
  pageitems.
    memberships
pageitems.
  memberships
string

3.1 R2178

Oct 22, 2010

Load Button in Previews Panel

Deactivates/Hides the load button on entries in the preview panel.

previewstatements.xml
previewstatements.
  
previewstatement.
    hasButtonState
previewstatements.
  hasButtonState
int

3.2.2 R2366

Mar 23, 2011

Link Script for Previews Panel

Specifies a script to be executed after inserting a preview entry (text, image, frame)

previewstatements.xml
previewstatements.
  
previewstatement.
    hasLinkScript
previewstatements.
  hasLinkScirpt
int

3.2.3 R2450

May 17, 2011

Pre/Postfixes of Placeholders

Text placeholders may insert a divider text, leading or trailing, that does not belong to the actual placeholder. This text is auto-updated when loading the placeholder.

placeholder.xml
metadata.
  placeholder.
    prefix
    postfix
    prefixifempty
    postfixifempty
placeholder.
  prefix
  postfix
  prefixifempty
  postfixifempty
four Strings

3.2.3 R2568

Jul 11, 2011

Delimiters in Text Flow Builds

In page template-driven text flow builds, this can be used to generate text in between products. Two delimiters may be specified:

  • First Product
  • All following products

The following values can be chosen as delimiters

  • no delimiter
  • single space
  • paragraph break
  • -
  • Any action with ClassID 46
pageitems.xml
pageitems.
  pageitem.
    textflowPrefix1Action
    textflowPrefix1
    textflowPrefixNAction
    textflowPrefixN
pageitems.
  textflowPrefix1Action
  textflowPrefix1
  textflowPrefixNAction
  textflowPrefixN
int, String,

int, String

3.3 R 2630

Sep 1, 2011

Build Support

Support of the product build: while building an individual product, there are a number of hooks for a script to run on, as defined by the template - these may, for example, run additional size checks.

pageitems.xml
pageitems.
  pageitem.
    buildSupportScript
pageitems.
   buildSupportScript
int

3.3 R 2636

Sep 6, 2011

Placeholder Groups

During daily work, it is commonly necessary to regularly update a specific (sometimes large) selection of placeholders in lockstep. To make sure you do not have to redo the eye selection everytime, you can save selections as placeholder groups ...

File placeholdergroups.xml, see here Tables placeholdergroups and placeholdergroupsXplaceholders -

3.3 R 2700

Nov 7, 2011

Templates Shapes

Evaluation of template shapes (as opposed to the bounding box of the template).

pageitems.xml
pageitems.
  pageitem.
    
hasShapes

The required information about frame edges is stored in the file templateID.shapes "next to" the template files.

pageitems.
  
shapes
XML & SOAP : int

Database : text

3.3.1 R3450

Feb 21, 2013

IDML Variants of Templates

Should templates automatically be mirrored in IDML files?

The template files in IDML/W2ML-format with the matching extensions (idml/w2ml) are stored in addtion to the INDD version of the template in the pageitems/data directory of the data pool.

pageitems.
  dataIDML

With Panelstatement 121, you can also specify a custom directory for storage.

See also prefs::add_idml_to_templates.

text

W2ML Variants of Templates

pageitems.
  dataW2ML

With Panelstatement 137, you can also specify a custom directory for storage.

See also prefs::add_w2ml_to_templates

text

3.4 R6000

Oct 20, 2014

Page Template Scripts

After applying a page template to a page, additional actions may be executed.

No extensions of the data model are required for this feature. Find out more about this feature here.

4.0.5 R8410

Jul 10, 2015

Comet Snippets

Comet Snippets of built products without continuations.

snippets.xml

If this file does not exist, it is automatically created when required.

Table comet_snippets.

-

4.0.5 R8600

Aug 14, 2015

Frame Infos

Information about one or more frames is to be stored in the data pool. This information can be recalled at a later time and applied to the corresponding frames. ...

frameinfos.xml

If this file does not exist, it is automatically created when required.

Table comet_frameinfos.

-

4.1 R12350

Aug 14, 2016

Product Pool Language

In the product pool panel, you may want to select the language of products to be placed. The selected language is used in custom findstatements. Find out more about this feature here.

Panelstament 140

-
4.0.5 R20104

1. Sep 20017

String Compare Scripts


Customizing the comparison of document and datapool values of placeholders in standard syncs, see here for more informations

placeholder.xml
metadata.
  placeholder.
     styleid
placeholder.
  CharacterStyleID
int
4.1
R21612

5. Feb. 2018

Templates Minimum Size

The product buold-up process checks the size of the available space in the page element before inserting a product template. If the page element is too small, the next matching page element is searched for. Do you want to use the real size or the expected minimum size of the template for this size checks?

See here for more infromations.

pageitems.xml
pageitems.
  pageitem.
    hasMinSize,
    realWidth,
    realHeight
pageitems.
  hasMinSize,
  realWidth,
  realHeight
int, float, float
4.2
R32000

9. Dec. 2022

InDesign-Version of Templates

Warn against overwriting templates from older InDesign versions and prevent attempts to use templates from newer InDesigns.

With the initial value 0 you turn off the version checking for single templates.

pageitems.xml
pageitems.
  pageitem.
    version

pageitems.
  version
int

The current status of all features (except for deletion of templates / grids / page templates) is written to the log file with each change to the data connection.

For example:

# Configuration for '/Users/paul/Desktop/fifo/priint 5.5/xmldata'
#	StringIDs : YES
#	Template Scripts : YES
#	Template for New Pages : YES
#	Template Colors : YES
#	Template Version : YES
#	Table Placeholders : YES
#	Preview Snippets : NO
#	Template Visible Flag : YES
#	Magnets & Nails : YES
#	Frame Rules : YES
#	Snippet Page Items : YES
#	Use UTF8 : NO
#	Support Globals : YES
#	Support Object Names : NO
#	Support Memberships : YES
#	Support Previews Button State : NO
#	Support Previews Link Script : NO
#	Support Placeholder Pre/Postfix : NO
#	Support Template Textflow Prefix : YES
#	Support Build Support Script : YES
#	Support Template Shapes : YES
#	Support PDF Renderer : YES
#	Has Path Setting : NO
#	Path Setting Has Version : NO
#	Has Comet Snippets : NO
#	W2ML Page Template : YES
#	Page Templates Document Metadata: YES
#	Templates has Min Size : YES
#	Has Placeholder Variants : YES
#	DocWatch : NO

Here is a short description of the log entries. The description mainly refers to XML offline and SOAP/PubServer connections. Please refer to the above table for the corresponding attributes for ODBC connections.

Log Message Check
StringIDspanelstatements.xml : Exists panelstatements.panelstatement.hasstringids?
Template Scriptspageitems.xml : Exists pageitems.pageitem.spread.scriptid?
Template for New Pages(Continuation templates) pageitems.xml : Exists pageitems.pageitem.spread.continue?
Template Colorspageitems.xml : Exists pageitems.pageitems.color?
Template Versionpageitems.xml : Exists pageitems.pageitem.version?
Table Placeholders (Kind of Template)pageitems.xml : Exists pageitems.pageitems.kind?
Preview Snippetspageitems.xml : Exist pageitems.pageitem.record.id, ~.id2, ~.id3, ~.stringid?
Template Visible Flagpageitems.xml : Exists pageitems.pageitem.active?
Magnets & Nailspageitems.xml : Exists pageitems.pageitem.magnets?
Frame RulesExists file framerules.xml?
Snippet Page Itemspageitems.xml : Exists pageitems.pageitem.format?
Use UTF8 XML and SOAP/PubServer -> always YES
ODBC -> depending on the selected character set encoding at login
Support Globals XML-Offline and SOAP/PubServer -> always YES (although no PubServer supports cScript global variables. But the plug-ins could.)
ODBC -> Exists database table globals?
Support Object Namesplaceholder.xml : Existiert metadata.placeholder.objectnameid?
Support Membershipspageitems.xml : Exists pageitems.pageitems.memberships?
Support Previews Button Statepreviewstatements.xml : Exists previewstatements.previewstatement.hasButtonState?
Support Previews Link Scriptpreviewstatements.xml : Exists previewstatements.previewstatement.hasLinkScript?
Support Placeholder Pre/Postfixplaceholder.xml : Exist metadata.placeholder.prefix, ~.postfix, ~.prefixifempty, ~.postfixifempty?
Support Template Textflow Prefixpageitems.xml : Exists pageitems.pageitem.textflowPrefix1Action, ~.textflowPrefix1, ~.textflowPrefixNAction, ~.textflowPrefixN?
Support Build Support Scriptpageitems.xml : Exists pageitems.pageitem.buildSupportScript?
Support Template Shapespageitems.xml : Exists pageitems.pageitem.hasShapes?
Support PDF RendererXML, SOAP, PubServer -> Always YES
ODBC -> Exists the database attribute pageitems.dataW2ML?
Has Path SettingExists file setting.xml?
Path Setting Has Version XML and SOAP/PubServer -> always YES
ODBC -> Exists the database attribute comet_setting.application
Has Comet Snippets XML-Offline and SOAP -> Exists file snippets.xml?
PubServer -> Always YES
ODBC -> Exists the database attribute comet_snippets.id?
W2ML Page TemplateXML, SOAP, PubServer -> Always YES
ODBC -> Exists the database attribute pagetemplates.dataW2ML?
Page Templates Document MetadataXML, SOAP, PubServer -> Always YES
ODBC -> Exists the database attribute pagetemplates.metadata?
Templates has Min Sizepageitems.xml : Exist pageitems.pageitem.hasMinSize, ~.realWidth, ~.realHeight?
Has Placeholder VariantsXML, SOAP, PubServer -> Always YES
ODBC -> Exists the database attribute placeholder_variants.placeholderID?
DocwatchYES, if docWatch is enabled in the login script (Panelstatement 92) by system::set_docwatch (1).

Once you added an attribute to the data model, you have to reconnect to the data pool (by setting the data directory again or logout/login), for the change to take effect. The following examples show how to extend the data model - all extensions can be applied in an analogous fashion.

You can add attributes to an XML file from within any plain text editor. Simply replace a suitable closing tag with this sequence of closing tag, line break, new tag, for all occurences within the file.

Adding the active tag to pageitems.xml

Find    </spread>
Replace with  </spread>
       <active>3</active>

If you have access to the Werk II Utility xmlquery, you can do this in a more elegant fashion:

  1. Open the file xentities.xml and insert the following lines:

<dummy>
  <file>pageitems.xml</file>
  <attr>pageitems.pageitem</attr>
  <name>active</name>
  <type>name</type> 
  <writable>1</writable>
   </dummy>

  1. Open the file in the Werk II Utility xmlquery and save it using commit:

   xmlquery
   >open pageitems
   >update active=3 node pageitems.pageitems
   >commit;

  1. The updated files now contain the desired attribute with the default value of 3. To prevent this field from being added again, now remove the text you inserted in step 1 from xentities.xml.

The process is analogous to XML, simply retrieve the file from the service and reupload it after editing it.

Retrieve file

int main ()
{
	SOAP		soap = soap::connection ();
	int			result;

	if (!soap)
	{
		showmessage ("No connection to the online service");
		return 0;
	}

	result = soap::download_tofile (soap, "pageitems.xml", "$DESKTOP");	
	if (result != 0)
	{
		showmessage ("An error occured loading the file : %s",
		serror (result));
		return 0;
	}

	return 0;
}

Send file

int main ()
{
	SOAP		soap = soap::connection ();
	int			result;

	if (!soap)
	{
		showmessage ("No connection to the online service");
		return 0;
	}

	result = soap::upload (soap, "$DESKTOP/pageitems.xml", -1, "pageitems.xml");	
	if (result != 0)
	{
		showmessage ("An error occured sending the file : %s",
		serror (result));
		return 0;
	}

	return 0;
}

The command for adding columns to existing tables may vary depending on your database vendor. As an example, here is the command for mySQL (which should work with most databases).

alter table pageitems add active int (10);
update pageitems set active = 3;
commit;