Hi Ferdinand, Thanks for sticking with me. Just one point to finish with.
The new code bypasses old working code that some web sites may depend on? A user may have been happy with the default cellpadding and cellspacing while setting their own class. Just a backward compatibility issue, I'm sure unlikely. Kevin On Thu, 2005-10-06 at 08:42 +0200, Ferdinand Soethe wrote: > Hi Kevin, > > thanks for taking the time to explain. > Re-reading a forth time I now understand that with > > > I think should be: > > > > <xsl:when test="not(@class)"> > > you actually suggested part of the fix that David later committed. > I'm sorry. I just saw 'not' and your explanations below and concluded > that you wanted to turn around my conditions. Should have looked at > the code a little closer. > > > is not needed as the original version worked fine. I wasn't > > suggesting any new approach. > > Well in that point I still disagree. In order for the old version > below to work ok you have to overwrite _all_ the attributes that are set > or you'll end up with some attributes remaining unchanged. > > > <xsl:template match="table"> > > <xsl:apply-templates select="@id"/> > > > <table cellpadding="4" cellspacing="1" class="ForrestTable"> > > <xsl:copy-of select="@cellspacing | @cellpadding | > > @border | @class | @bgcolor |@id"/> > > <xsl:apply-templates/> > > </table> > > My goal however was to provide a clean alternative for css-formatting > and that meant I wanted _no_ spacing and padding attributes in the > html-code. > > So I still believe that the new solution is cleaner and better than > the old code. > > > so now what worked is partly redundant. Sorry I can't explain, > > I'm doubting myself now. > > If I once again missed something, let me know. > > -- > Ferdinand Soethe >
