---
title: "Element <placeholder>"
source: https://dev.pageseeder.com/psml/elements/element-placeholder.html
description: "PSML Element reference for <placeholder>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~788
---

# \<placeholder\>

## Summary

A `<placeholder>` element is an alternative to “search and replace”, for managing variable text in a [publication](../../reference/glossary/publications.md) or document. A valid placeholder is composed of a [metadata property](element-property.md) at the document or publication level, and the element, inline in the content. 

Resolving the `<placeholder>` element replaces the “*placeholder text*” with the value of the metadata property on the publication root document. This allows a user to update many references with a single edit. 

If the document isn’t in a publication, PageSeeder resolves the placeholders from the document’s metadata properties.

Placeholders are only supported in v6 and only for single value properties with a datatype of `string`, `date` or `datetime`.

## Usage context

| Element category | character-style |
| --- | --- |
| PSML level | portable |
| Permitted content | text |
| Permitted parent |  |
| HTML equivalent | `<var>` |
| OpenXML equivalent |  |

## Attributes

This element includes the following attributes:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| name | [label](../datatypes/pageseeder_datatypes.md) | yes | Must match the name of the metadata property that contains the placeholder content. |
| unresolved | [boolean](../datatypes/pageseeder_datatypes.md) | no | Present when the placeholder cannot resolve to a property (fixed value `true`). Only allowed when the `@level` attribute on the `<document>` element has a value of `processed`. |

### `@name`

The name of the metadata property containing the resolved content.

### `@unresolved="true"`

Present when the placeholder cannot be resolved to a property. It is added when the document is processed and only allowed for `level="processed"`.

## Examples

A paragraph with a `<placeholder>` to markup the author.

```lang-xml
<para>This book was written by <placeholder name="author">some
writer</placeholder>.</para>
```

After resolving the `<placeholder>` with an appropriate property, it would appear as:

```lang-xml
<para>This book was written by <placeholder name="author">Lewis Carroll</placeholder>.</para>
```

If the `<placeholder>` element could not resolve, because there was no metadata property with the name `author`, it would appear as:

```lang-xml
<para>This book was written by <placeholder name="author"
unresolved="true">some writer</placeholder>.</para>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="placeholder">
  <xs:complexType>
    <xs:simpleContent>
      <xs:extension  base="xs:string">
        <xs:attribute name="name" type="label" use="required" />                 
        <xs:attribute name="unresolved"
                      type="xs:boolean"
                      fixed="true" />                 
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
</xs:element>
```

### Relax Schema

```lang-relax

element placeholder{
   attribute name { label },
   attribute resolved { boolean }?,
   text
}
```

## Compatibility

This element was introduced in PSML v1.1 and is supported in the v6 UI from PageSeeder 5.9712.

