attributes instruction

This instruction dynamically sets a value to an attribute of the current tag. If the attribute does not exist, it will be created. If it exists, its value will be changed.

Syntax

<tag gwc:attributes="att expression [; ...] " ...>
  ...
</tag>
Note:
  1. att is the attribute name. It may be prefixed by a namespace alias that must be valid for the tag element.
  2. expression is the attribute value. Notice there is no equal sign (=) between the attribute name and the value being assigned to it.

Example

<form action="..." method="post" gwc:attributes="action document/URL ;
 method 'get'">

The action attribute is set to the document URL and the method attribute to get.