.. include:: /_static/inc_styles.txt .. index:: usx; linking attributes, attributes; linking .. _usx-linking_index: Linking Attributes ================== |badge_3.0| USX 3.0 provides a set of attributes for assigning linking properties to :ref:` ` elements. .. _usx-linking_syntax: General Syntax ^^^^^^^^^^^^^^ Linking :doc:`attributes ` are added using the standard XML syntax. Names given to linking attributes begin with ``link-``, distinguishing them from any other descriptive attributes. Linking attributes are combined with any other :ref:`descriptive attributes ` added to the same element. The order of attributes is not significant, although it would benefit readability to have descriptive and linking attributes grouped together. .. note:: When a standard USX scripture reference is required, you must provide a string of pattern: ``[A-Z1-4]{3} ?[a-z0-9\-,:]*`` * Book names must be one of :ref:`bookCode ` * Chapter verse separator is always a colon ``:`` * Verse ranges are indicated using a hyphen Example: ``MAT 3:1-4`` Attributes |ico_Tag| ^^^^^^^^^^^^^^^^^^^^ .. _usx-charstyle-attr_link-href: .. index:: attribute; link-href :@link-href: Identifies the resource being linked to as a URI. |br| |br| Custom USFM provided URI prefixes are: |br| ``prj:`` + standard scripture reference. |br| Example: ``prj:RSV52 MAT 3:1-4`` A link reference within the same project text does not require a URI prefix. |br| |br| The resource may be identified by unique id. |br| Example: ``#article-Ruth`` or ``prj:GNTSB #article-Ruth`` .. _usx-charstyle-attr_link-title: .. index:: attribute; link-title :@link-title: Plain text describing the remote resource such as might be shown in a tooltip. .. _usx-charstyle-attr_link-id: .. index:: attribute; link-id :@link-id: A unique identifier for this content location (an anchor). The set of URI prefixes used within a ``link-href`` attribute can be extended beyond the predefined set for USX 3.0. Any user defined URI prefixes must begin with the prefix ``x-``. **Examples:** Link to other project text .. code-block:: xml :emphasize-lines: 2 The traditional translation of verse 1, as given in RSV, may be quite appropriate. Link to illustration / media .. code-block:: xml :emphasize-lines: 2-3 Storehouses, as used here, refers to large buildings with walls and roof, where grain was kept until needed. (See illustration: Storehouse) Assigning an identifier (anchor). *In this example the markup is a milestone, indicating a location but not marking text.* .. code-block:: xml :emphasize-lines: 5 “Someone is shouting in the desert, ‘Prepare a road for the Lord; make a straight path for him to travel!’ ” John the Baptist John is sometimes called the last “Old Testament prophet” because of the warnings he brought about God's judgment and because he announced the coming of God's “Chosen One” (Messiah). Glossary entry including a link reference to an external URL .. code-block:: xml gracious Reference to named target within the same project .. code-block:: xml :emphasize-lines: 4 From Abraham to King David, the following ancestors are listed: Abraham, Isaac, Jacob, Judah and his brothers; then Perez and Zerah (their mother was Tamar), Hezron, Ram, Amminadab, Nahshon, Salmon, Boaz (his mother was Rahab), Obed (his mother was Ruth), Jesse, and King David. Nested within :ref:`footnote text ` .. code-block:: xml :emphasize-lines: 3 1.2-6a: Ruth: A Moabite. Only outstanding women were normally included in Jewish genealogical lists. See article on Ruth ----- .. _usx-charstyle_jmp-linking: char @style jmp ^^^^^^^^^^^^^^^ |badge_3.0| :@style: jmp :Added: 3.0 :Use: A :doc:`@style type ` value for use with :ref:` `. Available for associating linking attributes to a span of text when no other :ref:` ` element is already applied to the text at this location. :Valid In: Any valid :ref:`usx-element_char` *Linking examples provided above*