untitled

(ff) #1

262 11 The XML Transformation Language


<Array>
<Protein id="Mas375">
<interaction substrate="Sub89032">
<BindingStrength>5.67</BindingStrength>
<Concentration unit="nm">43</Concentration>
</interaction>
<interaction substrate="Sub89033">
<BindingStrength>4.37</BindingStrength>
<Concentration unit="nm">75</Concentration>
</interaction>
</Protein>
<Protein id="Mtr245">
<interaction substrate="Sub89032">
<BindingStrength>0.65</BindingStrength>
<Concentration unit="um">0.53</Concentration>
</interaction>
<interaction substrate="Sub80933">
<BindingStrength>8.87</BindingStrength>
<Concentration unit="nm">8.4</Concentration>
</interaction>
</Protein>
<Substrate id="Sub89032"/>
<Substrate id="Sub89033"/>
</Array>

Figure 11.1 Example of a document specifying some values obtained by a microar-
ray experiment.

Each template acts like an enzyme that acts upon one or more kinds of
elements in the XML document. The kinds of elements that the template
can “attack” is specified by thematchattribute. Most commonly, thematch
condition is either the tag of the elements that the template can attack or a
“wild card” that allows the template to attack any element. If there are both
specific and generic templates, then the specific ones take precedence.
Since elements and attributes can have the same names, XSLT distinguishes
them by prefixing attribute names with an @ sign. Thuschromosomeis the
name of an element, but@startis the name of an attribute. The wild card
notation for elements isnode(), and the wild card notation for attributes is
@*. The templates in transform 11.1 use both of the wild card notations.
Enzymes can only attack locations on a protein chain that are “exposed.”
In the same way, templates only attack the highest-level elements that can
be matched. Lower-level elements become exposed only when the contain-
Free download pdf