Introduction
When describing metadata for digital images in TEI (Text Encoding Initiative), the facsimile element is used. Particularly in IIIF (International Image Interoperability Framework) compatible digital archives, it is important to properly describe references to manifests, canvases, and the Image API.
This article introduces how to define the constraints needed for facsimile descriptions as a schema using ODD (One Document Does it all).
Guidelines Followed
This ODD is based on the “Linking with IIIF Images” specification introduced in the Japanese TEI guidelines:
By creating data that conforms to this guideline, image display becomes possible in TEI Viewer for EAJ. The TEI Viewer can display TEI text and IIIF images in coordination, using information from facsimile elements to map text and images.
Design Goals
A schema was designed to meet the following requirements:
- Clarification of required information: Defining minimum necessary information such as image coordinates and identifiers as required attributes
- IIIF compatibility: Optionally describing references to manifests, canvases, and Image API
- Reusability: Sharable across multiple projects as an independent ODD file
- Viewer compatibility: Reliably recording information necessary for display in TEI Viewer for EAJ
Minimal Description Example
Complete Description Example (Including IIIF References)
ODD Definition Explanation
1. facsimile Element
Key points:
- Requires at least one
surfaceelement (minOccurs="1") - Sets
sameAsattribute for IIIF manifest reference as optional
2. surface Element
Key points:
- Makes
xml:idand coordinate attributes (ulx,uly,lrx,lry) required (usage="req") - Requires at least one
graphicelement - Sets
sameAsattribute for IIIF canvas reference as optional
3. graphic Element
Key points:
- Makes
sameAsattribute required: always records the canonical URL of the image file urlattribute is optional: allows describing IIIF Image API URL with parameters (e.g.,/full/full/0/default.jpg)
Design Philosophy of Attributes
Role of sameAs Attribute
The sameAs attribute is used to record the canonical identifier of a resource:
| Element | Content of sameAs Attribute |
|---|---|
facsimile | IIIF manifest URL |
surface | IIIF canvas URL |
graphic | Base URL of image file (e.g., .tif) |
Distinguishing from url Attribute
In graphic elements, sameAs and url can be used together:
- sameAs: Canonical URL of the image (e.g.,
https://example.org/image/001.tif) - url: Full URL of the IIIF Image API (e.g.,
https://example.org/image/001.tif/full/full/0/default.jpg)
This allows separate management of image identification and actual access URLs.
Example Validation Results
When validation is performed with this schema, incomplete descriptions are detected with errors like the following:
Usage with TEI Viewer for EAJ
TEI data conforming to this ODD can be displayed with images in TEI Viewer for EAJ. The viewer provides the following features:
- Coordinated display of TEI text and IIIF images
- Image switching via the
facsattribute ofpbelements - Identifying image regions using coordinate information from
surfaceelements
By defining required attributes in the schema, it is guaranteed that information necessary for display in the viewer is reliably recorded.
Summary
Using TEI ODD, the following constraints were achieved for IIIF-compatible facsimile descriptions:
- Guaranteed required information: Prevents omission of coordinate information and image references
- Flexible extensibility: IIIF-related information is optional, allowing gradual adoption
- Reusability: Shareable across multiple projects as an independent ODD module
- Viewer compatibility: Guarantees display in TEI Viewer for EAJ
Schema design using ODD is an effective approach for quality management and standardization of XML data. By conforming to the Japanese TEI guidelines, interoperability with tools within the ecosystem is also ensured.