Here we match the XML Document (as with EG101) and use
apply-templates with different select expressions:
child::*)
<descendant::Object>)
@*)
descendant-or-self::*/@)
Because there are no “sub” templates to match any node sets selected by apply-templates,
the translator uses appropriate built-in default templates.
The effect of the default templates is to output the Element Text content.
Test4 and Test5 explicitly select for Attributes (“@*”), and the Attribute Text shows up in the output (again curtesy of built-in default templates).
Test4 is null in this example, because Test4 selects “@*”, which selects the Attributes of (just) the children. We matched the XML Document, which has no Element or Attributes, so the select returns null.