Template markup

Before discussing the various ways in which attribute templates can be of benefit, it is necessary to establish how they are recognized and identify some repercussions of their possible presence.

Curly brackets

When an output element includes an attribute, the attribute is coded according to XML rules. It has a name, and a value enclosed in quotes. The value may be any text string allowed in attributes of the given type, assuming the use of a DTD to validate the output, or (when a DTD is not relevant) it can be any text string at all. The issue here is how to indicate to the XSLT processor that there is an expression embedded within the value:

TheAttribute="value ... expression ... value"

The expression is delimited using curly ...

Get XSL companion, The 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.