LEARN@IGP

Infogrid Pacific-The Science of Information

14

ID Generation

ID generation is a core function of any digital content production system. IDs can be generated by document or section and stripped if required. Updated: 2012-09-09

Overview

ID Generation is the core processing instruction that must be run before most other processors are used.

It is simple to use and can be used at any time. ID's are generated automatically during format generation, but during production, many content processes may depend on IDs being in place before they are run.

Examples of ID dependent processors are TOC and Lists-of generation, intersection linking and end-note processing.

Two ID Generation Options

DP has two ID generation options. Document IDs and Section IDs. These are mutually exclusive and designed for specific types of content. You must select the correct strategy for the document on which you are working.

Generally Document ID generation is the correct option for all documents except for those where the sections may be used as highly independent content with a lot of interactive components.

Once you have used Document ID's or SectionIDs the other option is not available unless you stripe IDs.

2012 ID Generation Update.

IDs have been radically simplified from 2012-09-01. Previously IDs were efffectively UUIDs which made them unique in the Universe. Now they are terse and semantic.

The reason for this change is because interactive and fixed layout content requires more engagement with the ID structures for CSS presentation and styling operations.

The IDs are now intuitive, easy to remember and use. For example Chapter IDs start at #Chapter1 and match the number of chapters in a book. Likewise paragraphs start at #p1 and increase linearly through the book.

Accessing ID Generation   

  1. Click on the Editing Tools button to show the Editing Toolbar.
  2. From the right-hand end click  the Document Processors button. This will open Document Processors in the Tool panel.
  3. ID generation is the top item in this panel.
  1. When you first open this in a new document both the Document IDs and Section IDs buttons will be active. You can select either ID generation strategy. It is highly recommended you use the Document ID button unless you know explicitly what you are doing.
  2. After you have selected your ID strategy by clicking on a button, the other option will be grayed out and not be useable.
  3. If you want to change your ID type click the Strip IDs button. When the operation is complete both ID generation buttons will again be available.

WARNING. Do not use the Strip ID button carelessly or on a collaborated document. It can destroy other peoples work where IDs matter such as in custom CSS styling.

When to Generate IDs

ID's must be exclusive throughout the document for inter-section Hyperlinking to work and for the main FX file to be valid XHTML5. Generate IDs in the following circumstances:

  1. If you cut, paste and move a large section of text. The ID generator will replace all duplicate IDs that are created with the cut and paste action.
  2. After adding a new Section. If you add a new section, when you have finished editing, generate IDs.
  3. Before Generating Formats. Formats can be generated without ID generation, but it is advised to do so if there are any content moving or positioning requirements.
  4. Before Generating DPI Sections. The Document Processing Instruction Section reordering interface is dependent on accurate IDs.
  5. Before Hyperlinking. Linking between sections is totally dependent on IDs. They must exist.

Click the Document ID button and wait for the dialog to inform you that processing is complete. The larger and more complex your document, the longer ID generation will take but it is usually just a few seconds.

What Happens at ID Generation Time

Once generated an ID is never replaced unless it is stripped or removed with the Block Control ID editor. This is to ensure internal document links are maintained.

Document ID Processing Action

If you are using Document IDs, each time you click the Document IDs button the processor does the following:

  1. It examines the complete document to see if there are any elements with missing IDs. If it finds any it applies the next appropriate ID for the structure in the document to keep all document IDs unique.
  2. It examines the file to see if there are any duplicate IDs. If it finds any it leaves the ID of the first element in the document sequence and applies a new idea to the following elements. This can occur when you cut/copy and paste full paragraphs within a document.
  3. Hand created IDs are treated with the same processing rules across the document. If you have applied a custom ID to a block it will be maintained. If you have used the same custom ID twice or more times, only the first one will be preserved and all subsequent IDs will be made unique. 

Section ID Processing Action

If you are using Section IDs each time you click the Section IDs button the processor does the following:

  1. It examines the entire document to see if there are any sections with missing IDs. If it finds any it applies sequential and individual IDs to each section.
  2. It examines each section independently to see if there are any elements with missing IDs. If it finds any it applies a sequential ID within that section only. This means all sections can have repeating element IDs except for the root Section element.
  3. If you are using interactive panels with the AZARDI Interactive Engine script it will process the panel and frame IDs AND update the AIE script navigation structures and event scripts. You should always use Section IDs if you have documents using a number of panel-rw content blocks.
  4. Hand created IDs are treated with the same processing rules across a section. If you have applied a custom ID to a block it will be maintained. If you have used the same custom ID twice or more times within a section, only the first one will be preserved and all subsequent IDs in that section will be made unique.

Manually Changing IDs

  1. Every FX content block has it's ID accessible through the Content Block Controls.
  2. Click on the Block Control button to expand the controls option.
  3. Click on the ID button. A dialogue will open displaying the block ID if it is available.
  4. Edit and change the ID to the new value required. Remember IDs in XHTML and XML MUST start with an alpha character ALWAYS.
  5. Click on the OK button to save or Cancel button to close without changing.
  6. Save the page. The ID is now permanent and can be referred to from CSS or by any processor.

ID Generation Element and Class Control

This is a technical issue for a template editor or maintainer.

IGP:Digital Publisher processes the FX document with comprehensive IDs. There is a controlled list of elements and FX selectors that don't have IDs applied. These are controlled from the Master Template configuration in Maintenance. These are listed here as an example of ID generation control and may be different in your installation.

IGP:Digital Publisher ID Generation Element and Class Control List

;ID GENERATION SETUP STARTS HERE

;List of tags to be excluded during id generation
[Excluded Tags]
tags: a, b, br, caption, col, colgroup, em, hr, i, img, object, pre, strong, span, sub, sup, tbody, td, th, thead, tfoot, tr, circle, defs, desc, ellipse, g, image, line, linearGradient, metadata, path, polyline, polygon, stop, strong, style, svg, switch, symbol, text, tref, tspan, title, use, math, maction , menclose, merror, mfenced, mfrac, mi, mmultiscripts, mn, mo, mover, mpadded, mphantom, mroot, mrow, ms, mspace, msqrt, mstyle, msub, msup, msubsup, mtable, mtd, mtext, mtr, munder, munderover, mlabeledtr, maligngroup, malignmark, mstack, mlongdiv, msgroup, msrow, mscarries, mscarry, msline, cn, ci, csymbol, cs, apply, bind, bvar, share

;Define the list of (span) classes that need to be included in ID generation
[Exception Classes]

comments powered by Disqus