Concurrent hierarchies

The text repository contains an unordered set of text segments. A selection incorporates segments from the text repository by reference and imposes an order on them.

A view represents a single structural hierarchy. Each view is attached to a selection by being contained within the same j:concurrent element.

=Defining a selection=

The j:selection element defines a selection, which is simply a collection of references into the text repository. The references are made using tei:ptr elements, whose @target attributes reference the segments. If an external resource has to be included in a specific place, it must be referenced using a tei:ptr whose @target attribute references the external resource. Each pointer in the selection list must have its own identifier.

Example
The example is the selection from the Dayyenu example cited above:

=Defining a view=

A view represents a single hierarchy that is defined over a selection. Structural hierarchies include paragraphs, sentences, verse line groups, verse lines, lists and items, choices with options, and translation linkages.

Each view is represented by a j:view element inside the same j:concurrent containing its own j:selection. The @type attribute on the j:view element specifies what type of hierarchy is represented inside. Valid values include:
 * p (paragraph, possibly with sentences)
 * s (sentences)
 * lg (line group with lines)
 * list (lists with items)
 * choice (choices with options)

Each element inside the view references pointers in the j:selection. If these references refer to sequential targets in the selection, the TEI-defined XPointer range scheme may be used.

Only the parts of the selection that can be represented by the view must have pointers.

When the selection includes pointers to external resources, it is important to ensure that the external resource's hierarchy makes sense in whatever place it is given in the view. If the external resource cannot be represented in the view, its pointer should be omitted from the view.

Example
In the Dayyenu example, there are three hierarchies: a paragraph-sentence hierarchy, a line group-line hierarchy (the song), and a list-item hierarchy (the paragraph "על אחת כמה וכמה"). The prose (paragraph-sentence) hierarchy overlaps the remaining two.

In the example below, the sentence hierarchy is represented as a separate view from the paragraph hierarchy. The paragraph hierarchy references the sentence view.