---
title: "Document metadata"
source: https://dev.pageseeder.com/reference/glossary/document_metadata.html
description: "Document metadata are customizable properties attached to PageSeeder documents based on their type. Defined in PSML templates, they enable consistent information capture across similar documents, supporting various datatypes like text, dates, and cross-references."
last_updated: 2026-09-08T13:59:40+10:00
tokens: ~653
---

# Document metadata

A set of properties that can be attached to a document based on its document type or media type.

Since PageSeeder 5.9, any document can have a predefined set of properties.

## Metadata template

The list of properties that is defined in a PSML [document template](/reference/glossary/document_template.md), using the [\<metadata\>](/psml/elements/element_metadata.md) element. Although metadata are defined in PSML, they can be defined for any document in PageSeeder.

- **For PSML documents** – the metadata is defined in the template for the [document type](/guide/configuration/psml.md).
- **For other documents** – metadata are defined in a template that is used for all documents of the same [media type](/reference/glossary/media_type.md).

### Example

For example, metadata can be used to provide information about a photograph, such as copyright, location, date, orientation, etc... in a manner that is consistent across all documents of the same kind.

Following is a sample metadata template for a document to enter a title, publication date and an [xref](/reference/glossary/cross_reference.md) to an alternative document.

> **Note:** When a document is bound to a media type rather than a PSML document type, the document level is '`metadata`’ rather than ‘`portable`’ and when uploaded, it must be in the `META-INF` folder as described in  [Universal Portable Format](/psml/universal_format/universal_portable_format.md).

```xml
<document level="metadata">
  <documentinfo>...</documentinfo>
  <metadata>
    <properties>
      <property name="title"
                title="Title"
                value="{$ps.title}" />
      <property name="pubdate"
                title="Published" 
                value="{$ps.currentdate}"
                datatype="date" />
      <property name="alternate"
                title="Alternate"
                datatype="xref" />
    </properties>
  </metadata>  
</document>
```

> **Note:** - When uploading and overwriting an existing document, the metadata is only modified if the **Overwrite metadata and document properties** checkbox is selected under wrench **Upload options**. - Metadata for a non-PSML file can only be modified when the file itself is uploaded along with the corresponding PSML metadata document.

> **Note:** - Metadata properties that aren’t defined in the document template can still be uploaded and edited, but only text and date properties can be added through the UI. - New metadata properties can be added to the document template at any time and are added to a document when its properties are edited. 

