Skip to content

Schema and Collection Management

This guide explains how to add new XSD schemas and create collections via the Koala web UI.

Prerequisites

  • You need an account with admin permission in the Koala web UI.
  • Have your XSD schema file(s) ready. Each schema must have a targetNamespace attribute on its root element. Schemas without one are silently ignored during validation.

Adding a New Schema

Completely new schema (new URI)

  1. Navigate to Administration → Schemas.
  2. Click the Create dropdown and select Create.
  3. Fill in the form:
Field Description
Name A short display name for the schema (e.g. mets.xsd). Shown in the collection views.
URI The unique namespace URI of the schema (e.g. http://www.loc.gov/METS/). Used to detect existing schemas and trigger version bumps.
Description Optional free-text description.
File The XSD file to upload.
  1. Click Upload and Save.

The system assigns an external_id automatically (based on the last known XSD ID in the database) and sets version to 1.

Version bump of an existing schema (same URI)

If you upload a file with a URI that already exists in the database:

  1. Navigate to Administration → Schemas.
  2. Click the Create dropdown and select Create.
  3. Fill in the form with the same URI as the existing schema.
  4. Upload the updated XSD file.
  5. Click Upload and Save.

The system detects the existing URI, increments the version number (e.g. 1 → 2), preserves the external_id, and stores the new version as a separate row in the Schema table.

Note: Versioning is purely additive — older versions remain in the database. Collections explicitly reference schema IDs, so changing a schema's content does not affect existing collections. Only collections that include the new version will use it.

Understanding Sort Order in Collections

A collection defines the order in which schemas are processed during metadata validation.

Creating a New Collection

Copying from the active collection

The easiest way to create a new collection is to copy the current active collection and modify it.

  1. Navigate to Administration → Collections.
  2. The active collection is the one with the highest ID (marked with an "active" badge). Click New next to it.
  3. You'll see a page showing all schemas with checkboxes pre-selected according to the active collection's composition.
  4. Adjust the schema selection:
  5. Check/uncheck schemas to add or remove them from the new collection.
  6. Drag rows to reorder schemas. The drag-and-drop interface updates the hidden sort fields automatically.
  7. Enter a Name for the new collection.
  8. Click Create new collection.

The new collection is now the active collection (highest ID).

Viewing a collection's contents

Click on a collection name from the collections list to see which schemas it contains and their sort order.

Deleting a collection

A collection can only be deleted if no assets reference it. The delete button is only shown for collections that have zero associated assets. If assets exist, you'll see an error message when attempting to delete.

How Collections Are Used

During SIP ingest, the loader:

  1. Fetches the active collection (highest ID) from the database.
  2. Downloads all schemas in that collection to the loader's workarea.
  3. Builds a wrapper.xsd that imports each schema in sort order, using each schema's targetNamespace and name.
  4. Validates the SIP's mets.xml against the combined schema via the wrapper.

The active collection is determined solely by the highest id value — there is no explicit "activate" step. Creating a new collection automatically makes it the active one.