<anchor>
Summary
The <anchor> element is used to represent a named anchor point.
An anchor doesn’t necessarily have a representation, as it can be a location or a wrapper around existing markup.
This element is only used as a target – if you want to point to:
- a document – use the <xref> element.
- a URL – use the <link> element.
- an anchor in the current document – use
<link href="#[anchor name]" />.
Usage context
| Element category | character-style |
|---|---|
| PSML level | portable |
| Permitted content | text and other character-style elements |
| Permitted parent | |
| HTML equivalent | <a> |
| OpenXML equivalent | <w:bookmark> |
Attributes
This element includes the following attributes
| Name | Type | Required | Description |
|---|---|---|---|
| name | xs:NCName | yes | The name of the anchor |
@name
The name of the anchor. It must be unique within the document.
Examples
Basic anchor
<anchor name="part1"/>
Anchor around image
<anchor name="figure1"> <image ... /> </anchor>
Schema
XML Schema
<xs:element name="anchor">
<xs:complexType mixed="true">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:group ref="character-style-group"/>
<xs:element ref="image"/>
</xs:choice>
<xs:attribute name="name" type="xs:NCName" use="required"/>
</xs:complexType>
</xs:element>
Relax Schema
element anchor {
attribute name { xs:NCName },
(character-style-group | image)+
}
Compatibility
This element was introduced in PSML beta 7 and is only supported from PageSeeder 5.6.