The intermediary document : References (description)

1. Description

References are placed inside the intermediary document, after the links information, for edition purpose. A reference makes a connection between graphical elements and tags they represent from the XML document that has been transformed.

The tag used for a reference is simply reference. When writing a reference, you must provide the following attributes :

Attribute name Description Allowed values Default value Mandatory
source Specifies a tag of the XML source document (the transformed document). An XPointer with the form :
root()[.child([0-9]+)]*
- Yes
target Specifies the id of the target box contained by the intermediary document. An existing box's id. - Yes

2. Example

The best way to explain references is to have an example.

Start TAXI. Open the document editor/XML/XML/ex1.cd shipped with TAXI :

As XSL document, specify editor/XML/XML/CDtoGRP.xsl, and as Definitions document, editor/XML/XML/definitionsCD.def :

Click Ok to open the document :

Now move your mouse pointer over blue text Planet X. You can notice that TAXI recognizes Planet X as the title of a CD (you can move your mouse over other parts of the graphic and see what TAXI recognizes) :

If you look into the XML document editor/XML/XML/ex1.cd, you will effectively see that Planet X is the value of a tag title :

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE collection SYSTEM "cd.dtd">
    <collection>
      <cd>
        <title>Planet X</title>
        <author>Derek Sherinian</author>
        <song genre="instrumental">Part 1. "Apocalypse 1470 B.C."</song>
        <song genre="instrumental">Part 2. "Sea Of Antiquity"</song>
        <song genre="instrumental">Part 3. "Lost Island"</song>
        <song genre="instrumental">Crab Nebulae</song>
        <song genre="instrumental">Box</song>
        <song genre="instrumental">Money Shot</song>
        <song genre="instrumental">Day in The Sun</song>
        <song genre="instrumental">State Of Delirium</song>
        <song genre="instrumental">Space Martini</song>
        <song genre="instrumental">Brunei Babylon</song>
      </cd>
      <cd>
        <title>The Ultra Zone</title>
        <author>Steve Vai</author>
        <song genre="NA">The Blood & Tears</song>
        <song genre="NA">The Ultra Zone</song>
        <song genre="NA">Oooo</song>
        <song genre="NA">Frank</song>
        <song genre="NA">Jibboom</song>
        <song genre="NA">Voodoo Acid</song>
        <song genre="instrumental" remarks="Outstanding.">Windows To The Soul</song>
        <song genre="NA">The Silent Within</song>
        <song genre="NA">I'll Be Around</song>
        <song genre="NA">Lucky Charms</song>
        <song genre="NA">Fever Dream</song>
        <song genre="NA">Here I AM</song>
        <song genre="NA">Asian Sky</song>
        <song genre="NA">Selfless Love</song>
      </cd>
    </collection>
  

TAXI simply knows that Planet X is a title because it has been said. This piece of information is stored inside the intermediary document as a reference.

Open editor/XML/XML/ex1.cd.grp. At the very bottom, you will see the following lines of code :

    <reference source="root().child(1)" target="N2e7cb6"/>
    <reference source="root().child(1).child(2)" target="N7d9b97"/>
    <reference source="root().child(1).child(1)" target="N71e666"/>
    <reference source="root().child(1).child(3)" target="N4d40df"/>
    <reference source="root().child(1).child(4)" target="N5e041e"/>
    <reference source="root().child(1).child(5)" target="N605ad6"/>
    <reference source="root().child(1).child(6)" target="N6bb7d9"/>
    <reference source="root().child(1).child(7)" target="N7346dc"/>
    <reference source="root().child(1).child(8)" target="N314530"/>
    <reference source="root().child(1).child(9)" target="N35877f"/>
    <reference source="root().child(1).child(10)" target="N52b6f5"/>
    <reference source="root().child(1).child(11)" target="N69a50b"/>
    <reference source="root().child(1).child(12)" target="N5297c0"/>
    <reference source="root().child(2)" target="N68e5a7"/>
    <reference source="root().child(2).child(2)" target="N3d422d"/>
    <reference source="root().child(2).child(1)" target="N43d062"/>
    <reference source="root().child(2).child(3)" target="N25fb5a"/>
    <reference source="root().child(2).child(4)" target="N1906df"/>
    <reference source="root().child(2).child(5)" target="N123c5f"/>
    <reference source="root().child(2).child(6)" target="N39bf12"/>
    <reference source="root().child(2).child(7)" target="N2f4538"/>
    <reference source="root().child(2).child(8)" target="N69695f"/>
    <reference source="root().child(2).child(9)" target="N4de3c"/>
    <reference source="root().child(2).child(10)" target="N1a47df"/>
    <reference source="root().child(2).child(11)" target="N648938"/>
    <reference source="root().child(2).child(12)" target="N6cbecf"/>
    <reference source="root().child(2).child(13)" target="N6321e6"/>
    <reference source="root().child(2).child(14)" target="N4683c0"/>
    <reference source="root().child(2).child(15)" target="N73bc22"/>
    <reference source="root().child(2).child(16)" target="N449afc"/>
  

A reference is made of 2 attributes : source and target. Attribute source is an XPointer that points a tag of