On Wed, 24 Dec 2003, Orna Agmon wrote:
> On Wed, 24 Dec 2003, Ron Artstein wrote:
>
> > > I am proud to present the new haifux site, located as (almost)
> > > always at: http://www.haifux.org
> >
> > Three comments:
> >
> > 1. The link to the mailing list archives stops in early
> > April 2003; the traffic since then is archived at
> > http://www.mail-archive.com/[EMAIL PROTECTED]/
> > A link is needed.
> >
> > 2. Links to future lectures are not prominent enough. It is
> > not obvious that the sidebar link "Lectures - Dates and
> > Slides" refers to future lectures, I suggest rephrasing
> > it to something like "upcoming lectures". And on the home
> > page, elevate the "future lectures" link from the position
> > it's currently buried at by making it into a heading (I'm
> > not sure which level is appropriate), and placing it right
> > after the next meeting.
> >
> > 3. The lecture tables render terribly in lynx, because of the
> > use of the <div> tag to center-align cells. I believe that
> > align=center as an attribute of <td> is standard html 4.01
> > (strict), so it should be used instead.
> >
> > -Ron.
> >
>
> The first two points I just did. The last point I found a bit harder, so I
> wrote a script to replace regular expressions in multiple files while
> asking for confirmation each time. The perl script is at
>
> http://www.haifux.org/source/reg.pl
>
> I wonder, was there a really easy was to do this, and I am the only one
> who writes scripts for such things?
>
First of all, you are not alone - we all write scripts to do such global
manipulations, albeit msot of my scripts so far were not interactive.
Scripts like that can be written using regexps, or in the case of HTML
using the Perl HTML::Parser module. In the case it's XML, or XHTML (which
is HTML that is valid XML), you can do such manipulations using an XML
Parser, and some XML processing. This is generally easier than most HTML
processing because XML is guaranteed to be well-formed.
Now, a better idea of course is to avoid such patterns, a priori. What my
script does is that the user maintains relational database tables with
meta-information that specifies the content of the pages. The rendering of
the cells and the entire table is done at the procesor, which adds the
relevant markup.
It's not perfect as there is still HTML markup in the tables. (mainly
for the contents of the comments cell) But I suppose it can be abstracted
away if the need arises.
Back to our case, I believe that using the "{text-align : center}" CSS
rule would have been preferable to the align="center" tag. You can do it
by deisgnating the class of the cells differently. I.e:
<td class="c">
</td>
And in the stylesheet:
.c { text-align : center}
Regards,
Shlomi Fish
> Orna.
>
> p.s.
> Indeed lynx now renders the tables a lot better. Thanks Ron!
>
> --------------------------------------------------------------------------
> Haifa Linux Club Mailing List (http://www.haifux.org)
> To unsub send an empty message to [EMAIL PROTECTED]
>
>
----------------------------------------------------------------------
Shlomi Fish [EMAIL PROTECTED]
Home Page: http://t2.technion.ac.il/~shlomif/
An apple a day will keep a doctor away. Two apples a day will keep two
doctors away.
Falk Fish
--------------------------------------------------------------------------
Haifa Linux Club Mailing List (http://www.haifux.org)
To unsub send an empty message to [EMAIL PROTECTED]