# XSL and Attributes

**URL:** <https://forum.kirupa.com/t/xsl-and-attributes/156298>\
**Category:** web dev\
**Created:** [July 24, 2005, 10:05pm UTC](https://forum.kirupa.com/t/xsl-and-attributes/156298 "2005-07-24T22:05:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![krilnon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/krilnon/32/34_2.png) [@krilnon](https://forum.kirupa.com/u/krilnon)\
**Post date:** [July 24, 2005, 10:05pm UTC](https://forum.kirupa.com/t/xsl-and-attributes/156298/1 "2005-07-24T22:05:23Z")

</div>

[SIZE=1]Is there a way to use XSL to format a tag’s attribute?

For example, if you had

```auto
<tag attribute="value" />

```

could you take that and use something like

```auto
<xsl:value-of select="attribute"/>

```

?

[SIZE=2]Edit: The answer is: Yes. Use:

```auto
<xsl:attribute name="elementAttributeName">someValue</xsl:attribute>

```

[/SIZE]  
[/SIZE]
