| template rule = pattern + template |
For a given input XML document, the output is obtained as follows:
- the source tree is processed by processing the root node
(implicitly, the root node of a document is a special document node which has the root element as its only child) - a single node is processed by:
- finding the template rule with the best matching pattern
- instantiating its template (creates result fragment + continues processing recursively)
- a node list is processed by processing each node in order and concatenating the results
This cartoon illustrates the processing model.
discuss this topic to forum
