Tuesday 18 August 2015

XSLT: Rule Execution Order

Cited from XSLT Tutorial - Basics

"""
You have to understand that XSLT works down "depth-first" the XML tree, i.e.
  • it first deals with the rule for the root element,
  • then with the first instruction within this rule.
  • If the first instruction says "find other rules" it will then apply the first rule found for the first child element and so forth...
  • The rule of the root element is also the last one be finished (since it must deal step-by-step with everything that is found inside) !!!
"""

"By default the first one is applied. Since the XSLT processor only will apply one rule per element and also the most complex one."

No comments:

Post a Comment