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

# \<locator\>

## Summary

Metadata of a [fragment](../../reference/glossary/fragment.md) referenced by its locator.

### Matching fragments

To match a locator to its fragment, use the `@fragment` attribute so that it is equal to the [fragment ID](../../reference/glossary/fragment_id.md) being processed.

When processing a fragment, you can find the locator using the following XPath:

```lang-xml
//locator[@fragment = $fragment/@id]
```

There is at most 1 match.

## Usage context

| Element category | metadata |
| --- | --- |
| PSML level | metadata |
| Permitted content | `<notes> <reversexrefs> <compare> [<labels> DEPRECATED]` |
| Permitted parent | `<fragmentinfo>` |
| HTML equivalent |  no equivalent |
| OpenXML equivalent |  no equivalent |

> **Note:** The `<labels>` element is DEPRECATED here. Use the `@labels` attribute on the fragment instead.

## Attributes

This element includes the following attributes

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| editid | [xs:long](../datatypes/xml_schema_datatypes.md) | no | The XLink ID for the latest edit |
| fragment | [fragment-id](../datatypes/pageseeder_datatypes.md) | no | The fragment ID |
| id | [xs:long](../datatypes/xml_schema_datatypes.md) | no | The Locator ID |
| modified | [xs:dateTime](../datatypes/xml_schema_datatypes.md) | no | The last edit date |

This element contains [informational](../universal_format/psml_upload.md) attributes. 

### `@editid`

The ID of the latest edit. An XLink ID is unique within a PageSeeder instance. *INFORMATIONAL - ignored by upload.*

> **Note:** This attribute value is specific to a PageSeeder server as it refers to the XLink representing the last edit.

### `@fragment`

The ID of the fragment. It is unique within the document.

Use this attribute to identify the fragment content associated to this locator. 

### `@id`

The ID of this locator in PageSeeder. *INFORMATIONAL - ignored by upload.*

> **Note:** This value is specific to a PageSeeder instance.

### `@modified`

The date this fragment was last modified. It corresponds to the date of the last modified XLink. *INFORMATIONAL - ignored by upload.*

## Examples

A locator with system specific identifiers and last modified date of a fragment:

```lang-xml

<locator id="113"
         editid="548"
         fragment="4" 
         modified="2015-05-21T12:35:21+10:00"/>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="locator">
  <xs:complexType>

    <xs:all>
      <xs:element ref="labels" minOccurs="0"/>
      <xs:element ref="notes" minOccurs="0"/>
      <xs:element ref="reversexrefs" minOccurs="0"/>
      <xs:element ref="compare" minOccurs="0"/>
    </xs:all>

    <xs:attribute name="id" type="xs:long"/>
    <xs:attribute name="fragment" type="xs:string"/>
    <xs:attribute name="modified"
                  type="xs:dateTime"
                  use="optional"/>
    <xs:attribute name="editid" type="xs:long" use="optional"/>
  </xs:complexType>
</xs:element>
```

### Relax Schema

```lang-relax

element locator {
   attribute id { xs:long },
   attribute fragment { text },
   attribute modified { xs:dateTime },
   attribute editid { xs:long }?,
   element labels?,
   element notes?,
   element reversexrefs?,
   element compare?
}
```

## Compatibility

This element was introduced in the first draft of PSML and is well-supported from PageSeeder 5.1.

