[REBOL] Re: RBML
From: gjones05::mail::orion::org at: 7-Jun-2001 14:27
From: "John Schuhr"
> Hi Ed.. well, I'm not really looking to "clone" CF, but I do find it
> convenient and I wanna create something very similar. I'm with you on
> whole # thing. It does complicate things sometimes in CF. I don't
> intend to use it as the variable delimiter, but I just slapped it in
> there.. this project is only about 30 minutes old (actual coding) :-)
Rather lengthy for a REBOL project, eh?
> Maybe something more like:
> I kinda like what you presented as well, but suppose I wanted to do
> <rebout query "qry-pmts">
> my-date: now/date
> either (my-date > qry-pmts/user-due-date) [pmt-status:
> "late"][pmt-status: "due"]
> Your payment is ~pmt-status~.<br>
> Granted, the current model doesn't support thing, but I'm looking into
> recursive parsing so this is possible. Any character(s) could serve
> delimiters.. just have to find one that works :)
When I collected various parameters in my little template, I did that
more to show that the parse found all the relevant tags, etc. I, of
course, knew that some were meant to be used as querys, and others as
markers for where queries results went. I didn't address actual
substitutions an clean-up for display.
What you have added above should still be do-able with a "single parse."
I can envision three types of parsing operations occurring during one
parse statement. One operation could be collecting the static
information that will be transmitted. A second is scanning for
placeholders. When it finds one, it sets a marker to the various spots
and logs what value are to be placed. The third is scanning for queries
and in-line code. The queries are run and variables are mapped to
results. The placeholders can be mapped to this table. (It could
actually be the same table.) The in-line code is evaluated and the
result is either inserted in place, or mapped to a placeholder for use
If this was already obvious, then my apologies in advance. At times I
seem to have a knack for stating the obvious.
(Really, Scott, is that right?! =)