467,915 Members | 1,091 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,915 developers. It's quick & easy.

HTML table position text injector?

Gentlemen, often HTML tables meant for regular monitors become hard to
keep one's place reading when viewed on small handheld devices. So
let's insert visual clues -- letters or numbers indicating what column
we are looking at -- right into the text of the table, so the user is
sure to know what column an item was in, no matter how jumbled the
table ends up.

Let's put a,b,c,d before each bus departure time:
aNurdsburg bTurdsburg cNorflewitz dBlahsville
eSoftstools fBoogerworth gSnitsville
a16:20 b16:50 c17:15 d
e18:50 f19:20 g22:00
(Blahsville to boring to stop in these days.)

One might further deal with e.g., COLSPAN="3": a-c or abc.
Multi-dimensional tables: a3, c7b etc.

HTML::TableExtract, HTML::Parser is way over my head.
Anyway perhaps somebody has already made a table position text injector?

(What I did:)
$ wget -O - http://www.fybus.com.tw/bus8.htm| #[1.6MB Big5]
tr -d \\n|perl -pwe 's/<t[dhr]/\n$&/ig'|
perl -pwe '$c=ord q{a}if/<tr/i;
s/<t[dh][^>]*>(<[^t\/][^>]*>|\&nbsp\;|\s)*/$&.chr $c++/ige'
.... plucker-build ... pilot-xfer
Jul 23 '05 #1
  • viewed: 3872
Share:
2 Replies
me
"Dan Jacobson" <ji*****@jidanni.org> wrote in message
news:87************@jidanni.org...
Gentlemen, often HTML tables meant for regular monitors become hard to
keep one's place reading when viewed on small handheld devices. So
let's insert visual clues -- letters or numbers indicating what column
we are looking at -- right into the text of the table, so the user is
sure to know what column an item was in, no matter how jumbled the
table ends up.

Let's put a,b,c,d before each bus departure time:
aNurdsburg bTurdsburg cNorflewitz dBlahsville
eSoftstools fBoogerworth gSnitsville
a16:20 b16:50 c17:15 d
e18:50 f19:20 g22:00
(Blahsville to boring to stop in these days.)

One might further deal with e.g., COLSPAN="3": a-c or abc.
Multi-dimensional tables: a3, c7b etc.

HTML::TableExtract, HTML::Parser is way over my head.
Anyway perhaps somebody has already made a table position text injector?

(What I did:)
$ wget -O - http://www.fybus.com.tw/bus8.htm| #[1.6MB Big5]
tr -d \\n|perl -pwe 's/<t[dhr]/\n$&/ig'|
perl -pwe '$c=ord q{a}if/<tr/i;
s/<t[dh][^>]*>(<[^t\/][^>]*>|\&nbsp\;|\s)*/$&.chr $c++/ige'
... plucker-build ... pilot-xfer


Son, I hate to burst your bubble but I'm not waiting for a 1.6MB table to
download, most especially without a loading message to tell me if the page
even exists.
Signed,
me
Jul 23 '05 #2
Dan Jacobson <ji*****@jidanni.org> wrote:
Gentlemen, often HTML tables meant for regular monitors become hard
to keep one's place reading when viewed on small handheld devices.
So let's insert visual clues -- letters or numbers indicating what
column we are looking at -- right into the text of the table, so
the user is sure to know what column an item was in, no matter how
jumbled the table ends up.


In terms of HTML authoring for the WWW, which is the topic of one of
the groups you posted to, that's not feasible. You would add some stuff
that you expect to be useful in a (currently relatively small) number
of browsing situations, but you would surely mess things up in a
majority of browsing situations.

Browsers for small devices can be pretty good in working with the
limited space. I wouldn't try to do better with some page-specific or
site-specific tricky techniques that may well do things worse _also_ on
small devices.

There are several techniques in HTML to assist the identification of
table rows and columns in presenting a table, such as the scope, abbr,
headers, and axis attributes. They are not very widely known, and most
books don't describe them much, and browsers utilize them rather
little, but I would say that some of them are _still_ a better, more
constructive approach. And they are described in HTML specifications.
Minimally, I would say, you could use scope and abbr, which are fairly
to understand and use.

I think you should first decide what to aim at, then consider the
programming techniques needed to achieve that. Hence followups trimmed.
(Surely there's the possibility that technical limitations exclude some
goals or otherwise affect the primary decision. But we have so far no
evidence of that in this case - surely you can do anything in Perl.:-)

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by ALuPin | last post: by
3 posts views Thread by Al Wilkerson | last post: by
6 posts views Thread by dpomt | last post: by
3 posts views Thread by steve_barker333 | last post: by
2 posts views Thread by Adam dR. | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.