Gilles Detillieux (firstname.lastname@example.org)
Mon, 3 May 1999 13:00:13 -0500 (CDT)
According to Geoff Hutchison:
> At 6:04 PM -0400 4/30/99, Gilles Detillieux wrote:
> >Ultimately, I think it would be great to extend the variable substitution
> >mechanism for templates to allow substitutions of URL-encoded forms of any
> >variable. E.g. something like:
> > $(WORDS) - unencoded
> > $%(WORDS) - URL-encoded
> > $&(WORDS) - SGML-encoded
> That's a good idea. In the 3.2 tree, we already have the SGML encoder, and
> it already translates excerpts. The URL-encoding code is necessary in a few
> other places, so using it here won't be difficult.
> I like the syntax you used, and once the URL-encoding class is written,
> implementing this will be easy.
I thought of a problem with the syntax, especially the $&(...) form. People
who use HTML editors to edit their wrapper.html file will see this converted
to $&(...). Maybe I could handle this as a special case, but maybe
it would be better to go with a syntax more like what Andrew suggested,
i.e. $[command args]. We could then extend the allowed commands, e.g.
URLencode, SGMLencode, upper, lower, and so on, and for those who really
want to load down their servers, we could even allow $[!shell-command args].
Of course, we'd also allow nesting of brackets. This would make the parsing
slightly more complicated, but nothing too nasty.
-- Gilles R. Detillieux E-mail: <email@example.com> Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil Dept. Physiology, U. of Manitoba Phone: (204)789-3766 Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930 ------------------------------------ To unsubscribe from the htdig mailing list, send a message to firstname.lastname@example.org containing the single word "unsubscribe" in the SUBJECT of the message.
This archive was generated by hypermail 2.0b3 on Mon May 03 1999 - 11:10:02 PDT