[REBOL] Re: HTML Dialect?
From: edanaii:cox at: 11-Jan-2003 7:37
Andrew Martin wrote:
>I used to have one which was exactly like your example, but it grew
>incapable of handling XHTML, WML, SVG and so on. I now use my ML dialect
>which works like this:
>
>>>ML compose/deep [
>>>
>>>
>[ a/href %Fred.html "Meet Fred Flintstone"
>[ ]
>== {<a href="Fred.html">Meet Fred Flintstone</a>}
>
>ML can be found in my %Values.r script which is at:
> http://valley.150m.com/Rebol/Values.r
>along with my eText dialect, which creates HTML pages from plain text.
>Here's an eText example:
>
>>>eText {
>>>
>>>
>{ "Meet Fred Flintstone" %Fred.html .
>{ }
>== [p [a/href "Fred.html" "Meet Fred Flintstone" " ."]]
>
Very nice.
But how do I, for example, do this?:
>> Fred: Make Object! [ File: %Fred.html Text: "Meet Fred Flintstone" ]
>> ML Compose/Deep [ a/href Fred/File Fred/Text ]
Which gave me the following results:
== {<a href="Fred.html" />
Meet Fred Flintstone}
Certainly not the results I was after.
I'm playing around with automating HTML generation, such that, if Fred
gets a new web page, I update Fred/File to %Flintstone.html and
regenerate the page.
Please bear in mind, I'm still a relative newbie, there are still many
things I have to get figured out about it. So if I'm missing something,
apologies in advance...
BTW, playing with it further, gave me these results:
>> FredFile: %Fred.html
== %Fred.html
>> FredText: "Meet Fred Flintstone"
== "Meet Fred Flintstone"
>> ML Compose/Deep [ a/href FredFile FredText ]
== {<a href="FredFile" />
<FredText />
}
--
Sincerely, |
Ed Dana | Reserve your right to think, for even to think
Software Developer | wrongly is better than not to think at all.
1Ghz Athlon Amiga | -- Hypatia of Alexandria.