---
title: "Element <locator>"
source: https://dev.pageseeder.com/api/elements/element_locator.html
description: "API Element reference for <locator>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~289
---

# \<locator\>

## Summary

The `<locator>` element is used to display metadata information on a PSML fragment.

> **Note:** This is a lightweight element, which is not to be confused with the full [Element \<locator\>](../../psml/elements/element-locator.md) used in PSML.

 

## Usage context

| Permitted content |  |
| --- | --- |
| Permitted parent | `<discussion>`, `<draft>` |

## Attributes

This element includes the following attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| fragment | `xs:string` | yes | The fragment ID in the PSML document |

## Examples

```lang-xml

<locator fragment="4" />
```

## Schema

### XML Schema

```lang-relax

<xs:element name="locator" type="locator"/>

<xs:complexType name="locator">
  <xs:attribute name="fragment" type="fragment-id" use="required"/>
</xs:complexType>

<xs:simpleType name="fragment-id">
  <xs:restriction base="xs:string">
    <xs:pattern value="[a-zA-Z0-9_\-\.]+"/>
  </xs:restriction>
</xs:simpleType>
```

### Relax Schema

```lang-relax

element locator {
  attribute fragment { xs:string }
}
```

## Compatibility

No change since initial API release.

