c:attribute

<c:attribute
  name = { qname }
  value? = expression
  namespace? = { uri }
  separator? = { string } >
  <!-- Content: sequence-constructor -->
</c:attribute>

Creates an attribute node.

Category
instruction
Permitted parent elements
c:attribute-set
Any XCST element whose content model is sequence-constructor
Any literal result element

Attributes

name The name of the attribute.
namespace The namespace of the attribute.
separator A string to intersperse between items.
value The value of the attribute.

In addition to the attributes in the preceding table, there are a number of standard attributes that may appear on any XCST element.

Example
<input type='checkbox'>
   <c:if test='isChecked'>
      <c:attribute name='checked'>checked</c:attribute>
   </c:if>
</input>

Error Conditions

It is a compilation error if the value attribute is present when the content of the element is non-empty.

It is a compilation error if the required item type of the containing sequence constructor is not one of, or a super class of, Object, XAttribute or XmlAttribute.

See Also