XSLT Xpath Question

I am trying to write some XSLT to format the xml results in my forms that are emailed to include fieldsets in the table of data sent. I don't know if I am doing the Xpath test in the "if" correctly. Here is what I have:

<xsl:if test="preceding-sibling::*./@fieldsetindex != ./@fieldsetindex">
							  &lt;td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;background-color:#ccc;"&gt;
                               &lt;/td&gt;     
					     &lt;/xsl:if&gt;
					          
								&lt;td valign="top" style="border:1px solid black;padding:5px;font-family:Verdana,Helvetica,Arial,sans-serif;font-size:11px;"&gt;
                                      &lt;strong&gt;
                                            &lt;xsl:value-of select="./caption" disable-output-escaping="yes"/&gt;
                                      &lt;/strong&gt;
								&lt;/td&gt;</span></pre>

This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/60619-xslt-xpath-question