11. But how?

How did that script run a stylesheet?

By default, stylesheet execution is done by calling the template named xsl:initial-template.

(You are probably used to starting transformations by running matching templates over a source tree. For reasons that we’ll come back to, that’s more complicated in the browser.)

There are other ways to start a transformation, but we’ll leave those in the references for you.

For simplicity, in all of our exercises, processing begins with the named template.