Jump to content

Displaying using Attributes


Recommended Posts

Isn't that THE most frequently asked question...Two general ways- xsl:variable and xsl:attribute:with xsl:variable

<xsl:variable name="ID" select="@ID" /><td id="{$ID}"><xsl:value-of select="Column"></td>

with xsl:attribute

<td><xsl:attribute name="id"><xsl:value-of select="@ID"></xsl:attribute><xsl:value-of select="Column"></td>

If you mean that you want to use this ID multiple times, then I suggest you don't. IDs in XHTML should be used only once per page, not several times (scince there isn't a way to define a column in XHTML, having each cell belonging in the column with a particular identifier is the only label-like method).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...