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
adminpermission in the Koala web UI. - Have your XSD schema file(s) ready. Each schema must have a
targetNamespaceattribute on its root element. Schemas without one are silently ignored during validation.
Adding a New Schema¶
Completely new schema (new URI)¶
- Navigate to Administration → Schemas.
- Click the Create dropdown and select Create.
- 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. |
- 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:
- Navigate to Administration → Schemas.
- Click the Create dropdown and select Create.
- Fill in the form with the same URI as the existing schema.
- Upload the updated XSD file.
- 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.
- Navigate to Administration → Collections.
- The active collection is the one with the highest ID (marked with an "active" badge). Click New next to it.
- You'll see a page showing all schemas with checkboxes pre-selected according to the active collection's composition.
- Adjust the schema selection:
- Check/uncheck schemas to add or remove them from the new collection.
- Drag rows to reorder schemas. The drag-and-drop interface updates the hidden sort fields automatically.
- Enter a Name for the new collection.
- 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:
- Fetches the active collection (highest ID) from the database.
- Downloads all schemas in that collection to the loader's workarea.
- Builds a
wrapper.xsdthat imports each schema in sort order, using each schema'stargetNamespaceandname. - Validates the SIP's
mets.xmlagainst 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.