Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

HTML Dialect?

 [1/10] from: edanaii:cox at: 10-Jan-2003 13:58


I seem to recall that there is an HTML Dialect out there some where, but I forget the details. Something that works like this:
>> Anchor %Fred.html "Meet Fred Flintstone"
== {<a href="Fred.html">Meet Fred Flinstone</a>} Can anyone point me in the right direction? -- Sincerely, | Don't part with your illusions. When they are gone Ed Dana | you may still exist, but you have ceased to live. Software Developer | -- Mark Twain 1Ghz Athlon Amiga |

 [2/10] from: tim:johnsons-web at: 10-Jan-2003 12:56


Ed: I use Andrew Martin's 'ML dialect extensively. I recommend it eMail: [Al--Bri--xtra--co--nz] Web: http://valley.150m.com -tim- * Ed Dana <[EDanaII--Cox--net]> [030110 12:20]:
> I seem to recall that there is an HTML Dialect out there some where, but > I forget the details.
<<quoted lines omitted: 12>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [3/10] from: al:bri:xtra at: 11-Jan-2003 11:05


Ed wrote:
> I seem to recall that there is an HTML Dialect out there some where, but I
forget the details.
> Something that works like this: > >> Anchor %Fred.html "Meet Fred Flintstone" > == {<a href="Fred.html">Meet Fred Flinstone</a>} > > Can anyone point me in the right direction?
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" " ."]] Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [4/10] from: maarten:koopmans:surfnet:nl at: 10-Jan-2003 23:10


There is a not-working one in the vault, but there are also a few in the script library. --Maarten

 [5/10] 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
<<quoted lines omitted: 15>>
>{ } >== [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.

 [6/10] from: al::bri::xtra::co::nz at: 12-Jan-2003 8:41


Ed wrote:
> 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 ]
Just put the variables inside parenthesis, like:
>> Fred: Make Object! [ File: %Fred.html Text: "Meet Fred Flintstone" ] >> ML Compose/Deep [ a/href (Fred/File) (Fred/Text)]
== {<a href="Fred.html">Meet Fred Flintstone</a>}
> BTW, playing with it further, gave me these results: > >> FredFile: %Fred.html
<<quoted lines omitted: 4>>
> == {<a href="FredFile" /> >> FredFile: %Fred.html
== %Fred.html
>> FredText: "Meet Fred Flintstone"
== "Meet Fred Flintstone"
>> ML Compose/Deep [ a/href (FredFile) (FredText)]
== {<a href="Fred.html">Meet Fred Flintstone</a>} There's some demo stuff here: http://www.frozen-north-linuxonline.com/source_code/REBOL/MLDemo.txt which can be more helpful. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [7/10] from: tim:johnsons-web at: 11-Jan-2003 10:52


* Ed Dana <[EDanaII--Cox--net]> [030111 06:03]: <...>
> Very nice. > But how do I, for example, do this?:
<<quoted lines omitted: 3>>
> == {<a href="Fred.html" /> > Meet Fred Flintstone}
Hi Ed: Is this what you're looking for: ML Compose/Deep [ a/href Fred/File [Fred/Text] ] == { <a href="Fred.html">Meet Fred Flintstone</a>} ; using inner block gives balanced closure, ; rather than singleton -tim- -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

 [8/10] from: al:bri:xtra at: 12-Jan-2003 10:10


Andrew wrote:
> There's some demo stuff here: >
http://www.frozen-north-linuxonline.com/source_code/REBOL/MLDemo.txt
> which can be more helpful.
I've also reposted it here: http://valley.150m.com/Rebol/ML Demo.html in HTML format. Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [9/10] from: edanaii:cox at: 12-Jan-2003 8:00


Andrew Martin wrote:
>Ed wrote: >>But how do I, for example, do this?:
<<quoted lines omitted: 8>>
>>> >== {<a href="Fred.html">Meet Fred Flintstone</a>}
Ya know, I swear I tried it with different combinations, including parenthesis. Sigh... It's gotta be my computer. It just hates me, I know it does... :)
>There's some demo stuff here: > http://www.frozen-north-linuxonline.com/source_code/REBOL/MLDemo.txt >which can be more helpful. >
All right, I'll play with it some more. Thanks. -- Sincerely, | Control is an illusion, you infantile egomaniac! Ed Dana | Nobody knows what's gonna happen next: not on a Software Developer | freeway, not in an airplane, not inside our own 1Ghz Athlon Amiga | bodies and certainly not on a racetrack with 40 | other infantile egomaniacs! | -- Nicole Kidman, Days of Thunder

 [10/10] from: tim:johnsons-web at: 12-Jan-2003 8:33


* Ed Dana <[EDanaII--Cox--net]> [030112 06:24]:
> > > >Just put the variables inside parenthesis, like:
<<quoted lines omitted: 12>>
> parenthesis. Sigh... > It's gotta be my computer. It just hates me, I know it does... :)
Hi Ed: I (think!) that Andrew and I have both given you good information, but they need to be combined. Here is a console session from my machine:
>> Fred: Make Object! [ File: %Fred.html Text: "Meet Fred Flintstone" ] >> ml [ a/href (Fred/File) [(Fred/Text)]]
== {<a href="Fred.html">Meet Fred Flintstone</a>} placing the object members in parens insures that rebol will evaluate them both before 'ml itself is evaluated. Placing the braces around (Fred/Text) insures that the evaluation of Fred's 'Text member will be placed inside of a proper combination of opening and closing "anchor" tags so that it will be a "clickable" link, which I believe that you are after. Just to see the difference, try this:
>> ml [ a/href (Fred/File) (Fred/Text)]
== {<a href="Fred.html" /> Meet Fred Flintstone} ; which you *don't* want If you still having problems, send your code *and* the output from a console session. HTH -- Tim Johnson <[tim--johnsons-web--com]> http://www.alaska-internet-solutions.com http://www.johnsons-web.com

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted