17.16.22 hyperlink

This element specifies the presence of a hyperlink at the current location in the document.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

<w:hyperlink r:id="rId10">
  <w:r>
    <w:t>Click here</w:t>
  </w:r>
</w:hyperlink>

The hyperlink element defines a hyperlink whose display text is Click here, and whose target is specified by the relationship with an Id attribute value of rId10. end example]

Attributes

docLocation (Location in Target Document)

Specifies a location in the target of the hyperlink that has no bookmarks. The method by which the contents of this attribute are linked to document text is outside the scope of ISO/IEC 29500.

If this attribute is omitted, then no location shall be associated with the parent hyperlink. If the anchor attribute is also specified, then this attribute can be ignored when the hyperlink is invoked.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

    <w:hyperlink r:id="rId9" w:docLocation="table">
      <w:r>
          <w:t>Click Here</w:t>
      </w:r>
    </w:hyperlink>

The docLocation attribute specifies that the target of the current hyperlink must be a region targeted by the string table within the target document. end example]

The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).

anchor (Hyperlink Anchor)

Specifies the name of a bookmark in the current document which shall be the target of this hyperlink.

If this attribute is omitted, then the default behavior shall be to navigate to the start of the document. If a hyperlink target is also specified using the r:id attribute, then this attribute shall be ignored. If no bookmark exists in the current document with the given bookmark name, then the default behavior shall be to navigate to the start of the document.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

    <w:hyperlink w:anchor="chapter3">
      <w:r>
          <w:t>Go to Chapter Three</w:t>
      </w:r>
    </w:hyperlink>

The anchor attribute specifies that the target of the current hyperlink must be the text contained within the bookmark chapter3 within the document. end example]

The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).

Namespace: http://purl.oclc.or g/ooxml/officeDoc ument/relationshi ps

Specifies whether the target of the parent hyperlink (as specified via the r:id attribute) shall be added to a list of viewed hyperlinks when it is invoked.

If this attribute is omitted, then there shall be no external hyperlink target for the current hyperlink - a location in the current document can still be target via the anchor attribute. If this attribute exists, it shall supersede the value in the anchor attribute.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

    <w:hyperlink r:id="rId9">
      <w:r>
          <w:t>http://www.example.com</w:t>
      </w:r>
    </w:hyperlink>

The id attribute value of rId9 specifies that relationship in the associated relationship part item with a corresponding Id attribute value must be navigated to when this

hyperlink is invoked. For example, if the following XML is present in the associated relationship part item:

    <Relationships xmlns="…">
      <Relationship Id="rId9" Mode="External"
    Target=http://www.example.com />
    </Relationships>

The target of this hyperlink would therefore be the target of relationship rId9 - in this case, http://www.example.com. end example]

The possible values for this attribute are defined by the ST_RelationshipId simple type (22.8.2.1).

id (Hyperlink Target)

Specifies the ID of the relationship whose target shall be used as the target for this hyperlink.

history (Add To Viewed Hyperlinks)

If this attribute is omitted, then its value shall be assumed to be false.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

    <w:hyperlink r:id="rId9" w:history="true">
      <w:r>
          <w:t>http://www.example.com</w:t>
      </w:r>
    </w:hyperlink>

The history attribute value of true specifies that the target of the current hyperlink must be added to a list of visited hyperlinks when invoked within the document. end example]

The possible values for this attribute are defined by the ST_OnOff simple type (22.9.2.7).

tgtFrame (Hyperlink Target Frame)

Specifies a frame within the parent HTML frameset for the target of the parent hyperlink when one exists. All values specified by this element shall be handled as follows:

Value

Description

Open hyperlink target in the full region of the current window.

Open hyperlink target in the same frame as the hyperlink appears.

Open hyperlink target in the parent of the current frame, or the current frame if this frame has no parent.

Open hyperlink target in a new web browser window.

all other values

Open hyperlink target in the frame with the specified name. If no frame exists with this name, open in the current frame.

If this string does not begin with an alphabetic character, it shall be ignored.

If this attribute is omitted, then no target frame information shall be associated with the parent hyperlink. If the current document is not part of a frameset, then this information can be ignored.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

Attributes

tooltip (Associated String)

    <w:hyperlink r:id="rId9" w:tgtFrame="_top">
      <w:r>
          <w:t>http://example.com</w:t>
      </w:r>
    </w:hyperlink>

The tgtFrame attribute value of _top specifies that the target of this hyperlink must be displayed in the full extents of the current window. end example]

The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).

Specifies a string which can be surfaced in a user interface as associated with the parent hyperlink. The method by which this string is surfaced by an application is outside the scope of ISO/IEC 29500.

If this attribute is omitted, then no associated string shall be linked to the parent hyperlink in the document.

[Example: Consider the following WordprocessingML fragment for a hyperlink:

    <w:hyperlink r:id="rId9" w:tooltip="Click here!">
      <w:r>
          <w:t>http://example.com</w:t>
      </w:r>
    </w:hyperlink>

The tooltip attribute value specifies that the parent hyperlink has the associated string of

The possible values for this attribute are defined by the ST_String simple type (22.9.2.13).

[Note: The W3C XML Schema definition of this element’s content model (CT_Hyperlink) is located in A.1. end note]

Last updated on