FamilyGuy Posted May 13, 2006 Share Posted May 13, 2006 Ok i have an XML from <Column ID="1"> to <Column ID="9"> and I wish each column of my table to display thecorrect column ID how is this possible please Link to comment Share on other sites More sharing options...
boen_robot Posted May 13, 2006 Share Posted May 13, 2006 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 More sharing options...
FamilyGuy Posted May 13, 2006 Author Share Posted May 13, 2006 Yes but I have Column ID 1-9 so if I use @ID how will it know which one out of 1-9? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now