<join>

<join> identifica un segmento o fragmento de texto señalando eventuales elementos no contiguos que lo componen. 16.7 Aggregation
Módulolinking — 16 Linking, Segmentation, and Alignment
Atributos att.pointing (@type, @evaluate)
targetsespecifica los identificadores de los elementos o fragmentos de texto a enlazar en un elemento virtual.
Estado Necesario
Tipo de datos 2–∞ apariciones de

<rng:ref name="data.pointer"/>
data.pointer
separado por espacio en blanco
Valores two or more pointers (URIs), separated by whitespace
resultindica el nombre del elemento representado por el conjunto de identificadores en cuestión.
Estado Opcional
Tipo de datos

<rng:ref name="data.name"/>
data.name
Valores The generic identifier of an element in the current DTD.
scopeespecifica si las metas a enlazar incluyen el elemento entero indicado (el árbol entero con la raíz inclusive) o sólo los elementos que tienen como padre la misma meta (las ramas del árbol).
Estado Recomendado
Los valores admitidos son:
root
las subárboles arraigados indicados por los atributos targets [Por defecto]
branches
los hijos de los sub-árboles indicados por el atributo de los target se inician con los hijos del elemento virtual (es decir, las raíces de los sub-árboles se desechan)
Usado por
Puede contener
core: desc gloss
tagdocs: altIdent equiv
Declaración

<rng:element name="join">
<rng:ref name="att.global.attributes"/>
<rng:ref name="att.pointing.attributes"/>
<rng:attribute name="targets">
 <rng:list>
  <rng:ref name="data.pointer"/>
  <rng:oneOrMore>
   <rng:ref name="data.pointer"/>
  </rng:oneOrMore>
 </rng:list>
</rng:attribute>
<rng:optional>
 <rng:attribute name="result">
  <rng:ref name="data.name"/>
 </rng:attribute>
</rng:optional>
<rng:optional>
 <rng:attribute name="scopea:defaultValue="root">
  <rng:choice>
   <rng:value>root</rng:value>
   <rng:value>branches</rng:value>
  </rng:choice>
 </rng:attribute>
</rng:optional>
<rng:zeroOrMore>
 <rng:ref name="model.glossLike"/>
</rng:zeroOrMore>
</rng:element>
element join
{
   att.global.attributes,
   att.pointing.attributes,
   attribute targets { list { data.pointer, data.pointer+ } },
   attribute result { data.name }?,
   attribute scope { "root" | "branches" }?,
   model.glossLike*
}
Ejemplo

The following example is discussed in section 16.7 Aggregation:

<sp>
 <speaker>Hughie</speaker>
 <p>How does it go?
 <q>
   <l xml:id="frog_x1">da-da-da</l>
   <l xml:id="frog_l2">gets a new frog</l>
   <l>...</l>
  </q>
 </p>
</sp>
<sp>
 <speaker>Louie</speaker>
 <p>
  <q>
   <l xml:id="frog_l1">When the old pond</l>
   <l>...</l>
  </q>
 </p>
</sp>
<sp>
 <speaker>Dewey</speaker>
 <p>
  <q>...
  <l xml:id="frog_l3">It's a new pond.</l>
  </q>
 </p>
 <join targets="#frog_l1 #frog_l2 #frog_l3result="lgscope="root"/>
</sp>

The join element here identifies a linegroup (lg) comprising the three lines indicated by the targets attribute. The value root for the scope attribute indicates that the resulting virtual element contains the three l elements linked to at #frog_l1 #frog_l2 #frog_l3, rather than their character data content.

Ejemplo

In this example, the attribute scope is specified with the value of branches to indicate that the virtual list being constructed is to be made by taking the lists indicated by the targets attribute of the join element, discarding the list tags which enclose them, and combining the items contained within the lists into a single virtual list:

<p>Southern dialect (my own variety, at least) has only
<list xml:id="LP1">
  <item>
   <s>I done gone</s>
  </item>
  <item>
   <s>I done went</s>
  </item>
 </list> whereas Negro Non-Standard basilect has both these and
<list xml:id="LP2">
  <item>
   <s>I done go</s>
  </item>
 </list>.</p>
<p>White Southern dialect also has
<list xml:id="LP3">
  <item>
   <s>I've done gone</s>
  </item>
  <item>
   <s>I've done went</s>
  </item>
 </list> which, when they occur in Negro dialect, should probably
be considered as borrowings from other varieties of
English.</p>
<join
  result="list"
  xml:id="LST1"
  targets="#LP1 #LP2 #LP3"
  scope="branches">

 <desc>Sample sentences in Southern speech</desc>
</join>