9 Pagination

CLE supports pagination to handle components with extensive event histories. When a CLE file reaches the maximum limit of 100,000 events, it must be split into multiple pages.

9.1 Pagination Rules

  1. Page Size Limit: A single CLE page MUST NOT exceed 100,000 events.
  2. Event ID Continuity: Event IDs MUST be globally unique and incrementing across all pages.
  3. Event Ordering: Within each page, events MUST be ordered by ID in descending order.
  4. Page Chaining: Pages are linked using the next field.
  5. Index File: When pagination is used, an index file SHOULD be provided via the index field.

9.2 CLE Index Schema

The CLE index file provides a directory of all pages for a component.

Table 5: Index Fields
Field Type Required Description
$schema string Yes URI identifying the CLE index schema version.
pages array[object] Yes Array of page descriptor objects, ordered by event ID ranges.
Table 6: Page Descriptor Fields
Field Type Required Description
url string Yes URL of the CLE page file.
firstEventId integer Yes The lowest event ID in this page.
lastEventId integer Yes The highest event ID in this page.

9.3 Processing Paginated CLE Files

When processing paginated CLE files:

  1. Start with any page (typically discovered via the index file or a known entry point).
  2. Process events within the current page according to standard processing rules.
  3. To process all events, use the index file to discover all pages, or follow next links to traverse pages.
  4. Event IDs are globally unique, so withdrawn events can reference events on any page.