9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: William Ahern <william@25thandClement.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] httpd scripting
Date: Tue,  3 Jun 2003 05:50:12 -0700	[thread overview]
Message-ID: <20030603125012.GA824@wilbur.25thandClement.com> (raw)
In-Reply-To: <5YZCa.5429$iO3.35296367@news-text.cableinet.net>

 From telnet@wagner.Princeton.EDU.composers Wed Jul  8 06:40:19 1998
Newsgroups: comp.compilers
> You can get away with tree-like behavior in C if you use varargs stuff.
> I'll risk my reputation (:-)) by admitting to an even more disgusting hack:
> ---
> void new_section(char *title, char *img_name, int h, int w) {
>     emit(html_list,
> 	    html_p,
> 	    html_hr,
> 	    html_br,
>             html_region, "center",
>                 html_region, "h1",
> 	            html_text, title,
>             html_tag, "img",
> 	        html_param, "src", html_string, fname,
> 	        html_param, "height", html_text, h,
> 	        html_param, "width", html_text, w,
> 	        0,
>             0);
> }
<snip>
>
> A disgusting hack?  Absolutely.
>
> But it's also an order of magnitude more powerful than any other
> dynamic HTML tool I've worked with, and it only took me an hour or so
> to implement.
> ---------------------------------------------------------------------------

this is very similar to XSL: trees, nodes, concept of tags built into
language. c/o xsltproc from libxml2 for an XSLT processor, and zvon.org
for really good tutorials.

the beauty of XSL is that you can cleanly separate your content production
logic from your presentation logic.

- Bill


      reply	other threads:[~2003-06-03 12:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-01  0:47 Skip Tavakkolian
2003-06-01 13:27 ` Kenji Arisawa
2003-06-01 14:24   ` Skip Tavakkolian
2003-06-01 15:28     ` boyd, rounin
2003-06-01 14:58       ` Skip Tavakkolian
2003-06-01 15:59         ` boyd, rounin
2003-06-01 20:56     ` Kenji Arisawa
2003-06-02 11:55 ` matt
2003-06-02 12:12   ` David Butler
2003-06-02 16:22     ` matt
2003-06-02 12:35   ` Charles Forsyth
2003-06-02 13:08     ` matt
2003-06-02 13:51       ` Charles Forsyth
2003-06-02 15:38       ` Ian Broster
2003-06-02 16:12         ` matt
     [not found]         ` <e38733ba634d64e975019d2c0de81b2b@proxima.alt.za>
2003-06-02 16:15           ` spam
2003-06-02 17:55         ` Joel Salomon
2003-06-03  9:42       ` Robby
2003-06-03 12:50         ` William Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030603125012.GA824@wilbur.25thandClement.com \
    --to=william@25thandclement.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).