Hi,
I have a basic XML document that contains data to use for an HTML link and the text to apply to the link. The data for the link currently can be in two languages.
This is my basic doc:
<PrimaryNav>
<NavElement>
<URLLink>press/</URLLink>
<URLText Language="En">Press Centre</URLText>
<URLText Language="Cy">Adran Canolfan Y Wasg</URLText>
</NavElement>
.
.
.
<PrimaryNav>
I need to be able to output the links in two cols down the page. I have got it so that the links are being created but i am getting duplicates, I can't figure out how to list the links in 2 cols.
this is what i want:
<tr>
<td>Link One</td>
<td>Link Two</td>
</tr>
<tr>
<td>Link Three</td>
<td>Link Four</td>
</tr>
.
.
.
This is the XSLT I have at the moment:
<xsl:template match="/">
<xsl:for-each select="//NavElement">
<tr>
<td><a xsl:use-attribute-sets="PrimaryLink"><xsl:value-of select="URLText[@Language='En']"/></a></td>
<td>This is the bit that's going wrong</td>
</tr>
</xsl:for-each>
Any ideas on a better way of structuring the XML document and to make the XSLT work would be appreciated.
TIA
Tony
I have a basic XML document that contains data to use for an HTML link and the text to apply to the link. The data for the link currently can be in two languages.
This is my basic doc:
<PrimaryNav>
<NavElement>
<URLLink>press/</URLLink>
<URLText Language="En">Press Centre</URLText>
<URLText Language="Cy">Adran Canolfan Y Wasg</URLText>
</NavElement>
.
.
.
<PrimaryNav>
I need to be able to output the links in two cols down the page. I have got it so that the links are being created but i am getting duplicates, I can't figure out how to list the links in 2 cols.
this is what i want:
<tr>
<td>Link One</td>
<td>Link Two</td>
</tr>
<tr>
<td>Link Three</td>
<td>Link Four</td>
</tr>
.
.
.
This is the XSLT I have at the moment:
<xsl:template match="/">
<xsl:for-each select="//NavElement">
<tr>
<td><a xsl:use-attribute-sets="PrimaryLink"><xsl:value-of select="URLText[@Language='En']"/></a></td>
<td>This is the bit that's going wrong</td>
</tr>
</xsl:for-each>
Any ideas on a better way of structuring the XML document and to make the XSLT work would be appreciated.
TIA
Tony