Arboreal MWN

Documentation

Parallel Texts

Arboreal MWN v0.8 (05/08/2013)

In this documentation unless otherwise noted "Arboreal" refers to "Arboreal MWN."

What are parallel texts?

Arboreal lets you define a so-called master text for a text (called slave text). A mapping file specifies what XML node of the slave text maps onto what XML node of the master text. To create such a mapping file the XML nodes that should be mapped have to have an "id" attribute. There can be maximal one master text for a slave text.

Parallel texts

The parallel text editor (or Master/Slave View) shows you master and slave XML text next to each other. Opening an XML node in one of the XML trees opens the corresponding node in the other XML tree. If nodes don't have id attributes, Arboreal tries to guess the corresponding node. A link between two nodes of master and slave document is indicated by a yellow icon.

Linked nodes

Cloning documents

The easiest way to create a master/slave mapping is to clone an existing XML document. When cloning a document, Arboreal creates a new XML document with the same structure as the original XML document but without any content. Elements that have an "id" attribute in the original XML document will have as well an "id" attribute in the clone with a newly created id. Attributes of XML elements that refer to the id of another element will in the clone XML document refer to the corresponding element.

To create a clone of an XML document, open the document in the Arboreal editor. Then click the "Clone XML file" button in the toolbar of Arboreal.

Clone XML file

A wizard will open that asks you to enter a filename for the clone and to select all tags that should not be cloned. A checkbox list of common not-to-clone tags is provided. If there are other tags you don't want to be cloned enter them as comma-separated list (e.g. s, picture, i). Click "Finish". You can find the clone of your XML file in the same project as the original file.

Clone Wizard

Furthermore, Arboreal creates a new mapping file in the subfolder "mappings" of your project called <original_filename>_<clone_filename>.xml. This file contains the mappings between XML elements with "id" attribute.

Mapping files

Mapping files are XML files that map XML nodes of one XML document to XML nodes of another XML document. The "id" attributes of an XML element is used for that mapping. Mapping files use the Open Annotation format (http://www.openannotation.org/). Mapping files are located in the subfolder "mappings" of an Arboreal project. By convention, they have to be named <master_filename>_<slave_filename>.xml (filename with out file extension). A properties file called "mappings.prop" specifies what slave text has what master text.

Opening master/slave view

To show a slave and its master text as parallel texts, right-click on the slave text in the Project Explorer. Then select "Show Slave/Master View".

Editing master/slave mappings

You can edit the links between a master and a slave text by hand. To do so, right-click on the master text in the Project Explorer. Then select "Edit Master/Slave Links". A dialog will open that asks you for the slave text.

Select Slave Text

An editor will open that shows you the XML structure of the master text on the left side and the structure of the slave text on the right side.

Edit links editor

Existing links between two nodes are indicated by a yellow link icon. Nodes that have an id attribute (and could therefore potentially be linked to another node) but are not linked are indicated by a grey link icon.

Edit links editor

To create a link between two nodes, first select the nodes in the two XML tree viewers. Then click the "Link" button between the two XML tree viewers. The grey link icons should change from grey to yellow. To unlink to nodes, select both nodes and then click the "Unlink" button.

Link Buttons

Save the mapping with Cmd-S. If you've opened an already existing mapping between two texts, Arboreal will warn you that saving the mapping will override the existing mapping.

Free CSS Templates by RamblingSoul.com | Valid XHTML 1.0 | CSS 2.0