1\version "2.19.80"
2
3\header {
4  texidoc = "@code{\\defaultchild} can be overridden in a context definition.
5CREATED should appear in the left margin."
6}
7
8\layout {
9  \context {
10    \Score
11    \defaultchild "NoneSuch" % prove that the last wins
12    \defaultchild "AdHocStaff"
13  }
14
15  \context {
16    \Staff
17    \name "AdHocStaff"
18    \alias Staff
19    instrumentName = "CREATED"
20  }
21
22  \context {
23    \Staff
24    instrumentName = "UNUSED"
25  }
26}
27
28\score {
29  %% This builds a path of accepted contexts from Score to Voice.
30  %% Which context it chooses tells whether \defaultchild did its job.
31  \context Voice s1
32}
33