forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin <forr...@kegcl.demon.co.uk>
Subject Re: Cleaning up html-processing
Date Mon, 03 Oct 2005 17:13:45 GMT
On Sun, 2005-10-02 at 22:20 +0200, Ferdinand Soethe wrote: 
> Thanks Kevin,
> 
> > Don't think there is. The border effect is achieved by setting the
> > background colour in profile.css and using a cellspacing="1" on all
> > ForrestTable classes.
> 
> and yes. That may be true for ForrestTable classes. But the source I'm
> talking about has a different class attribute and the changes I've
> committed yesterday make sure that this different class is no longer
> overwritten with ForrestTable in the process.

Is this the change to document2html.xsl?

<!-- Limit Forrest specific processing  to tables without class -->
      <xsl:when test="@class = ''">
      <table cellpadding="4" cellspacing="1" class="ForrestTable">
      ...

I think should be:

 <xsl:when test="not(@class)">

See below about missing class="ForrestTable" when class is not set.

> But using these new transformation it becomes obvious that it is no
> longer a css-Effekt. If you make Forrest transform an html-file
> with something like
> 
> <table class="foo">
> .....
> 
> The resulting Forrest page will have
> 
> <table class="foo"  border="1">
> ....

I can't reproduce the border="1" problem. I tried a basic test.

<html>
<head><title>Tables</title></head>
<body>
<h1>Borders?</h1>
<table><tr><td>Forrest Table</td></tr></table>
<table class="foo" cellpadding="5"><tr><td>Foo Table</td></tr></table>
</body>
</html>

Generated Forrest page had no borders on either table
and no expected ForrestTable class on <table> with no class.

Going back to document2html.xsl before update:

  <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"/>
      <xsl:apply-templates/>
    </table>
  </xsl:template>

If @class and other attributes are set then don't they copy over
class="ForrestTable" cellpadding="4" cellspacing="1" so only getting
defaults when not set. So works as expected.

Sorry can't help on the border="1" it must be comming into this xsl.

Kevin

> 
> and my problem is that I have not found out where this is coming from.
> 
> Any ideas?
> 
> --
> Ferdinand Soethe
> 


Mime
View raw message