Jean wrote:
> So if I use a block within a block I need reduce to tell rebol to evaluate
the embedded block.
> But why do I need rejoin in this case ?
> join "<HTML>" [reduce block1 "</HTML>"]
> also worked as I tried it.
> Theoretically,
> rejoin ["<HTML>" block1 "</HTML>"]
> should work,too. The Rebol doc says:
> Rejoin: Reduces and joins a block of values.
Unfortunately, not quite correct as you interpret. The 'rejoin reduces and
joins this block:
["<HTML>" block1 "</HTML>"]
NOT this block:
block1
Here's a nicer way:
rejoin [
""
<HTML> reduce block1 </HTML>
]
Note the empty string. This returns a string, and uses REBOL native tag
values.
Of course what we really, really want is:
print HTML/Dialect [
Head [
Title "HTML/Dialect Title"
]
Body [
"Body Attributes"
][
H1 Title
center "Body Contents"
Br
"Time is:" now/time
]
]
Note the use of the word 'head, the interesting uses of the word 'title,
_optional_ inclusion of tag attributes, and the inclusion of REBOL
functions/words. This version of my HTML dialect is very, very close to
completion.
Andrew Martin
REBOlutionary solutions...
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-