The import and import statements only occurs at the root level of the stylesheet and used to combine the contents of another stylesheet into the currently declared sheet.
The include statement is similar to include statements in other languages, allowing the inclusion of other stylesheets without interfering with the action of the parent stylesheet.
The import statement is similar to the include statements except that it the templates (proc and match) in the importing stylesheet take precedence over template rules and definitions in the imported stylesheet.
uri | The URI of the include file. |
None.
Using an example in the W3C specification one stylesheet could import sheet doc.xsl and modify the treatment of example <elements> as follows:
would give the following XSLT
The only error here (until URI checking is added) is a missing URI reference.
would report