PSML

A complete reference of PageSeeder's markup language PSML

<link>

Summary

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

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

Usage context

Element categorycharacter-style
PSML levelportable
Permitted contenttext and other character-style elements
Permitted parent
HTML equivalent<a> (but NOT <link> !!)
OpenXML equivalent<w:hyperlink>
PSStandard equivalent<link>

Attributes

This element includes the following attributes

NameTypeRequiredDescription
hrefxs:stringnoURL for link target.
rolerolenoCustom value that can be used for formatting.

@href

The URL to the external resource to link to.

@role

Custom value that can be used for formatting.

Examples

 

A simple link to a Website.

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

This will be converted to the HTML below:

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

 

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>

 

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:group 
  ref="character-style-group"/>
      <xs:element ref="image"/>
    </xs:choice>

    <xs:attribute name="href"
             type="xs:string" 
               use="required"/>
    <xs:attribute name="role" 
                  type="role"/>
 </xs:complexType>
</xs:element>

Relax Schema

element link {
   attribute href { text },
   attribute role { role }?,
   (character-style-group | image)+
}

Compatibility

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

See also

Created on , last edited on