>>>> "Martin" == Martin Buchholz
<martin(a)xemacs.org> writes:
>>>> "jsja" == John S J Anderson <jacobs(a)xemacs.org> writes:
Martin> We really want the web site to be rooted anywhere, because
Martin> every developer should be able to have their own complete
Martin> self-contained working copy. It's a small price to pay to
Martin> have to explicitly do <IMG SRC="../../Images/xemacs.gif"> and
Martin> have to count the '..'s.
Martin> But we're software hackers, so we are extremely lazy. This is
Martin> a PERFECT use for a preprocessing tool like genpage. Can
Martin> genpage automatically replace some magic cookie @XEMACS.GIF@
Martin> with a relative path with the right number of `..'? I haven't
Martin> tried, but it shouldn't be rocket science.
I think the Right Thing would be to have a genpage macro (a Perl
subroutine) that would generate an appropriate <IMG> tag. Something
like
relImg( 'xemacs.gif' , 'alt="XEmacs"' )
to generate
<IMG SRC="../../Images/xemacs.gif" alt="XEmacs">
This makes it explicit that Magic is happening, and keeps the Perl
stuff out of the HTML stuff, which I think is the way to go for sake
of clarity.
It's trivial to do an ugly version of this (the example above is
ugly); a good version would need to integrate some Perl modules so as
to be able to automatically insert the proper 'height' and 'width'
tags.
john.
--
------------------------------------------------------------------------
John S Jacobs Anderson \ <URL:http://www.xemacs.org>
You'll have to pry my Emacs from my cold \ jacobs(a)xemacs.org
dead oversized control-pressing left pinky finger. -- Randal L. Schwartz