Document ID

Key point: A unique, editable identifier for documents across the entire PageSeeder server.

The Document ID provides a straightforward way to locate or identify any document in PageSeeder, serving as an alternative to using folder paths and filenames. It works like a permanent name tag for your documents that remains consistent regardless of where the document is stored.

Key features

User-assigned

You can create meaningful IDs like "annual-report-2023" rather than working with automatically generated numbers.

Portable

The ID stays the same when documents are moved between folders or even between PageSeeder servers, unless they are manually changed.

Simple character set

Can contain letters, numbers, hyphens, and underscores.

Best practices

Document IDs must be unique across the entire server. Even if you can’t see a document in your current project or group, its document ID might already be in use elsewhere on the server.

To avoid conflicts, consider using a project-specific prefix for your document IDs, such as [project-prefix]-1234.

While PageSeeder lets you change or remove document IDs, it’s best to do this sparingly. The main purpose of a document ID is to provide a stable, consistent way to identify documents over time.

Developers

The document ID appears on the <uri> element as the docid attribute and is often referred to as the DocID, docid, (or doc id) in the developer documentation.

The following is an example of PSML markup for the document ID:

<document level="portable">
  <documentinfo>
    <uri docid="MDT-15" title="My Document"/>
  </documentinfo>
  ...
</document>

A document ID must match the following regular expression: ^[\w-]+$ (letters, numbers, hyphens, and underscores only).