XSLT <xsl:attribute> Element
Complete XSLT Element Reference
Definition and Usage
The <xsl:attribute> element is used to add attributes to elements.
Note: The <xsl:attribute> element replaces existing
attributes with equivalent names.
Syntax
<xsl:attribute name="attributename" namespace="uri">
<!-- Content:template -->
</xsl:attribute>
|
Attributes
| Attribute |
Value |
Description |
| name |
attributename |
Required. Specifies the name of the attribute |
| namespace |
URI |
Optional. Defines the namespace URI for the attribute |
Example 1
Add a source attribute to the picture element:
<picture>
<xsl:attribute name="source"/>
</picture>
|
Example 2
Add a source attribute to the picture element and fill it with values from
"images/name" :
<picture>
<xsl:attribute name="source">
<xsl:value-of select="images/name" />
</xsl:attribute>
</picture>
|
Example 3
Create an attribute-set that can be applied to any output element:
<xsl:attribute-set name="font">
<xsl:attribute name="fname">Arial</xsl:attribute>
<xsl:attribute name="size">14px</xsl:attribute>
<xsl:attribute name="color">red</xsl:attribute>
</xsl:attribute-set>
|
Complete XSLT Element Reference
 |
 |
 |
 |
|
The Ektron Intranet
lets you do everything you need to do on your corporate intranet and everything you want to do... all with just one application.
What can you do with the Ektron Intranet? |
 |
Navigate through content, documents, assets, colleagues and workgroups quickly and intuitively with enterprise search |
 |
Communicate with friends and colleagues with forums, message boards and corporate blogging using the new Social Networking Platform |

|
Utilize the extensive out-of-the box features or customize your site through Ektron CMS400.NET's open architecture |
 |
Promote collaboration in your organization through project workspaces where others can efficiently find information and work together |
 |
Author/edit content, manage navigation, menus, audit trails, workflow and approvals with the best in breed Content Management |
|
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
|
|
 |
TAKE THE VIDEO TOUR |
 |
or download a FREE TRIAL today. |
|