jondoe0069
Programmer
I have an XSL transform style sheet that takes data from an xml file and transforms it into the formatting I set. This is used for a navigation menu that has sub-menu formatting for sub-menu items.
I'm trying to create an element to insert a space between the two sections of my menu, but some of my formatting isn't showing up on the page. The field in the table that pulls the data from the XML file shows up, but the formatting fields before it don't. Does anyone know why? This is the code for the stylesheet:
<xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:template match="MenuItem">
<table cellpadding="0" cellspacing="0" border="0" width="180">
<tr bgcolor="#efefef">
<td colspan="3" height="1"><img src=" width="180" height="1" alt="" /></td>
</tr>
<tr bgcolor="#ce000c">
<td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><a class="nav"><xsl:attribute name="href"><xsl:value-of select="MenuURL" /></xsl:attribute>
<xsl:value-of select="MenuName" /></a></td>
</tr>
<xsl:for-each select="SubMenuItems/SubMenuItem">
<tr bgcolor="#ce000c">
<td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><a class="nav"><xsl:attribute name="href"><xsl:value-of select="SubMenuURL" /></xsl:attribute>
<xsl:value-of select="SubMenuName" /></a></td>
</tr></xsl:for-each>
<xsl:for-each select="Spacer">
<tr bgcolor="#efefef">
<td colspan="3" height="1"><img src=" width="180" height="10" alt="" /></td>
</tr>
<tr bgcolor="#ce000c"><td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><xsl:value-of select="Spacer/SpacerItem"/></td></tr></xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
I'm trying to create an element to insert a space between the two sections of my menu, but some of my formatting isn't showing up on the page. The field in the table that pulls the data from the XML file shows up, but the formatting fields before it don't. Does anyone know why? This is the code for the stylesheet:
<xsl:stylesheet version="1.0" xmlns:xsl=" <xsl:template match="MenuItem">
<table cellpadding="0" cellspacing="0" border="0" width="180">
<tr bgcolor="#efefef">
<td colspan="3" height="1"><img src=" width="180" height="1" alt="" /></td>
</tr>
<tr bgcolor="#ce000c">
<td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><a class="nav"><xsl:attribute name="href"><xsl:value-of select="MenuURL" /></xsl:attribute>
<xsl:value-of select="MenuName" /></a></td>
</tr>
<xsl:for-each select="SubMenuItems/SubMenuItem">
<tr bgcolor="#ce000c">
<td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><a class="nav"><xsl:attribute name="href"><xsl:value-of select="SubMenuURL" /></xsl:attribute>
<xsl:value-of select="SubMenuName" /></a></td>
</tr></xsl:for-each>
<xsl:for-each select="Spacer">
<tr bgcolor="#efefef">
<td colspan="3" height="1"><img src=" width="180" height="10" alt="" /></td>
</tr>
<tr bgcolor="#ce000c"><td width="25" height="25"><img src=" width="25" height="25" alt="" /></td>
<td width="10" height="25"><img src=" width="10" height="25" alt="" /></td>
<td width="145" height="25"><xsl:value-of select="Spacer/SpacerItem"/></td></tr></xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>