XSLT Templates
Hello,
I have the following XML:
<Documents>
<Section Title="Documentation" Sidebar="false">
<Document>...</Document>
<Document>...</Document>
<Document>...</Document>
</Section>
<Section Title="Business Information" Sidebar="false">
<Document>...</Document>
<Document>...</Document>
<Document>...</Document>
</Section>
<Section Title="Policy" Sidebar="true">
<Document>...</Document>
<Document>...</Document>
<Document>...</Document>
</Section>
</Documents>
What I want to do is trigger a different response when the sidebar is true then when false. In my stylesheet, I had did this:
<xsl:template match="Documents">
<table>
<tr>
<td>
<xsl:apply-templates select="Section[@Sidebar != 'true']"/>
</td>
<td width="20%">
<xsl:apply-templates select="Section[@Sidebar = 'true']"/>
</td>
<tr>
</table>
</xsl:template>
<xsl:template match="Section[@Sidebar = 'true']">
...
</xsl:template>
<xsl:template match="Section[@Sidebar != 'true']">
...
</xsl:template>
The sections where sidebar = true is supposed to be on the right side, and the rest in the main page. I couldn't get this to work. Any ideas what is wrong? How do I render content differently based on the sidebar parameter?
Thanks,
Brian Mains
__________________
Brian
|