Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: xsl make Having a problem to generate proper <a href ...> from my xml attributes.
Here's the sample of the xml :
<CatData>
<Cat CatId='1' CatName='Category1'>
<Tier1 Id='11' TierName="TierX">
<Tier2 Id='23' Name='Air1' Dir='air' Url='air.asp' Items='12' />
<Tier2 Id='24' Name='Air2' Dir='air' Url='air.asp' Items='13' />
<Tier2 Id='25' Name='Air3' Dir='air' Url='air.asp' Items='14' />
</Tier1>
<Tier1 Id='12' TierName="TierZ">
<Tier2 Id='33' Name='Water' Dir='water' Url='water.asp' Items='12'
/>
<Tier2 Id='34' Name='Water' Dir='water' Url='water.asp' Items='13'
/>
<Tier2 Id='35' Name='Water' Dir='water' Url='water.asp' Items='14'
/>
</Tier1>
</Cat>
</CatData>
This is what I'm trying to do with that:
<table width="100" border="0" cellpadding="1" cellspacing="1">
<xsl:for-each select="CatData/Cat/Tier1">
<tr>
<td width="100%" class="T8" bgcolor="red"><xsl:value-of
select="@TierName"/></td>
</tr>
<xsl:for-each select="Tier2">
<tr>
<td width="100%" class="T8" bgcolor="#ffffff">
<a href=../{@Dir}/{@Url}?id={@Id}><xsl:value-of
select="@Name"/></a>
</td>
</tr>
</xsl:for-each>
</xsl:for-each>
</table>
In result HTML I'm getting this <a href>, exactly like in the xsl code:
<a href=../{@Dir}/{@Url}?id={@Id}>Air1>/a>
Seems suppose to translate in to values, but not getting it.
What am I doing wrong?
Regards,
Michael
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
