Imports and inclusions

Multiple stylesheets may share some definitions. To avoid unnecessary repetition, common sets of rules may be placed in a separate stylesheet, and referenced from others:

Import

Sets of rules can be imported using the Import element. They must all occur before the style rules. This element may be used repeatedly, to import a number of other resources, and has an Href attribute that identifies a file to import by its URL:

<stylesheet ...>
  <import href="tables.xsl" />
  <import href="colours.xsl" />
  <template ...>...</template>

Imported rules are not considered to be as important as other rules, which can affect selection ...

Get XML Companion, The, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.