Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
The mechanisms described in XSLT Fundamentalsare template-driven transformations, which means the output template drives the transformation process, pulling in data from the Extensible Markup Language (XML) tree and inserting it into the template. This works well when the data has a fairly simple and homogeneous structure. If you know what the output structure should be, use the template-driven model.
XSL Transformations (XSLT) also provide mechanisms for data-driven transformations, in which the output is assembled from template fragments based on the structure of the input document. This is especially useful for XML that represents complex data structures or documents, as described in Handling Documents and Irregular Data. If you only know what types of elements you will encounter in the XML source, but not their order, parentage, or relationship to other elements, use the data-driven model.
This section contains the following topics: