The <xsl:attribute-set> Element: Generating Attribute Sets

Sometimes when you create a new element, you want to add a number of attributes to that element all at once. There’s an easy way to do that, because you can use the <xsl:attribute-set> element. This element has two attributes:

  • name(mandatory). The name of the attribute set. Set to a QName.

  • use-attribute-sets(optional). The names of other attribute sets you want included in this one. Set to a whitespace-separated list of QNames.

The <xsl:attribute-set> element encloses <xsl:attribute> elements, one for each new attribute you want to create. When you use <xsl:attribute-set>to create a new set of attributes for an element, you give the attribute set a name. You can then assign that name ...

Get Inside XSLT 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.