Skip to main content

 PSML

A complete reference of PageSeeder's markup language PSML

<link>

Summary

The <link> element is used to represent a link to an external resource or to an anchor.

For links within PageSeeder, the appropriate element is <xref>.

Usage context

Element categorycharacter-style
PSML levelportable
Permitted content<bold> <italic> <underline> <br> <sub> <sup> <anchor> <inline> <placeholder> <monospace> and text
Permitted parent
HTML equivalent<a> (but NOT <link> !)
OpenXML equivalent<w:hyperlink>

Attributes

This element includes the following attributes

NameTypeRequiredDescription
archivedbooleannoWhether the URL is archived
fragxs:stringnoThe fragment of the target
hrefxs:stringyesURL for link target
labelslabel-listnoA list of xref labels
mediatypexs:stringnoThe media type of the target URL
rolerolenoCustom value that can be used for formatting. DEPRECATED.
uriidxs:longnoThe URI ID of the target URL
urltypedocument-typenoThe target document’s type
unresolvedbooleannoIf true, the target URL doesn't exist in PageSeeder

@archived

A boolean flag indicating whether the URL is archived. INFORMATIONAL - ignored by upload.

This attribute was introduced in PSML v1.3 in PageSeeder 5.99.

@frag

The fragment for the target. On upload this overrides the value after # on the @href.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

@href

The URL to the external resource to link to.

@labels

A comma-separated list of Link labels.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

@mediatype

The media type of the target URL. INFORMATIONAL - ignored by upload.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

@role

Custom value that can be used for formatting.

This attribute was deprecated in PSML 1.3 in PageSeeder 5.99. Use @labels instead.

@uriid

The URI ID of the target URL. Ignored by upload if the PSML file came from a different PageSeeder server.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

@urltype

The target URL's type. INFORMATIONAL - ignored by upload.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

@unresolved

If true, the target URL doesn’t exist in PageSeeder. INFORMATIONAL - ignored by upload.

This attribute was introduced in PSML 1.3 in PageSeeder 5.99.

Examples

Link to site 

A link to a Website:

<link href="https://dev.pageseeder.com">PageSeeder for developers</link>

This is converted to the following HTML:

<a href="https://dev.pageseeder.com">PageSeeder for developers</a>

Link with role

Links with roles:

<link href="https://download.pageseeder.com/latest"
      role="download">Download PageSeeder</link>

The role could be used to convert to HTML as:

<a href="https://download.pageseeder.com/latest" 
   download class="button">Download PageSeeder</a>

Link to anchor

An internal link pointing to an <anchor> element or a <fragment> element:

<link href="#part-3">Skip to part 3<link>

Schema

XML Schema

<xs:element   name="link">
  <xs:complexType mixed="true">  
    <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="bold" />
        <xs:element ref="italic" />
        <xs:element ref="underline" />
        <xs:element ref="br" />
        <xs:element ref="sub" />
        <xs:element ref="sup" />
        <xs:element ref="anchor" />
        <xs:element ref="inline" />
        <xs:element ref="placeholder" />
        <xs:element ref="monospace" />
    </xs:choice>
    <xs:attribute name="archived"   type="xs:boolean"/>
    <xs:attribute name="href"       type="xs:string"
                  use="required"/>
    <xs:attribute name="role"       type="role"/>
    <xs:attribute name="uriid"      type="xs:long">
    <xs:attribute name="frag"       type="xs:string">
    <xs:attribute name="mediatype"  type="xs:string">
    <xs:attribute name="urltype"    type="document-type">
    <xs:attribute name="labels"     type="label-list">
    <xs:attribute name="unresolved" type="xs:boolean">
  </xs:complexType>
</xs:element>

Relax Schema

element link {
   attribute archived   { xs:boolean }?,
   attribute href       { text },
   attribute role       { role }?,
   attribute uriid      { xs:long }?,
   attribute frag       { text }?,
   attribute mediatype  { text }?,
   attribute urltype    { document-type }?,
   attribute labels     { label-list }?,
   attribute unresolved { xs:boolean }?,
   (bold | italic | underline | br | sub |
    sup | anchor | inline | placeholder | monospace)+
}

Compatibility

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

Created on , last edited on